Skip to content

Commit 12edfdf

Browse files
committed
Merge branch 'hns3-error-handling'
Salil Mehta says: ==================== net: hns3: Additions/optimizations related to HNS3 H/W err handling This patch set primarily does following addtions and optimizations related to error handling in HNS3 Ethernet driver: 1. Name changes for enable and process functions and minor loop optimizations. [PATCH 1-6] 2. Modify query and clearing of RAS errors using new set of commands because modules specific commands for clearing RCB PPP PF, SSU are obselete. [PATCH 7] 3. Deletes logging 1-bit errors for RAS in HNS3 driver as these never get reported to the driver. [PATCH 8] 4. Add handling of NIC hw errors reported through MSIx rather than PCIe AER channel. [PATCH 9] 5. Add handling for the HW RAS and MSIx errors in the modules MAC, PPP PF, MSIx SRAM, RCB and SSU. [PATCH 10-13] 6. Add handling of RoCEE RAS errors. [PATCH 14] ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 9f4c2cf + 630ba00 commit 12edfdf

File tree

7 files changed

+1066
-656
lines changed

7 files changed

+1066
-656
lines changed

drivers/net/ethernet/hisilicon/hns3/hnae3.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ enum hnae3_reset_type {
136136
HNAE3_CORE_RESET,
137137
HNAE3_GLOBAL_RESET,
138138
HNAE3_IMP_RESET,
139+
HNAE3_UNKNOWN_RESET,
139140
HNAE3_NONE_RESET,
140141
};
141142

@@ -454,7 +455,7 @@ struct hnae3_ae_ops {
454455
int (*restore_fd_rules)(struct hnae3_handle *handle);
455456
void (*enable_fd)(struct hnae3_handle *handle, bool enable);
456457
int (*dbg_run_cmd)(struct hnae3_handle *handle, char *cmd_buf);
457-
pci_ers_result_t (*process_hw_error)(struct hnae3_ae_dev *ae_dev);
458+
pci_ers_result_t (*handle_hw_ras_error)(struct hnae3_ae_dev *ae_dev);
458459
bool (*get_hw_reset_stat)(struct hnae3_handle *handle);
459460
bool (*ae_dev_resetting)(struct hnae3_handle *handle);
460461
unsigned long (*ae_dev_reset_cnt)(struct hnae3_handle *handle);

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,8 +1828,8 @@ static pci_ers_result_t hns3_error_detected(struct pci_dev *pdev,
18281828
return PCI_ERS_RESULT_NONE;
18291829
}
18301830

1831-
if (ae_dev->ops->process_hw_error)
1832-
ret = ae_dev->ops->process_hw_error(ae_dev);
1831+
if (ae_dev->ops->handle_hw_ras_error)
1832+
ret = ae_dev->ops->handle_hw_ras_error(ae_dev);
18331833
else
18341834
return PCI_ERS_RESULT_NONE;
18351835

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,26 +215,29 @@ enum hclge_opcode_type {
215215
HCLGE_OPC_SFP_GET_SPEED = 0x7104,
216216

217217
/* Error INT commands */
218+
HCLGE_MAC_COMMON_INT_EN = 0x030E,
218219
HCLGE_TM_SCH_ECC_INT_EN = 0x0829,
219-
HCLGE_TM_SCH_ECC_ERR_RINT_CMD = 0x082d,
220-
HCLGE_TM_SCH_ECC_ERR_RINT_CE = 0x082f,
221-
HCLGE_TM_SCH_ECC_ERR_RINT_NFE = 0x0830,
222-
HCLGE_TM_SCH_ECC_ERR_RINT_FE = 0x0831,
223-
HCLGE_TM_SCH_MBIT_ECC_INFO_CMD = 0x0833,
220+
HCLGE_SSU_ECC_INT_CMD = 0x0989,
221+
HCLGE_SSU_COMMON_INT_CMD = 0x098C,
222+
HCLGE_PPU_MPF_ECC_INT_CMD = 0x0B40,
223+
HCLGE_PPU_MPF_OTHER_INT_CMD = 0x0B41,
224+
HCLGE_PPU_PF_OTHER_INT_CMD = 0x0B42,
224225
HCLGE_COMMON_ECC_INT_CFG = 0x1505,
225-
HCLGE_IGU_EGU_TNL_INT_QUERY = 0x1802,
226+
HCLGE_QUERY_RAS_INT_STS_BD_NUM = 0x1510,
227+
HCLGE_QUERY_CLEAR_MPF_RAS_INT = 0x1511,
228+
HCLGE_QUERY_CLEAR_PF_RAS_INT = 0x1512,
229+
HCLGE_QUERY_MSIX_INT_STS_BD_NUM = 0x1513,
230+
HCLGE_QUERY_CLEAR_ALL_MPF_MSIX_INT = 0x1514,
231+
HCLGE_QUERY_CLEAR_ALL_PF_MSIX_INT = 0x1515,
232+
HCLGE_CONFIG_ROCEE_RAS_INT_EN = 0x1580,
233+
HCLGE_QUERY_CLEAR_ROCEE_RAS_INT = 0x1581,
234+
HCLGE_ROCEE_PF_RAS_INT_CMD = 0x1584,
226235
HCLGE_IGU_EGU_TNL_INT_EN = 0x1803,
227-
HCLGE_IGU_EGU_TNL_INT_CLR = 0x1804,
228-
HCLGE_IGU_COMMON_INT_QUERY = 0x1805,
229236
HCLGE_IGU_COMMON_INT_EN = 0x1806,
230-
HCLGE_IGU_COMMON_INT_CLR = 0x1807,
231237
HCLGE_TM_QCN_MEM_INT_CFG = 0x1A14,
232-
HCLGE_TM_QCN_MEM_INT_INFO_CMD = 0x1A17,
233238
HCLGE_PPP_CMD0_INT_CMD = 0x2100,
234239
HCLGE_PPP_CMD1_INT_CMD = 0x2101,
235-
HCLGE_NCSI_INT_QUERY = 0x2400,
236240
HCLGE_NCSI_INT_EN = 0x2401,
237-
HCLGE_NCSI_INT_CLR = 0x2402,
238241
};
239242

240243
#define HCLGE_TQP_REG_OFFSET 0x80000

0 commit comments

Comments
 (0)