aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2018-09-11 11:07:37 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-09-17 21:39:00 -0500
commit34ceb75f282952b40b615558f947c3fee533b1d4 (patch)
treec96f21a2e76c6e510a28f4227340bd8f3280b24b /hw
parentf835684365273c5ff1b7c700ddc0f9c1a859363f (diff)
downloadskiboot-34ceb75f282952b40b615558f947c3fee533b1d4.zip
skiboot-34ceb75f282952b40b615558f947c3fee533b1d4.tar.gz
skiboot-34ceb75f282952b40b615558f947c3fee533b1d4.tar.bz2
hw/npu2-opencapi: Fix setting of supported OpenCAPI templates
In opal_npu_tl_set(), we made a typo that means the OPAL_NPU_TL_SET call may not clear the enable bits for templates that were previously enabled but are now disabled. Fix the typo so we clear NPU2_OTL_CONFIG1_TX_TEMP2_EN as well as TEMP{1,3}_EN. Reported-by: Tyler Seredynski <tseredynski@gmail.com> Fixes: cd8b82a8e83ed ("npu2-opencapi: Add OpenCAPI OPAL API calls") Cc: stable Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/npu2-opencapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
index 57c2f2f..4d30aa6 100644
--- a/hw/npu2-opencapi.c
+++ b/hw/npu2-opencapi.c
@@ -2007,8 +2007,8 @@ static int64_t opal_npu_tl_set(uint64_t phb_id, uint32_t __unused bdfn,
reg = npu2_scom_read(dev->npu->chip_id, dev->npu->xscom_base,
NPU2_OTL_CONFIG1(stack, block),
NPU2_MISC_DA_LEN_8B);
- reg &= ~(NPU2_OTL_CONFIG1_TX_TEMP1_EN | NPU2_OTL_CONFIG1_TX_TEMP3_EN |
- NPU2_OTL_CONFIG1_TX_TEMP1_EN);
+ reg &= ~(NPU2_OTL_CONFIG1_TX_TEMP1_EN | NPU2_OTL_CONFIG1_TX_TEMP2_EN |
+ NPU2_OTL_CONFIG1_TX_TEMP3_EN);
for (i = 0; i < 4; i++) {
/* Skip template 0 as it is implicitly enabled */
if (i && is_template_supported(i, capabilities))