[Skiboot] [PATCH 2/2] hw/phb3: Invalidate RTC on updating RTT
Gavin Shan
gwshan at linux.vnet.ibm.com
Wed Jun 24 17:08:14 AEST 2015
When enabling (x+1) VFs on Mellanox adapter after disabling its
SRIOV capability, which has been enabled with (x) VFs. We might
hit EEH error caused by bogus PE number in RTC. The reason how
the bogus PE number shows up in RTC isn't known yet. The patch
to invalidate the entire RTC on updating RTT, as workaround,
helps avoiding the problem:
# lspci -s 0002:01:00.0
0002:01:00.0 Ethernet controller: Mellanox Technologies \
MT27500 Family [ConnectX-3]
BZ: 125893
Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
hw/phb3.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/hw/phb3.c b/hw/phb3.c
index 3444ac9..9b4444c 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -1794,8 +1794,6 @@ static int64_t phb3_set_pe(struct phb *phb,
memset(p->rte_cache, 0, RTT_TABLE_SIZE);
}
memcpy((void *)p->tbl_rtt, p->rte_cache, RTT_TABLE_SIZE);
- out_be64(p->regs + PHB_RTC_INVALIDATE,
- PHB_RTC_INVALIDATE_ALL);
} else {
rte = (uint16_t *)p->tbl_rtt;
for (idx = 0; idx < RTT_TABLE_ENTRIES; idx++, rte++) {
@@ -1803,17 +1801,12 @@ static int64_t phb3_set_pe(struct phb *phb,
continue;
p->rte_cache[idx] = (action ? pe_num : 0);
*rte = p->rte_cache[idx];
-
- /*
- * We might not need invalidate RTC one by one since
- * the RTT is expected to be updated in batch mode
- * in host kernel.
- */
- out_be64(p->regs + PHB_RTC_INVALIDATE,
- SETFIELD(PHB_RTC_INVALIDATE_RID, 0ul, idx));
}
}
+ /* Invalidate the entire RTC */
+ out_be64(p->regs + PHB_RTC_INVALIDATE, PHB_RTC_INVALIDATE_ALL);
+
return OPAL_SUCCESS;
}
--
2.1.0
More information about the Skiboot
mailing list