qede: qedr closure after setting state
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Sun, 21 May 2017 09:10:58 +0000 (12:10 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 May 2017 16:56:53 +0000 (12:56 -0400)
This is benign, but it makes more sense to start the close sequence
only after changing the internal state [in case it would once care].

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede_main.c

index a66bdfe40e5b593665c0ec6e6e7802c3df481124..f0871e179e99f49b2afea305c5291663c824a2f0 100644 (file)
@@ -1899,9 +1899,10 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode,
        if (!is_locked)
                __qede_lock(edev);
 
-       qede_roce_dev_event_close(edev);
        edev->state = QEDE_STATE_CLOSED;
 
+       qede_roce_dev_event_close(edev);
+
        /* Close OS Tx */
        netif_tx_disable(edev->ndev);
        netif_carrier_off(edev->ndev);