[PATCH net-next 10/14] net: hns3: modify macro hnae3_dev_ras_imp_supported

From: Guangbin Huang
Date: Fri Sep 23 2022 - 22:34:11 EST


Redefine macro hnae3_dev_ras_imp_supported(hdev) to
hnae3_ae_dev_ras_imp_supported(ae_dev), so it can be
used in both hclge and hns3_enet layer.

Signed-off-by: Guangbin Huang <huangguangbin2@xxxxxxxxxx>
---
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 4 ++--
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index 494402074cb9..0d8e0c461a31 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -134,8 +134,8 @@ enum HNAE3_DEV_CAP_BITS {
#define hnae3_ae_dev_phy_imp_supported(ae_dev) \
test_bit(HNAE3_DEV_SUPPORT_PHY_IMP_B, (ae_dev)->caps)

-#define hnae3_dev_ras_imp_supported(hdev) \
- test_bit(HNAE3_DEV_SUPPORT_RAS_IMP_B, (hdev)->ae_dev->caps)
+#define hnae3_ae_dev_ras_imp_supported(ae_dev) \
+ test_bit(HNAE3_DEV_SUPPORT_RAS_IMP_B, (ae_dev)->caps)

#define hnae3_dev_tqp_txrx_indep_supported(hdev) \
test_bit(HNAE3_DEV_SUPPORT_TQP_TXRX_INDEP_B, (hdev)->ae_dev->caps)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 7995e3388778..cc3ba2a16f5e 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -4579,7 +4579,7 @@ static void hclge_errhand_service_task(struct hclge_dev *hdev)
if (!test_and_clear_bit(HCLGE_STATE_ERR_SERVICE_SCHED, &hdev->state))
return;

- if (hnae3_dev_ras_imp_supported(hdev))
+ if (hnae3_ae_dev_ras_imp_supported(hdev->ae_dev))
hclge_handle_err_recovery(hdev);
else
hclge_misc_err_recovery(hdev);
@@ -11671,7 +11671,7 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
hclge_clear_resetting_state(hdev);

/* Log and clear the hw errors those already occurred */
- if (hnae3_dev_ras_imp_supported(hdev))
+ if (hnae3_ae_dev_ras_imp_supported(hdev->ae_dev))
hclge_handle_occurred_error(hdev);
else
hclge_handle_all_hns_hw_errors(ae_dev);
@@ -12035,7 +12035,7 @@ static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev)
return ret;

/* Log and clear the hw errors those already occurred */
- if (hnae3_dev_ras_imp_supported(hdev))
+ if (hnae3_ae_dev_ras_imp_supported(hdev->ae_dev))
hclge_handle_occurred_error(hdev);
else
hclge_handle_all_hns_hw_errors(ae_dev);
--
2.33.0