Skip to content

Commit 7241069

Browse files
Sasha Neftinanguy11
authored andcommitted
igc: Remove unused phy_type enum
Complete to commit 8e153fa ("igc: Remove unused phy type") i225 parts have only one PHY. There is no point to use phy_type enum. Clean up the code accordingly, and get rid of the unused enum lines. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Naama Meir <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent d098538 commit 7241069

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

drivers/net/ethernet/intel/igc/igc_base.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
182182

183183
igc_check_for_copper_link(hw);
184184

185-
phy->type = igc_phy_i225;
186-
187185
out:
188186
return ret_val;
189187
}

drivers/net/ethernet/intel/igc/igc_hw.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ enum igc_mac_type {
5353
igc_num_macs /* List is 1-based, so subtract 1 for true count. */
5454
};
5555

56-
enum igc_phy_type {
57-
igc_phy_unknown = 0,
58-
igc_phy_i225,
59-
};
60-
6156
enum igc_media_type {
6257
igc_media_type_unknown = 0,
6358
igc_media_type_copper = 1,
@@ -138,8 +133,6 @@ struct igc_nvm_info {
138133
struct igc_phy_info {
139134
struct igc_phy_operations ops;
140135

141-
enum igc_phy_type type;
142-
143136
u32 addr;
144137
u32 id;
145138
u32 reset_delay_us; /* in usec */

drivers/net/ethernet/intel/igc/igc_phy.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,11 @@ void igc_power_down_phy_copper(struct igc_hw *hw)
148148
s32 igc_check_downshift(struct igc_hw *hw)
149149
{
150150
struct igc_phy_info *phy = &hw->phy;
151-
s32 ret_val;
152151

153-
switch (phy->type) {
154-
case igc_phy_i225:
155-
default:
156-
/* speed downshift not supported */
157-
phy->speed_downgraded = false;
158-
ret_val = 0;
159-
}
152+
/* speed downshift not supported */
153+
phy->speed_downgraded = false;
160154

161-
return ret_val;
155+
return 0;
162156
}
163157

164158
/**

0 commit comments

Comments
 (0)