summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_hw.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-06-27 22:50:10 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-27 22:50:10 -0400
commitaa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f (patch)
tree57ca3e27227695acbd97408eabb0f967726c3b51 /drivers/net/e1000/e1000_hw.c
parentf45727d52d1581e9ff4df9d1a12a60789ad2d1eb (diff)
parent245ac8738b0b840552d56b842e70e750d65911cc (diff)
downloadop-kernel-dev-aa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f.zip
op-kernel-dev-aa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f.tar.gz
Merge /spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'drivers/net/e1000/e1000_hw.c')
-rw-r--r--drivers/net/e1000/e1000_hw.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 723589b..045f542 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)
hw->media_type = e1000_media_type_internal_serdes;
break;
default:
- if(hw->mac_type >= e1000_82543) {
+ switch (hw->mac_type) {
+ case e1000_82542_rev2_0:
+ case e1000_82542_rev2_1:
+ hw->media_type = e1000_media_type_fiber;
+ break;
+ case e1000_82573:
+ /* The STATUS_TBIMODE bit is reserved or reused for the this
+ * device.
+ */
+ hw->media_type = e1000_media_type_copper;
+ break;
+ default:
status = E1000_READ_REG(hw, STATUS);
- if(status & E1000_STATUS_TBIMODE) {
+ if (status & E1000_STATUS_TBIMODE) {
hw->media_type = e1000_media_type_fiber;
/* tbi_compatibility not valid on fiber */
hw->tbi_compatibility_en = FALSE;
} else {
hw->media_type = e1000_media_type_copper;
}
- } else {
- /* This is an 82542 (fiber only) */
- hw->media_type = e1000_media_type_fiber;
+ break;
}
}
}
@@ -1189,9 +1198,9 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw)
ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, phy_data);
if(ret_val)
return ret_val;
- }
+ }
- return E1000_SUCCESS;
+ return E1000_SUCCESS;
}
OpenPOWER on IntegriCloud