summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorAlexandre Rames <arames@solarflare.com>2013-03-21 16:41:43 +0000
committerBen Hutchings <bhutchings@solarflare.com>2013-06-24 19:58:25 +0100
commitb28405b0f25c91b52350fd558c219f08e5033eaf (patch)
treeaaf3d37c96a0a789ae23dd4f751cd9c57f24a1c8 /drivers/net/ethernet/sfc/efx.c
parent37173488400704f1a05656616cd12baa9e03173b (diff)
downloadlwn-b28405b0f25c91b52350fd558c219f08e5033eaf.tar.gz
lwn-b28405b0f25c91b52350fd558c219f08e5033eaf.zip
sfc: Fix EEH with legacy interrupts.
PCI legacy interrupts are level-triggered, and we cannot mask them up on an isolated device. Instead, disable the IRQ at the controller until we have recovered. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 46cc11d5e205..787c9ebc17ee 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -23,6 +23,7 @@
#include <linux/gfp.h>
#include <linux/cpu_rmap.h>
#include <linux/aer.h>
+#include <linux/interrupt.h>
#include "net_driver.h"
#include "efx.h"
#include "nic.h"
@@ -1427,6 +1428,10 @@ static void efx_start_interrupts(struct efx_nic *efx, bool may_keep_eventq)
BUG_ON(efx->state == STATE_DISABLED);
+ if (efx->eeh_disabled_legacy_irq) {
+ enable_irq(efx->legacy_irq);
+ efx->eeh_disabled_legacy_irq = false;
+ }
if (efx->legacy_irq)
efx->legacy_irq_enabled = true;
efx_nic_enable_interrupts(efx);
@@ -2365,7 +2370,7 @@ out:
* Returns 0 if the recovery mechanisms are unsuccessful.
* Returns a non-zero value otherwise.
*/
-static int efx_try_recovery(struct efx_nic *efx)
+int efx_try_recovery(struct efx_nic *efx)
{
#ifdef CONFIG_EEH
/* A PCI error can occur and not be seen by EEH because nothing