ibmvnic: Wait until reset is complete to set carrier on
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Tue, 13 Feb 2018 21:32:50 +0000 (15:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:51:55 +0000 (07:51 +0200)
[ Upstream commit cc85c02edfe48a34865ae00f7d22298a3fdd17aa ]

Pushes back setting the carrier on until the end of the reset
code. This resolves a bug where a watchdog timer was detecting
that a TX queue had stalled before the adapter reset was complete.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmvnic.c

index 3ae02b0620bc9656131fd2ba17ba2322a2fe7e6a..764e7f1c63738907314cc2b2b8acbab7fc846d04 100644 (file)
@@ -1460,8 +1460,6 @@ static int do_reset(struct ibmvnic_adapter *adapter,
                return 0;
        }
 
-       netif_carrier_on(netdev);
-
        /* kick napi */
        for (i = 0; i < adapter->req_rx_queues; i++)
                napi_schedule(&adapter->napi[i]);
@@ -1469,6 +1467,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
        if (adapter->reset_reason != VNIC_RESET_FAILOVER)
                netdev_notify_peers(netdev);
 
+       netif_carrier_on(netdev);
+
        return 0;
 }