sfc: QT2025C: Use hard reset only
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 26 Aug 2009 08:17:19 +0000 (08:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2009 00:38:54 +0000 (17:38 -0700)
At probe time, falcon_reset_hw() performs a hard reset of the PHY
along with Falcon.  There is no need to perform a soft reset later,
and any access to standard MDIO registers before the PHY firmware has
booted can interrupt the boot process, making the port unusable.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/xfp_phy.c

index bb2e6afd08294fbe63f3571ce87121324b7e1f4f..e6b3d5eaddba0a68ca5501b2fc97974a93324faf 100644 (file)
@@ -97,23 +97,24 @@ static int qt2025c_wait_reset(struct efx_nic *efx)
        return 0;
 }
 
-/* Reset the PHYXS MMD. This is documented (for the Quake PHYs) as doing
- * a complete soft reset.
- */
 static int xfp_reset_phy(struct efx_nic *efx)
 {
        int rc;
 
-       rc = efx_mdio_reset_mmd(efx, MDIO_MMD_PHYXS,
-                               XFP_MAX_RESET_TIME / XFP_RESET_WAIT,
-                               XFP_RESET_WAIT);
-       if (rc < 0)
-               goto fail;
-
        if (efx->phy_type == PHY_TYPE_QT2025C) {
+               /* Wait for the reset triggered by falcon_reset_hw()
+                * to complete */
                rc = qt2025c_wait_reset(efx);
                if (rc < 0)
                        goto fail;
+       } else {
+               /* Reset the PHYXS MMD. This is documented as doing
+                * a complete soft reset. */
+               rc = efx_mdio_reset_mmd(efx, MDIO_MMD_PHYXS,
+                                       XFP_MAX_RESET_TIME / XFP_RESET_WAIT,
+                                       XFP_RESET_WAIT);
+               if (rc < 0)
+                       goto fail;
        }
 
        /* Wait 250ms for the PHY to complete bootup */