Skip to content

Commit

Permalink
npu3: Delay enablement of DL parity checking
Browse files Browse the repository at this point in the history
Currently, we turn on TX and PRI parity checking of the DL during NPU
initialization, while RX parity checking is not enabled until after link
training.

This behavior was prescribed for npu2, but on npu3 systems the logic has
changed such that we're getting early parity error checkstops.

To fix, only set the TX and PRI enable bits after training, consistent
with RX.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
  • Loading branch information
rarbab authored and oohal committed Aug 23, 2019
1 parent f945230 commit 38e1c73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 8 additions & 4 deletions hw/npu3-hw-procedures.c
Expand Up @@ -557,9 +557,11 @@ static uint32_t reset_ntl(struct npu3_dev *dev)
val = SETFIELD(NPU3_NTL_PRI_CFG_NDL, 0ull, dev->index);
npu3_write(npu, NPU3_NTL_PRI_CFG(dev->index), val);

/* Disable RX parity checking */
/* Disable parity checking */
val = npu3_read(npu, NPU3_NTL_MISC_CFG2(dev->index));
val &= ~NPU3_NTL_MISC_CFG2_NDL_RX_PARITY_ENA;
val &= ~(NPU3_NTL_MISC_CFG2_NDL_RX_PARITY_ENA |
NPU3_NTL_MISC_CFG2_NDL_TX_PARITY_ENA |
NPU3_NTL_MISC_CFG2_NDL_PRI_PARITY_ENA);
npu3_write(npu, NPU3_NTL_MISC_CFG2(dev->index), val);

if (dev->type == NPU3_DEV_TYPE_NVLINK)
Expand Down Expand Up @@ -636,9 +638,11 @@ static uint32_t reset_ntl_finish(struct npu3_dev *dev) {
if (npu3_dev_fence_get(dev) != NPU3_NTL_CQ_FENCE_STATUS_NONE)
return NPU3_PROC_INPROGRESS;

/* Enable RX parity checking */
/* Enable parity checking */
val = npu3_read(npu, NPU3_NTL_MISC_CFG2(dev->index));
val |= NPU3_NTL_MISC_CFG2_NDL_RX_PARITY_ENA;
val |= NPU3_NTL_MISC_CFG2_NDL_RX_PARITY_ENA |
NPU3_NTL_MISC_CFG2_NDL_TX_PARITY_ENA |
NPU3_NTL_MISC_CFG2_NDL_PRI_PARITY_ENA;
npu3_write(npu, NPU3_NTL_MISC_CFG2(dev->index), val);

if (dev->type == NPU3_DEV_TYPE_NVLINK)
Expand Down
2 changes: 0 additions & 2 deletions hw/npu3-nvlink.c
Expand Up @@ -928,8 +928,6 @@ static void npu3_dev_init_hw(struct npu3_dev *dev)
reg = NPU3_NTL_MISC_CFG2(dev->index);
val = npu3_read(npu, reg);
val |= NPU3_NTL_MISC_CFG2_BRICK_ENABLE |
NPU3_NTL_MISC_CFG2_NDL_TX_PARITY_ENA |
NPU3_NTL_MISC_CFG2_NDL_PRI_PARITY_ENA |
NPU3_NTL_MISC_CFG2_RCV_CREDIT_OVERFLOW_ENA;
npu3_write(npu, reg, val);
}
Expand Down

0 comments on commit 38e1c73

Please sign in to comment.