Skip to contentSkip to conversation

fm10K: fix interrupt fault handling

PATCH Applied Stephen Hemminger 3 participants 3 messages Jul 17, 2015 – Jul 22, 2015 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/fm10k/fm10k_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +3 -3
index 493b6f9..665d852 100644
@@ -1710,7 +1710,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;
@@ -1738,7 +1738,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;
@@ -1756,7 +1756,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;
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw

Hi, Stephen,

Quoted 12 lines

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, July 17, 2015 8:33 AM
To: Qiu, Michael; Chen, Jing D
Cc: [email protected]; Stephen Hemminger
Subject: [PATCH] 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.

Quoted 5 lines

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.

Good catch! Thanks!

#2 lore raw
Quoted 9 lines
Quoted 9 lines

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.

Quoted 5 lines
Quoted 1 line

Good catch! Thanks!

Applied, thanks