From: Stephen Hemminger Date: Fri, 17 Jul 2015 00:33:22 +0000 (-0700) Subject: fm10k: fix interrupt fault handling X-Git-Tag: spdx-start~8662 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5fd61965ef818cccd9df309e1a54d9249a707dda;p=dpdk.git fm10k: fix interrupt fault handling The fm10k driver was reading the interrupt cause register but then using the interrupt mask register defines to look at the bits. The result is that if a fault happens, the driver would never clear the fault and would get into an infinite cycle of interrupts. Note: I don't work for Intel or have the hardware manuals (probably requires NDA anyway), but this looks logical and matches how the known working Linux driver handles these bits. Signed-off-by: Stephen Hemminger Acked-by: Jing Chen --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 5aa13f0cfe..5cb65c3b25 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1779,7 +1779,7 @@ fm10k_dev_handle_fault(struct fm10k_hw *hw, uint32_t eicr) const char *estr = "Unknown error"; /* Process PCA fault */ - if (eicr & FM10K_EIMR_PCA_FAULT) { + if (eicr & FM10K_EICR_PCA_FAULT) { err = fm10k_get_fault(hw, FM10K_PCA_FAULT, &fault); if (err) goto error; @@ -1807,7 +1807,7 @@ fm10k_dev_handle_fault(struct fm10k_hw *hw, uint32_t eicr) } /* Process THI fault */ - if (eicr & FM10K_EIMR_THI_FAULT) { + if (eicr & FM10K_EICR_THI_FAULT) { err = fm10k_get_fault(hw, FM10K_THI_FAULT, &fault); if (err) goto error; @@ -1825,7 +1825,7 @@ fm10k_dev_handle_fault(struct fm10k_hw *hw, uint32_t eicr) } /* Process FUM fault */ - if (eicr & FM10K_EIMR_FUM_FAULT) { + if (eicr & FM10K_EICR_FUM_FAULT) { err = fm10k_get_fault(hw, FM10K_FUM_FAULT, &fault); if (err) goto error;