Commit 3eea3337 authored by Divy Le Ray's avatar Divy Le Ray Committed by David S. Miller

cxgb3 - log and clear PEX errors

Clear pciE PEX errors late at module load time.
Log details when PEX errors occur.
Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent a5a3b460
...@@ -1358,6 +1358,10 @@ static void pcie_intr_handler(struct adapter *adapter) ...@@ -1358,6 +1358,10 @@ static void pcie_intr_handler(struct adapter *adapter)
{0} {0}
}; };
if (t3_read_reg(adapter, A_PCIE_INT_CAUSE) & F_PEXERR)
CH_ALERT(adapter, "PEX error code 0x%x\n",
t3_read_reg(adapter, A_PCIE_PEX_ERR));
if (t3_handle_intr_status(adapter, A_PCIE_INT_CAUSE, PCIE_INTR_MASK, if (t3_handle_intr_status(adapter, A_PCIE_INT_CAUSE, PCIE_INTR_MASK,
pcie_intr_info, adapter->irq_stats)) pcie_intr_info, adapter->irq_stats))
t3_fatal_err(adapter); t3_fatal_err(adapter);
...@@ -1809,6 +1813,8 @@ void t3_intr_clear(struct adapter *adapter) ...@@ -1809,6 +1813,8 @@ void t3_intr_clear(struct adapter *adapter)
for (i = 0; i < ARRAY_SIZE(cause_reg_addr); ++i) for (i = 0; i < ARRAY_SIZE(cause_reg_addr); ++i)
t3_write_reg(adapter, cause_reg_addr[i], 0xffffffff); t3_write_reg(adapter, cause_reg_addr[i], 0xffffffff);
if (is_pcie(adapter))
t3_write_reg(adapter, A_PCIE_PEX_ERR, 0xffffffff);
t3_write_reg(adapter, A_PL_INT_CAUSE0, 0xffffffff); t3_write_reg(adapter, A_PL_INT_CAUSE0, 0xffffffff);
t3_read_reg(adapter, A_PL_INT_CAUSE0); /* flush */ t3_read_reg(adapter, A_PL_INT_CAUSE0); /* flush */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment