From: Yonglong Liu Date: Tue, 28 Jul 2020 02:16:49 +0000 (+0800) Subject: net: hns3: fix a TX timeout issue X-Git-Tag: Ubuntu-5.4.0-49.53~1127 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e57c04d28bf869ce1476f73e700d0d1cbf36cf6c;p=mirror_ubuntu-focal-kernel.git net: hns3: fix a TX timeout issue BugLink: https://bugs.launchpad.net/bugs/1891063 [ Upstream commit a7e90ee5965fafc53d36e8b3205f08c88d7bc11f ] 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: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Kamal Mostafa Signed-off-by: Ian May Signed-off-by: Kelsey Skunberg --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 45ac9dc783ac..99d58ad2940e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -4168,8 +4168,8 @@ static void hns3_link_status_change(struct hnae3_handle *handle, bool linkup) return; if (linkup) { - netif_carrier_on(netdev); netif_tx_wake_all_queues(netdev); + netif_carrier_on(netdev); if (netif_msg_link(handle)) netdev_info(netdev, "link up\n"); } else {