summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/selftest.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-29 03:43:23 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-29 16:46:30 -0800
commit9bfc4bb1f9b5863b177752b88e8bfa364e83a4fa (patch)
treec4ca25f993298ec1a2a10f6027e3958186b364dc /drivers/net/sfc/selftest.c
parenteb9f6744cbfa97674c13263802259b5aa0034594 (diff)
downloadblackbird-op-linux-9bfc4bb1f9b5863b177752b88e8bfa364e83a4fa.tar.gz
blackbird-op-linux-9bfc4bb1f9b5863b177752b88e8bfa364e83a4fa.zip
sfc: Add efx_nic_type operation for register 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index f45bf7442154..f30355210044 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -122,14 +122,14 @@ static int efx_test_nvram(struct efx_nic *efx, struct efx_self_tests *tests)
static int efx_test_chip(struct efx_nic *efx, struct efx_self_tests *tests)
{
- int rc;
+ int rc = 0;
- /* Not supported on A-series silicon */
- if (efx_nic_rev(efx) < EFX_REV_FALCON_B0)
- return 0;
+ /* Test register access */
+ if (efx->type->test_registers) {
+ rc = efx->type->test_registers(efx);
+ tests->registers = rc ? -1 : 1;
+ }
- rc = falcon_test_registers(efx);
- tests->registers = rc ? -1 : 1;
return rc;
}
OpenPOWER on IntegriCloud