diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-03-08 20:24:12 -0500 |
---|---|---|
committer | root <root@jk-desktop.jf.intel.com> | 2006-03-08 20:24:12 -0500 |
commit | cb764326dff0ee51aca0d450e1a292de65661055 (patch) | |
tree | 4cabea34727903fa8560abfeae325936a9039c7e /drivers/net/e1000 | |
parent | 74f5ec29ae93aa42c49f4285c20c457afe937881 (diff) |
e1000: Fix mii-tool access to setting speed and duplex
Paul Rolland reported that e1000 was having a hard time using mii-tool to set speed and duplex. This patch fixes the issue on both newer hardware as well as fixing the code issue that originally caused the problem.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 9adaf5fa9d48..5f7e5c808201 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -4171,7 +4171,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | |||
4171 | spin_unlock_irqrestore(&adapter->stats_lock, flags); | 4171 | spin_unlock_irqrestore(&adapter->stats_lock, flags); |
4172 | return -EIO; | 4172 | return -EIO; |
4173 | } | 4173 | } |
4174 | if (adapter->hw.phy_type == e1000_phy_m88) { | 4174 | if (adapter->hw.phy_type == e1000_media_type_copper) { |
4175 | switch (data->reg_num) { | 4175 | switch (data->reg_num) { |
4176 | case PHY_CTRL: | 4176 | case PHY_CTRL: |
4177 | if (mii_reg & MII_CR_POWER_DOWN) | 4177 | if (mii_reg & MII_CR_POWER_DOWN) |
@@ -4187,8 +4187,8 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | |||
4187 | else | 4187 | else |
4188 | spddplx = SPEED_10; | 4188 | spddplx = SPEED_10; |
4189 | spddplx += (mii_reg & 0x100) | 4189 | spddplx += (mii_reg & 0x100) |
4190 | ? FULL_DUPLEX : | 4190 | ? DUPLEX_FULL : |
4191 | HALF_DUPLEX; | 4191 | DUPLEX_HALF; |
4192 | retval = e1000_set_spd_dplx(adapter, | 4192 | retval = e1000_set_spd_dplx(adapter, |
4193 | spddplx); | 4193 | spddplx); |
4194 | if (retval) { | 4194 | if (retval) { |