summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/selftest.c
diff options
context:
space:
mode:
authorJon Cooper <jcooper@solarflare.com>2016-08-26 17:13:30 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-27 07:43:52 +0300
commit942e298eba850a866a673fa159774313650ce5cc (patch)
tree4a30488233e961ec367b9fe3a103ea0c6a6a3775 /drivers/net/ethernet/sfc/selftest.c
parentdf0562c386c778c802b981fc4015a636aa5db866 (diff)
downloadlinux-942e298eba850a866a673fa159774313650ce5cc.tar.xz
sfc: work around TRIGGER_INTERRUPT command not working on SFC9140
MC_CMD_TRIGGER_INTERRUPT does not work on the SFC9140, as used in the sfn7x42q and sfn7x24f. Check for this using the MCDI workaround mechanism. The command is only used during self test. If it's not supported, skip the interrupt test. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/selftest.c')
-rw-r--r--drivers/net/ethernet/sfc/selftest.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index 9d78830da609..cd38b44ae23a 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -135,11 +135,19 @@ static int efx_test_interrupts(struct efx_nic *efx,
{
unsigned long timeout, wait;
int cpu;
+ int rc;
netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n");
tests->interrupt = -1;
- efx_nic_irq_test_start(efx);
+ rc = efx_nic_irq_test_start(efx);
+ if (rc == -ENOTSUPP) {
+ netif_dbg(efx, drv, efx->net_dev,
+ "direct interrupt testing not supported\n");
+ tests->interrupt = 0;
+ return 0;
+ }
+
timeout = jiffies + IRQ_TIMEOUT;
wait = 1;