sfc: Log specific message for failure of NVRAM self-test
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 28 Apr 2010 09:28:36 +0000 (09:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Apr 2010 19:44:36 +0000 (12:44 -0700)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/mcdi.c

index 1344afac4673da6f52bdd5a556eaae4b22ff3ea7..93cc3c1b9450b28cb0587617855818af8de580e5 100644 (file)
@@ -932,20 +932,26 @@ int efx_mcdi_nvram_test_all(struct efx_nic *efx)
 
        rc = efx_mcdi_nvram_types(efx, &nvram_types);
        if (rc)
-               return rc;
+               goto fail1;
 
        type = 0;
        while (nvram_types != 0) {
                if (nvram_types & 1) {
                        rc = efx_mcdi_nvram_test(efx, type);
                        if (rc)
-                               return rc;
+                               goto fail2;
                }
                type++;
                nvram_types >>= 1;
        }
 
        return 0;
+
+fail2:
+       EFX_ERR(efx, "%s: failed type=%u\n", __func__, type);
+fail1:
+       EFX_ERR(efx, "%s: failed rc=%d\n", __func__, rc);
+       return rc;
 }
 
 static int efx_mcdi_read_assertion(struct efx_nic *efx)