summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/qt202x_phy.c
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2010-02-12 21:32:27 +0100
committerDavid S. Miller <davem@davemloft.net>2010-02-12 21:32:27 +0100
commit5e2a911cecc7e0fd89b1d2d001b7b89d47057ad6 (patch)
tree33f2f05fc4144cbcf0fe77c4c5605b62ef6f09ea /drivers/net/sfc/qt202x_phy.c
parentinet: Remove bogus IGMPv3 report handling (diff)
downloadlinux-5e2a911cecc7e0fd89b1d2d001b7b89d47057ad6.tar.xz
linux-5e2a911cecc7e0fd89b1d2d001b7b89d47057ad6.zip
sfc: Fix SFE4002 initialisation
From: Steve Hodgson <shodgson@solarflare.com> Commit 357d46a17e54c9a87e0e6ef3930ff4ab2d232b81 "sfc: QT202x: Remove unreliable MMD check at initialisation" broke initialisation of the SFE4002. efx_mdio_reset_mmd() returns a positive value rather than 0 on success. The above commit causes this value to be propagated up by qt202x_reset_phy(), which is treated as a failure by its callers. Change qt202x_reset_phy() to return 0 if successful. The PCI layer treats >0 as "fail, but please call remove() anyway", which means that unloading the driver would cause a crash. Add a WARN_ON() on the failure path of efx_pci_probe() to provide early warning if there are any other cases where we do this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/qt202x_phy.c')
-rw-r--r--drivers/net/sfc/qt202x_phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c
index e0d13a451019..67eec7a6e487 100644
--- a/drivers/net/sfc/qt202x_phy.c
+++ b/drivers/net/sfc/qt202x_phy.c
@@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx)
falcon_board(efx)->type->init_phy(efx);
- return rc;
+ return 0;
fail:
EFX_ERR(efx, "PHY reset timed out\n");