diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2018-12-06 10:50:13 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-12-10 22:21:12 -0600 |
commit | 3e3defbf73e3603c5dc6f168c3de764c14b50e27 (patch) | |
tree | 6eb8f64ed9882fc513177b26cc6a8f03e1392d2f /hw/npu2.c | |
parent | 003ccd5775161d352c53cac3d00c6283eb036ffc (diff) | |
download | skiboot-3e3defbf73e3603c5dc6f168c3de764c14b50e27.zip skiboot-3e3defbf73e3603c5dc6f168c3de764c14b50e27.tar.gz skiboot-3e3defbf73e3603c5dc6f168c3de764c14b50e27.tar.bz2 |
npu2: Return sensible PCI error when not frozen
The current kernel calls OPAL_PCI_EEH_FREEZE_STATUS with an uninitialized
@pci_error_type parameter and then analyzes it even if the OPAL call
returned OPAL_SUCCESS. This is results in unexpected EEH events and NPU
freezes.
This initializes @pci_error_type and @severity to known safe values.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/npu2.c')
-rw-r--r-- | hw/npu2.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1181,8 +1181,8 @@ static struct pci_slot *npu2_slot_create(struct phb *phb) int64_t npu2_freeze_status(struct phb *phb __unused, uint64_t pe_number __unused, uint8_t *freeze_state, - uint16_t *pci_error_type __unused, - uint16_t *severity __unused, + uint16_t *pci_error_type, + uint16_t *severity, uint64_t *phb_status __unused) { /* @@ -1192,6 +1192,10 @@ int64_t npu2_freeze_status(struct phb *phb __unused, * it keeps the skiboot PCI enumeration going. */ *freeze_state = OPAL_EEH_STOPPED_NOT_FROZEN; + *pci_error_type = OPAL_EEH_NO_ERROR; + if (severity) + *severity = OPAL_EEH_SEV_NO_ERROR; + return OPAL_SUCCESS; } |