[PATCH] e1000: Fix mii-tool access to setting speed and duplex
Linux Kernel Mailing List <[email protected]> Wed, 19 Apr 2006 21:59:51 GMT
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
commit 19534b446bc1835abbf17d1ff7a3a15481a35567 tree 518f789306e5cecd79c2c87140c3d865565f72e2 parent e2577e4a7fcb8905953295c4a53836bbec42a190 author Willy TARREAU <willy@pcw.(none)> Sat, 15 Apr 2006 13:06:33 +0200 committer Willy TARREAU <willy@pcw.(none)> Sat, 15 Apr 2006 13:06:33 +0200 [PATCH] 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 initially from Jesse Brandeburg backported from 2.6 fixes the issue on both newer hardware as well as fixing the code issue that originally caused the problem. Signed-off-by: Willy Tarreau <[email protected]> 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 b9d3177..3342142 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -2755,7 +2755,7 @@ e1000_mii_ioctl(struct net_device *netde if (e1000_write_phy_reg(&adapter->hw, data->reg_num, mii_reg)) return -EIO; - if (adapter->hw.phy_type == e1000_phy_m88) { + if (adapter->hw.media_type == e1000_media_type_copper) { switch (data->reg_num) { case PHY_CTRL: if(mii_reg & MII_CR_POWER_DOWN) @@ -2771,8 +2771,8 @@ e1000_mii_ioctl(struct net_device *netde else spddplx = SPEED_10; spddplx += (mii_reg & 0x100) - ? FULL_DUPLEX : - HALF_DUPLEX; + ? DUPLEX_FULL : + DUPLEX_HALF; retval = e1000_set_spd_dplx(adapter, spddplx); if(retval)