[Skiboot] [PATCH 2/3] hw/phb3: Fix condition to disable ECRC
Gavin Shan
gwshan at linux.vnet.ibm.com
Wed Mar 22 14:04:00 AEDT 2017
In commit 60ce59ccd0e9 ("hw/phb3: Disable ECRC on Broadcom adapter
behind PMC switch"), the ECRC functionality is disabled on BCM57800
when it seats behind a BMC switch. So the logical connectives is
"&&" instead of "||".
This fixes the wrong logical connectives. Also, the code is refactored
a bit to avoid touching more code when applying this to another PCI
adapter in future.
Cc: stable # 5.4.0+
Fixes: 60ce59ccd0e9 ("hw/phb3: Disable ECRC on Broadcom adapter behind PMC switch"
Reported-by: Mark E Schreiter <markes at us.ibm.com>
Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
hw/phb3.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/phb3.c b/hw/phb3.c
index 89d66f3..6040891 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -537,9 +537,11 @@ static inline bool phb3_endpoint_report_ecrc(struct pci_device *pd)
* Otherwise, the Broadcom ethernet adapter's config space
* can't be accessed because of frozen PE error even after
* the frozen PE error is cleared.
+ *
+ * 0x168a14e4 Broadcom bnx2x CHIP_NUM_57800
*/
- if (pd->vdid == 0x168a14e4 || // Broadcom bnx2x CHIP_NUM_57800
- pd->parent->vdid == 0x854611f8)
+ if (pd->parent->vdid == 0x854611f8 &&
+ pd->vdid == 0x168a14e4)
return false;
return true;
--
2.7.4
More information about the Skiboot
mailing list