Re: [PATCH 11/22] aerdrv: remove magical ROOT_ERR_STATUS_MASKS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hidetoshi Seto wrote:
Make it clear that we examine four *_RCV bits.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
---
 drivers/pci/pcie/aer/aerdrv.c |    3 ++-
 drivers/pci/pcie/aer/aerdrv.h |    3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index e15bfa2..a76b4d4 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -96,7 +96,8 @@ irqreturn_t aer_irq(int irq, void *context)
/* Read error status */
 	pci_read_config_dword(pdev->port, pos + PCI_ERR_ROOT_STATUS, &status);
-	if (!(status & ROOT_ERR_STATUS_MASKS)) {
+	if (!(status & (PCI_ERR_ROOT_UNCOR_RCV|PCI_ERR_ROOT_MULTI_UNCOR_RCV|
+			PCI_ERR_ROOT_COR_RCV|PCI_ERR_ROOT_MULTI_COR_RCV))) {
 		spin_unlock_irqrestore(&rpc->e_lock, flags);
 		return IRQ_NONE;
 	}
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h
index b6fc538..f0029a0 100644
--- a/drivers/pci/pcie/aer/aerdrv.h
+++ b/drivers/pci/pcie/aer/aerdrv.h
@@ -17,9 +17,6 @@
 #define AER_FATAL			1
 #define AER_CORRECTABLE			2
-/* Root Error Status Register Bits */
-#define ROOT_ERR_STATUS_MASKS		0x0f
-

How about changing ROOT_ERR_STATUS_MASK as follows instead of removing it.

#define ROOT_ERR_STATUS_MASK    (PCI_ERR_ROOT_UNCOR_RCV |               \
                                PCI_ERR_ROOT_MULTI_UNCOR_RCV |         \
                                PCI_ERR_ROOT_COR_RCV |                 \
                                PCI_ERR_ROOT_MULTI_COR_RCV)

Thanks,
Kenji Kaneshige


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux