patch 'net/hns3: fix RTC time after reset' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:27 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=3999b58cd323505d28365c4cfaed2c2db35ea5c2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3999b58cd323505d28365c4cfaed2c2db35ea5c2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Fri, 2 Jun 2023 19:41:56 +0800
Subject: [PATCH] net/hns3: fix RTC time after reset
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 14d9281d9c65afd743354737b8c70555161d4a69 ]

The enabled status of RTC time will be cleared after global
or IMP reset, which cause the local RTC time doesn't work.
So this patch fix it.

Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 69446933b9..5d5ccefcc9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4408,6 +4408,12 @@ hns3_init_hardware(struct hns3_adapter *hns)
 		goto err_mac_init;
 	}
 
+	ret = hns3_ptp_init(hw);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to init PTP, ret = %d", ret);
+		goto err_mac_init;
+	}
+
 	return 0;
 
 err_mac_init:
@@ -4587,10 +4593,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 		goto err_intr_callback_register;
 	}
 
-	ret = hns3_ptp_init(hw);
-	if (ret)
-		goto err_get_config;
-
 	/* Enable interrupt */
 	rte_intr_enable(pci_dev->intr_handle);
 	hns3_pf_enable_irq0(hw);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.821364200 +0800
+++ 0049-net-hns3-fix-RTC-time-after-reset.patch	2023-06-25 14:31:58.375773900 +0800
@@ -1 +1 @@
-From 14d9281d9c65afd743354737b8c70555161d4a69 Mon Sep 17 00:00:00 2001
+From 3999b58cd323505d28365c4cfaed2c2db35ea5c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 14d9281d9c65afd743354737b8c70555161d4a69 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 600accea93..9ed54ae384 100644
+index 69446933b9..5d5ccefcc9 100644
@@ -23 +25 @@
-@@ -4416,6 +4416,12 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4408,6 +4408,12 @@ hns3_init_hardware(struct hns3_adapter *hns)
@@ -36 +38 @@
-@@ -4577,10 +4583,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4587,10 +4593,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)


More information about the stable mailing list