Skip to content

Commit 6048410

Browse files
zhangjiarandavem330
authored andcommitted
net: hns3: Add configuration of TM QCN error event
Add configuration of interrupt type and fifo interrupt enable of TM QCN error event if enabled, otherwise this event will not be reported when there is error. Fixes: d914971 ("net: hns3: remove redundant query in hclge_config_tm_hw_err_int()") Signed-off-by: Jiaran Zhang <[email protected]> Signed-off-by: Guangbin Huang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 55161e6 commit 6048410

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,11 @@ static int hclge_config_tm_hw_err_int(struct hclge_dev *hdev, bool en)
15601560

15611561
/* configure TM QCN hw errors */
15621562
hclge_cmd_setup_basic_desc(&desc, HCLGE_TM_QCN_MEM_INT_CFG, false);
1563-
if (en)
1563+
desc.data[0] = cpu_to_le32(HCLGE_TM_QCN_ERR_INT_TYPE);
1564+
if (en) {
1565+
desc.data[0] |= cpu_to_le32(HCLGE_TM_QCN_FIFO_INT_EN);
15641566
desc.data[1] = cpu_to_le32(HCLGE_TM_QCN_MEM_ERR_INT_EN);
1567+
}
15651568

15661569
ret = hclge_cmd_send(&hdev->hw, &desc, 1);
15671570
if (ret)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
#define HCLGE_PPP_MPF_ECC_ERR_INT3_EN 0x003F
5151
#define HCLGE_PPP_MPF_ECC_ERR_INT3_EN_MASK 0x003F
5252
#define HCLGE_TM_SCH_ECC_ERR_INT_EN 0x3
53+
#define HCLGE_TM_QCN_ERR_INT_TYPE 0x29
54+
#define HCLGE_TM_QCN_FIFO_INT_EN 0xFFFF00
5355
#define HCLGE_TM_QCN_MEM_ERR_INT_EN 0xFFFFFF
5456
#define HCLGE_NCSI_ERR_INT_EN 0x3
5557
#define HCLGE_NCSI_ERR_INT_TYPE 0x9

0 commit comments

Comments
 (0)