e1000: fix media_type <-> phy_type thinko
Subsystems (2)
Recent patch cb764326dff0ee51aca0d450e1a292de65661055 introduced a thinko in e1000_main.c : e1000_media_type_copper is compared to hw.phy_type instead of hw.media_type. Original patch proposed by Jesse Brandeburg was correct, but what has been merged is not.
---
drivers/net/e1000/e1000_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
3df8a180d50c89a72c28abf37151e38ffda75f39
drivers/net/e1000/e1000_main.c +1 -1
@@ -4156,7 +4156,7 @@ e1000_mii_ioctl(struct net_device *netdespin_unlock_irqrestore (&adapter->stats_lock, flags);return -EIO ; } -if (adapter->hw.phy_type == e1000_media_type_copper) { +if (adapter->hw.media_type == e1000_media_type_copper) {switch (data->reg_num) {case PHY_CTRL :if (mii_reg &MII_CR_POWER_DOWN )
Signature · 1 line
1.2.4
Quoted 4 lines · Willy TARREAU
Recent patch
cb764326dff0ee51aca0d450e1a292de65661055introduced a thinko ine1000_main.c:e1000_media_type_copperis compared to hw.phy_type instead of hw.media_type. Original patch proposed by Jesse Brandeburg was correct, but what has been merged is not.
Indeed this seems like a mistake to me. I'll make sure this is checked tomorrow with Jeff Kirsher who submitted the original patch.
Auke Kok
Quoted 19 lines
---
drivers/net/e1000/e1000_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
3df8a180d50c89a72c28abf37151e38ffda75f39drivers/net/e1000/e1000_main.c +1
-1@@ -4156,7 +4156,7 @@ e1000_mii_ioctl(struct net_device *netdespin_unlock_irqrestore (&adapter->stats_lock, flags);return -EIO ; } -if (adapter->hw.phy_type == e1000_media_type_copper) { +if (adapter->hw.media_type == e1000_media_type_copper) {switch (data->reg_num) {case PHY_CTRL :if (mii_reg &MII_CR_POWER_DOWN )
Quoted 4 lines · Willy TARREAU
Recent patch
cb764326dff0ee51aca0d450e1a292de65661055introduced a thinko ine1000_main.c:e1000_media_type_copperis compared to hw.phy_type instead of hw.media_type. Original patch proposed by Jesse Brandeburg was correct, but what has been merged is not.
Yes, this fix makes the code how it should have been.
Ack.
---
drivers/net/e1000/e1000_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
3df8a180d50c89a72c28abf37151e38ffda75f39
drivers/net/e1000/e1000_main.c +1 -1
@@ -4156,7 +4156,7 @@ e1000_mii_ioctl(struct net_device *netdespin_unlock_irqrestore (&adapter->stats_lock, flags);return -EIO ; } -if (adapter->hw.phy_type == e1000_media_type_copper) { +if (adapter->hw.media_type == e1000_media_type_copper) {switch (data->reg_num) {case PHY_CTRL :if (mii_reg &MII_CR_POWER_DOWN )
Signature · 1 line
1.2.4