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-6-huangguangbin2@huawei.com>
Date:   Sat, 24 Sep 2022 10:30:15 +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 05/14] net: hns3: modify macro hnae3_dev_ptp_supported

Redefine macro hnae3_dev_ptp_supported(hdev) to
hnae3_ae_dev_ptp_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/hns3_debugfs.c     | 2 +-
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index 60fda66e08bd..dd2dd085ab3d 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -119,8 +119,8 @@ enum HNAE3_DEV_CAP_BITS {
 #define hnae3_ae_dev_fd_forward_tc_supported(ae_dev) \
 	test_bit(HNAE3_DEV_SUPPORT_FD_FORWARD_TC_B, (ae_dev)->caps)
 
-#define hnae3_dev_ptp_supported(hdev) \
-	test_bit(HNAE3_DEV_SUPPORT_PTP_B, (hdev)->ae_dev->caps)
+#define hnae3_ae_dev_ptp_supported(ae_dev) \
+	test_bit(HNAE3_DEV_SUPPORT_PTP_B, (ae_dev)->caps)
 
 #define hnae3_dev_int_ql_supported(hdev) \
 	test_bit(HNAE3_DEV_SUPPORT_INT_QL_B, (hdev)->ae_dev->caps)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
index 66feb23f7b7b..7de1f91c4877 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
@@ -1367,7 +1367,7 @@ int hns3_dbg_init(struct hnae3_handle *handle)
 		if ((hns3_dbg_cmd[i].cmd == HNAE3_DBG_CMD_TM_NODES &&
 		     ae_dev->dev_version <= HNAE3_DEVICE_VERSION_V2) ||
 		    (hns3_dbg_cmd[i].cmd == HNAE3_DBG_CMD_PTP_INFO &&
-		     !test_bit(HNAE3_DEV_SUPPORT_PTP_B, ae_dev->caps)))
+		     !hnae3_ae_dev_ptp_supported(ae_dev)))
 			continue;
 
 		if (!hns3_dbg_cmd[i].init) {
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
index a40b1583f114..aebd98586e62 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
@@ -486,7 +486,7 @@ int hclge_ptp_init(struct hclge_dev *hdev)
 	struct timespec64 ts;
 	int ret;
 
-	if (!test_bit(HNAE3_DEV_SUPPORT_PTP_B, ae_dev->caps))
+	if (!hnae3_ae_dev_ptp_supported(ae_dev))
 		return 0;
 
 	if (!hdev->ptp) {
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ