bnxt_en: Call bnxt_ulp_stop() during tx timeout.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 8 Mar 2017 23:44:33 +0000 (18:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 01:38:31 +0000 (17:38 -0800)
If we call bnxt_reset_task() due to tx timeout, we should call
bnxt_ulp_stop() to inform the RDMA driver about the error and the
impending reset.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 33293ac32779fea6e1bd7d16c9b3f892cd0ca00c..bbe93713e2267251c9e64d365cdda4f6ef775a32 100644 (file)
@@ -6495,8 +6495,14 @@ static void bnxt_reset_task(struct bnxt *bp, bool silent)
        if (!silent)
                bnxt_dbg_dump_states(bp);
        if (netif_running(bp->dev)) {
+               int rc;
+
+               if (!silent)
+                       bnxt_ulp_stop(bp);
                bnxt_close_nic(bp, false, false);
-               bnxt_open_nic(bp, false, false);
+               rc = bnxt_open_nic(bp, false, false);
+               if (!silent && !rc)
+                       bnxt_ulp_start(bp);
        }
 }