diff options
author | Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> | 2016-08-30 06:39:16 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-13 10:17:08 -0400 |
commit | c2a7ff18edcdb9b04c655f361b0385bdbe3be935 (patch) | |
tree | d697b2c852f90da577f0e8aed1385da8b95fdcdf | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) |
PCI: xilinx-nwl: Expand error logging
The current driver logs PCIe core errors. Add logging for individual core
events.
[bhelgaas: changelog]
Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/host/pcie-xilinx-nwl.c | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c index 0b597d9190b4..dfdf58f20b19 100644 --- a/drivers/pci/host/pcie-xilinx-nwl.c +++ b/drivers/pci/host/pcie-xilinx-nwl.c | |||
@@ -85,10 +85,15 @@ | |||
85 | #define MSGF_MISC_SR_MASTER_ERR BIT(5) | 85 | #define MSGF_MISC_SR_MASTER_ERR BIT(5) |
86 | #define MSGF_MISC_SR_I_ADDR_ERR BIT(6) | 86 | #define MSGF_MISC_SR_I_ADDR_ERR BIT(6) |
87 | #define MSGF_MISC_SR_E_ADDR_ERR BIT(7) | 87 | #define MSGF_MISC_SR_E_ADDR_ERR BIT(7) |
88 | #define MSGF_MISC_SR_UR_DETECT BIT(20) | 88 | #define MSGF_MISC_SR_FATAL_AER BIT(16) |
89 | 89 | #define MSGF_MISC_SR_NON_FATAL_AER BIT(17) | |
90 | #define MSGF_MISC_SR_PCIE_CORE GENMASK(18, 16) | 90 | #define MSGF_MISC_SR_CORR_AER BIT(18) |
91 | #define MSGF_MISC_SR_PCIE_CORE_ERR GENMASK(31, 22) | 91 | #define MSGF_MISC_SR_UR_DETECT BIT(20) |
92 | #define MSGF_MISC_SR_NON_FATAL_DEV BIT(22) | ||
93 | #define MSGF_MISC_SR_FATAL_DEV BIT(23) | ||
94 | #define MSGF_MISC_SR_LINK_DOWN BIT(24) | ||
95 | #define MSGF_MSIC_SR_LINK_AUTO_BWIDTH BIT(25) | ||
96 | #define MSGF_MSIC_SR_LINK_BWIDTH BIT(26) | ||
92 | 97 | ||
93 | #define MSGF_MISC_SR_MASKALL (MSGF_MISC_SR_RXMSG_AVAIL | \ | 98 | #define MSGF_MISC_SR_MASKALL (MSGF_MISC_SR_RXMSG_AVAIL | \ |
94 | MSGF_MISC_SR_RXMSG_OVER | \ | 99 | MSGF_MISC_SR_RXMSG_OVER | \ |
@@ -96,9 +101,15 @@ | |||
96 | MSGF_MISC_SR_MASTER_ERR | \ | 101 | MSGF_MISC_SR_MASTER_ERR | \ |
97 | MSGF_MISC_SR_I_ADDR_ERR | \ | 102 | MSGF_MISC_SR_I_ADDR_ERR | \ |
98 | MSGF_MISC_SR_E_ADDR_ERR | \ | 103 | MSGF_MISC_SR_E_ADDR_ERR | \ |
104 | MSGF_MISC_SR_FATAL_AER | \ | ||
105 | MSGF_MISC_SR_NON_FATAL_AER | \ | ||
106 | MSGF_MISC_SR_CORR_AER | \ | ||
99 | MSGF_MISC_SR_UR_DETECT | \ | 107 | MSGF_MISC_SR_UR_DETECT | \ |
100 | MSGF_MISC_SR_PCIE_CORE | \ | 108 | MSGF_MISC_SR_NON_FATAL_DEV | \ |
101 | MSGF_MISC_SR_PCIE_CORE_ERR) | 109 | MSGF_MISC_SR_FATAL_DEV | \ |
110 | MSGF_MISC_SR_LINK_DOWN | \ | ||
111 | MSGF_MSIC_SR_LINK_AUTO_BWIDTH | \ | ||
112 | MSGF_MSIC_SR_LINK_BWIDTH) | ||
102 | 113 | ||
103 | /* Legacy interrupt status mask bits */ | 114 | /* Legacy interrupt status mask bits */ |
104 | #define MSGF_LEG_SR_INTA BIT(0) | 115 | #define MSGF_LEG_SR_INTA BIT(0) |
@@ -291,8 +302,29 @@ static irqreturn_t nwl_pcie_misc_handler(int irq, void *data) | |||
291 | dev_err(pcie->dev, | 302 | dev_err(pcie->dev, |
292 | "In Misc Egress address translation error\n"); | 303 | "In Misc Egress address translation error\n"); |
293 | 304 | ||
294 | if (misc_stat & MSGF_MISC_SR_PCIE_CORE_ERR) | 305 | if (misc_stat & MSGF_MISC_SR_FATAL_AER) |
295 | dev_err(pcie->dev, "PCIe Core error\n"); | 306 | dev_err(pcie->dev, "Fatal Error in AER Capability\n"); |
307 | |||
308 | if (misc_stat & MSGF_MISC_SR_NON_FATAL_AER) | ||
309 | dev_err(pcie->dev, "Non-Fatal Error in AER Capability\n"); | ||
310 | |||
311 | if (misc_stat & MSGF_MISC_SR_CORR_AER) | ||
312 | dev_err(pcie->dev, "Correctable Error in AER Capability\n"); | ||
313 | |||
314 | if (misc_stat & MSGF_MISC_SR_UR_DETECT) | ||
315 | dev_err(pcie->dev, "Unsupported request Detected\n"); | ||
316 | |||
317 | if (misc_stat & MSGF_MISC_SR_NON_FATAL_DEV) | ||
318 | dev_err(pcie->dev, "Non-Fatal Error Detected\n"); | ||
319 | |||
320 | if (misc_stat & MSGF_MISC_SR_FATAL_DEV) | ||
321 | dev_err(pcie->dev, "Fatal Error Detected\n"); | ||
322 | |||
323 | if (misc_stat & MSGF_MSIC_SR_LINK_AUTO_BWIDTH) | ||
324 | dev_info(pcie->dev, "Link Autonomous Bandwidth Management Status bit set\n"); | ||
325 | |||
326 | if (misc_stat & MSGF_MSIC_SR_LINK_BWIDTH) | ||
327 | dev_info(pcie->dev, "Link Bandwidth Management Status bit set\n"); | ||
296 | 328 | ||
297 | /* Clear misc interrupt status */ | 329 | /* Clear misc interrupt status */ |
298 | nwl_bridge_writel(pcie, misc_stat, MSGF_MISC_STATUS); | 330 | nwl_bridge_writel(pcie, misc_stat, MSGF_MISC_STATUS); |