aboutsummaryrefslogtreecommitdiff
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2015-10-02 16:42:02 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-10-07 18:01:30 +1100
commit2bb9c4bb257fe67f00a578cdd1bc41b6270ea27d (patch)
tree59ffc878f241676bf2fec995dcf1251e34507bb6 /hw/phb3.c
parentf1f7fe1590cf024fc767e563124f3ff343fc06ef (diff)
downloadskiboot-2bb9c4bb257fe67f00a578cdd1bc41b6270ea27d.zip
skiboot-2bb9c4bb257fe67f00a578cdd1bc41b6270ea27d.tar.gz
skiboot-2bb9c4bb257fe67f00a578cdd1bc41b6270ea27d.tar.bz2
PHB3: Fix unexpected ER (all) on errinjct by PCI config
This issue was found on SRIOV VFs initially and then I checked with Chad Larson who put much efforts to sort it out. As more experiments I did, the issue isn't limited to SRIOV VFs. That means the isue can be seen on non-SRIOV adapter as well: Firstly, I ensure that outbound request discard interrupt (bit#12) is enabled in PCI Express Port Interrupt Enable Register (offset: 0x558). Then injecting error to root complex by PAPR Error Injection Registers with PCI config read. Eventually, all (256) PEs are frozen. After clearing the bit, the target PE#0 is frozen as expected. As Chad pointed, the interrupt ("outbound request discard") is always raised during the error injection, which is translated to UTL's primary interrupt to freeze all (256) PEs. This drops bit#12 of PCI Express Port Interrupt Enable Register to avoid the UTL's primary interrupt caused by outbound request discard, in order to avoid freezing all (256) PEs during error injection via PCI config read. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index 7d1c9fe..a346040 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -1946,7 +1946,7 @@ static void phb3_setup_for_link_up(struct phb3 *p)
/* Clear spurrious errors and enable PCIE port interrupts */
out_be64(p->regs + UTL_PCIE_PORT_STATUS, 0xffdfffffffffffff);
- out_be64(p->regs + UTL_PCIE_PORT_IRQ_EN, 0xad5a800000000000);
+ out_be64(p->regs + UTL_PCIE_PORT_IRQ_EN, 0xad52800000000000);
/* Mark link up */
p->has_link = true;
@@ -3749,7 +3749,7 @@ static void phb3_init_utl(struct phb3 *p)
out_be64(p->regs + UTL_PCIE_PORT_ERROR_SEV, 0x5039000000000000);
if (p->has_link)
- out_be64(p->regs + UTL_PCIE_PORT_IRQ_EN, 0xad5a800000000000);
+ out_be64(p->regs + UTL_PCIE_PORT_IRQ_EN, 0xad52800000000000);
else
out_be64(p->regs + UTL_PCIE_PORT_IRQ_EN, 0xad42800000000000);