summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10.c
diff options
context:
space:
mode:
authorJon Cooper <jcooper@solarflare.com>2016-08-26 15:13:30 +0100
committerDavid S. Miller <davem@davemloft.net>2016-08-26 21:43:52 -0700
commit942e298eba850a866a673fa159774313650ce5cc (patch)
tree4a30488233e961ec367b9fe3a103ea0c6a6a3775 /drivers/net/ethernet/sfc/ef10.c
parentdf0562c386c778c802b981fc4015a636aa5db866 (diff)
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/ef10.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index c4cd6b08acd1..6fe1d0ba78b2 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -2048,14 +2048,18 @@ static irqreturn_t efx_ef10_legacy_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static void efx_ef10_irq_test_generate(struct efx_nic *efx)
+static int efx_ef10_irq_test_generate(struct efx_nic *efx)
{
MCDI_DECLARE_BUF(inbuf, MC_CMD_TRIGGER_INTERRUPT_IN_LEN);
+ if (efx_mcdi_set_workaround(efx, MC_CMD_WORKAROUND_BUG41750, true,
+ NULL) == 0)
+ return -ENOTSUPP;
+
BUILD_BUG_ON(MC_CMD_TRIGGER_INTERRUPT_OUT_LEN != 0);
MCDI_SET_DWORD(inbuf, TRIGGER_INTERRUPT_IN_INTR_LEVEL, efx->irq_level);
- (void) efx_mcdi_rpc(efx, MC_CMD_TRIGGER_INTERRUPT,
+ return efx_mcdi_rpc(efx, MC_CMD_TRIGGER_INTERRUPT,
inbuf, sizeof(inbuf), NULL, 0, NULL);
}