diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2015-06-24 17:08:14 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-07-03 07:23:39 +1000 |
commit | aa617925bb0e21550ec69b625cb9bd48f66655fb (patch) | |
tree | 66b470a927cbaf51548b25a7df311bc77f55d391 /hw/phb3.c | |
parent | a8ac0fc842ab0f28335fdb75d941e06760590c66 (diff) | |
download | talos-skiboot-aa617925bb0e21550ec69b625cb9bd48f66655fb.tar.gz talos-skiboot-aa617925bb0e21550ec69b625cb9bd48f66655fb.zip |
hw/phb3: Invalidate RTC on updating RTT
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@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.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -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; } |