[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1415980770-5467-1-git-send-email-linville@tuxdriver.com>
Date: Fri, 14 Nov 2014 10:59:30 -0500
From: "John W. Linville" <linville@...driver.com>
To: netdev@...r.kernel.org
Cc: Dave Miller <davem@...emloft.net>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Auke Kok <auke-jan.h.kok@...el.com>,
Malli Chilakala <mallikarjuna.chilakala@...el.com>,
"John W. Linville" <linville@...driver.com>
Subject: [PATCH] e100: fix typo in MDI/MDI-X eeprom check in e100_phy_init
Although it doesn't explicitly say so, commit 60ffa478759f39a2 ("e100:
Fix MDIO/MDIO-X") appears to be intended to revert the earlier commit
648951451e6d2d53 ("e100: fixed e100 MDI/MDI-X issues"). However,
careful examination reveals that the attempted revert actually
_inverted_ the test for eeprom_mdix_enabled. That is bound to program
a few PHYs incorrectly...
https://bugzilla.redhat.com/show_bug.cgi?id=1156417
Signed-off-by: John W. Linville <linville@...driver.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: Auke Kok <auke-jan.h.kok@...el.com>
Cc: Malli Chilakala <mallikarjuna.chilakala@...el.com>
---
Wow, an 8 year old bug in e100 -- woohoo!! :-)
This was causing some serious flakiness for a large cash register
deployment in Europe. Testing with this one-line (really,
one-character) patch seems to have resolved the issue.
drivers/net/ethernet/intel/e100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 781065eb5431..e9c3a87e5b11 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -1543,7 +1543,7 @@ static int e100_phy_init(struct nic *nic)
mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr);
} else if ((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) &&
- !(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) {
+ (nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) {
/* enable/disable MDI/MDI-X auto-switching. */
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists