OSDN Git Service

bnxt_en: Return from timer if interface is not in open state.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Sun, 14 Jun 2020 23:57:10 +0000 (19:57 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Jun 2020 20:28:33 +0000 (13:28 -0700)
This will avoid many uneccessary error logs when driver or firmware is
in reset.

Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
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 47b45ea..b93e05f 100644 (file)
@@ -10037,7 +10037,7 @@ static void bnxt_timer(struct timer_list *t)
        struct bnxt *bp = from_timer(bp, t, timer);
        struct net_device *dev = bp->dev;
 
-       if (!netif_running(dev))
+       if (!netif_running(dev) || !test_bit(BNXT_STATE_OPEN, &bp->state))
                return;
 
        if (atomic_read(&bp->intr_sem) != 0)