summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/selftest.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-29 03:43:33 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-29 16:46:31 -0800
commit0aa3fbaa3f2d29a14231ebb0c8e521c23701d41f (patch)
tree11ab228583d64eae81abe02f49e233fdab5cfb54 /drivers/net/sfc/selftest.c
parent9bfc4bb1f9b5863b177752b88e8bfa364e83a4fa (diff)
sfc: Add efx_nic_type operation for NVRAM self-test
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r--drivers/net/sfc/selftest.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index f3035521004..fa56e2e8e9c 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -113,10 +113,13 @@ out:
static int efx_test_nvram(struct efx_nic *efx, struct efx_self_tests *tests)
{
- int rc;
+ int rc = 0;
+
+ if (efx->type->test_nvram) {
+ rc = efx->type->test_nvram(efx);
+ tests->nvram = rc ? -1 : 1;
+ }
- rc = falcon_read_nvram(efx, NULL);
- tests->nvram = rc ? -1 : 1;
return rc;
}