lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220924023024.14219-11-huangguangbin2@huawei.com>
Date:   Sat, 24 Sep 2022 10:30:20 +0800
From:   Guangbin Huang <huangguangbin2@...wei.com>
To:     <davem@...emloft.net>, <kuba@...nel.org>
CC:     <edumazet@...gle.com>, <pabeni@...hat.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <huangguangbin2@...wei.com>, <lipeng321@...wei.com>,
        <lanhao@...wei.com>
Subject: [PATCH net-next 10/14] net: hns3: modify macro hnae3_dev_ras_imp_supported

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@...wei.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ