Skip to contentSkip to conversation

pci: Provide Multiple Error Received support on AER

PATCH In review Zhang, Yanmin 2 participants 2 messages Jun 16, 2009 PCI

lore
Share & tools
lore
#0 lore raw

PATCH v5 3/3 pci: Provide Multiple Error Received support on AER

When a root port receive the same errors more than once before kernel
process them, the Multiple Error Messages Received flags are set by
hardware. Because root port could only save one kind of correctable error source id and another uncorrectable error source id at the same time, so the second message sender id is lost if the 2 messages are sent from 2 different devices. Below patch searches all devices under the root port when multiple messages are received.

---

drivers/pci/pcie/aer/aerdrv.h +3 -1
index dadf492..bbd7428 100644
@@ -57,8 +57,10 @@ struct header_log_regs {
 	unsigned int dw3;
 };
 
+#define AER_MAX_MULTI_ERR_DEVICES	5	/* Not likely to have more */
 struct aer_err_info {
-	struct pci_dev *dev;
+	struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES];
+	int error_dev_num;
 	u16 id;
 	int severity;			/* 0:NONFATAL | 1:FATAL | 2:COR */
 	int flags;
drivers/pci/pcie/aer/aerdrv_core.c +66 -22

131 lines not on this page · raw message

#1 lore raw
Quoted 9 lines · Yanmin

When a root port receive the same errors more than once before
kernel process them, the Multiple Error Messages Received flags are set by hardware. Because root port could only save one kind of correctable error source id and another uncorrectable error source id at the same time, so the second message sender id is lost if the 2 messages are sent from 2 different devices. Below patch searches all devices under the root port when multiple messages are received.

Thanks for rebasing Yanmin; I applied this to my linux-next branch with Andrew's reviewed-bys.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center