Skip to content

Commit a7e90ee

Browse files
liuyonglong86davem330
authored andcommitted
net: hns3: fix a TX timeout issue
When the queue depth and queue parameters are modified, there is a low probability that TX timeout occurs. The two operations cause the link to be down or up when the watchdog is still working. All queues are stopped when the link is down. After the carrier is on, all queues are woken up. If the watchdog detects the link between the carrier on and wakeup queues, a false TX timeout occurs. So fix this issue by modifying the sequence of carrier on and queue wakeup, which is symmetrical to the link down action. Fixes: 76ad4f0 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yonglong Liu <[email protected]> Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cfdaeba commit a7e90ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4136,8 +4136,8 @@ static void hns3_link_status_change(struct hnae3_handle *handle, bool linkup)
41364136
return;
41374137

41384138
if (linkup) {
4139-
netif_carrier_on(netdev);
41404139
netif_tx_wake_all_queues(netdev);
4140+
netif_carrier_on(netdev);
41414141
if (netif_msg_link(handle))
41424142
netdev_info(netdev, "link up\n");
41434143
} else {

0 commit comments

Comments
 (0)