Skip to content

Commit 8fc9d3e

Browse files
shijujose4davem330
authored andcommitted
net: hns3: handle hw errors of PPP PF
This patch handles PF hw errors of PPP(Programmable Packet Processor). Signed-off-by: Shiju Jose <[email protected]> Signed-off-by: Salil Mehta <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7838f90 commit 8fc9d3e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ static const struct hclge_hw_error hclge_ppp_mpf_abnormal_int_st1[] = {
112112
{ /* sentinel */ }
113113
};
114114

115-
static const struct hclge_hw_error hclge_ppp_pf_int[] = {
116-
{ .int_msk = BIT(0), .msg = "Tx_vlan_tag_err" },
115+
static const struct hclge_hw_error hclge_ppp_pf_abnormal_int[] = {
116+
{ .int_msk = BIT(0), .msg = "tx_vlan_tag_err" },
117117
{ .int_msk = BIT(1), .msg = "rss_list_tc_unassigned_queue_err" },
118118
{ /* sentinel */ }
119119
};
@@ -385,12 +385,16 @@ static int hclge_config_ppp_error_interrupt(struct hclge_dev *hdev, u32 cmd,
385385
cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT0_EN);
386386
desc[0].data[1] =
387387
cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT1_EN);
388+
desc[0].data[4] = cpu_to_le32(HCLGE_PPP_PF_ERR_INT_EN);
388389
}
389390

390391
desc[1].data[0] =
391392
cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT0_EN_MASK);
392393
desc[1].data[1] =
393394
cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT1_EN_MASK);
395+
if (hdev->pdev->revision >= 0x21)
396+
desc[1].data[2] =
397+
cpu_to_le32(HCLGE_PPP_PF_ERR_INT_EN_MASK);
394398
} else if (cmd == HCLGE_PPP_CMD1_INT_CMD) {
395399
if (en) {
396400
desc[0].data[0] =
@@ -850,6 +854,13 @@ int hclge_handle_hw_msix_error(struct hclge_dev *hdev,
850854
goto msi_error;
851855
}
852856

857+
/* read and log PPP PF errors */
858+
desc_data = (__le32 *)&desc[2];
859+
status = le32_to_cpu(*desc_data);
860+
if (status)
861+
hclge_log_error(dev, "PPP_PF_ABNORMAL_INT_ST0",
862+
&hclge_ppp_pf_abnormal_int[0], status);
863+
853864
/* clear all PF MSIx errors */
854865
hclge_cmd_reuse_desc(&desc[0], false);
855866
desc[0].flag |= cpu_to_le16(HCLGE_CMD_FLAG_NEXT);

0 commit comments

Comments
 (0)