diff options
Diffstat (limited to 'drivers/net/e1000/e1000_hw.c')
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 723589b28be5..045f5426ab9a 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -354,18 +354,27 @@ e1000_set_media_type(struct e1000_hw *hw) | |||
354 | hw->media_type = e1000_media_type_internal_serdes; | 354 | hw->media_type = e1000_media_type_internal_serdes; |
355 | break; | 355 | break; |
356 | default: | 356 | default: |
357 | if(hw->mac_type >= e1000_82543) { | 357 | switch (hw->mac_type) { |
358 | case e1000_82542_rev2_0: | ||
359 | case e1000_82542_rev2_1: | ||
360 | hw->media_type = e1000_media_type_fiber; | ||
361 | break; | ||
362 | case e1000_82573: | ||
363 | /* The STATUS_TBIMODE bit is reserved or reused for the this | ||
364 | * device. | ||
365 | */ | ||
366 | hw->media_type = e1000_media_type_copper; | ||
367 | break; | ||
368 | default: | ||
358 | status = E1000_READ_REG(hw, STATUS); | 369 | status = E1000_READ_REG(hw, STATUS); |
359 | if(status & E1000_STATUS_TBIMODE) { | 370 | if (status & E1000_STATUS_TBIMODE) { |
360 | hw->media_type = e1000_media_type_fiber; | 371 | hw->media_type = e1000_media_type_fiber; |
361 | /* tbi_compatibility not valid on fiber */ | 372 | /* tbi_compatibility not valid on fiber */ |
362 | hw->tbi_compatibility_en = FALSE; | 373 | hw->tbi_compatibility_en = FALSE; |
363 | } else { | 374 | } else { |
364 | hw->media_type = e1000_media_type_copper; | 375 | hw->media_type = e1000_media_type_copper; |
365 | } | 376 | } |
366 | } else { | 377 | break; |
367 | /* This is an 82542 (fiber only) */ | ||
368 | hw->media_type = e1000_media_type_fiber; | ||
369 | } | 378 | } |
370 | } | 379 | } |
371 | } | 380 | } |
@@ -1189,9 +1198,9 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw) | |||
1189 | ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, phy_data); | 1198 | ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, phy_data); |
1190 | if(ret_val) | 1199 | if(ret_val) |
1191 | return ret_val; | 1200 | return ret_val; |
1192 | } | 1201 | } |
1193 | 1202 | ||
1194 | return E1000_SUCCESS; | 1203 | return E1000_SUCCESS; |
1195 | } | 1204 | } |
1196 | 1205 | ||
1197 | 1206 | ||