Skip to contentSkip to conversation

net/ice: fix link status down

PATCH In review [email protected] 2 participants 2 messages Sep 9, 2020 – Sep 15, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix link status down

From: FuYanX <[email protected]>

Add delay to ensure that the hardware FLR is completed.

Fixes f9cf4f864150 (net/ice: support device initialization)
---
 drivers/net/ice/ice_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/ice_ethdev.c +5 -0
index 8d435e889..20bd85e62 100644
@@ -2176,6 +2176,11 @@ ice_dev_init(struct rte_eth_dev *dev)
 
 	ice_init_controlq_parameter(hw);
 
+	/* The driver e.g. vfio-pci may triggle a FLR reset.
+	 * The operating system is required by PCIe specification to wait 100 ms
+	 * before it can assume that the FLR sequence is completed by hardware.
+	 */
+	rte_delay_ms(100);
 	ret = ice_init_hw(hw);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to initialize HW");
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw

-----Original Message-----
From: dev <[email protected]> On Behalf Of [email protected]
Sent: Wednesday, September 9, 2020 6:47 AM
To: Zhang, Qi Z <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Fu, YanX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v1 1/1] net/ice: fix link status down

From: FuYanX <[email protected]>

Add delay to ensure that the hardware FLR is completed.

Fixes f9cf4f864150 (net/ice: support device initialization)
---
 drivers/net/ice/ice_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/ice_ethdev.c +5 -0
@@ -2176,6 +2176,11 @@ ice_dev_init(struct rte_eth_dev *dev)
 
 	ice_init_controlq_parameter(hw);
 
+	/* The driver e.g. vfio-pci may triggle a FLR reset.
+	 * The operating system is required by PCIe specification to wait 100 ms
+	 * before it can assume that the FLR sequence is completed by hardware.
+	 */
+	rte_delay_ms(100);
 	ret = ice_init_hw(hw);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to initialize HW");

--
2.25.1