]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:15 +0000 (17:49 +0200)
[ Upstream commit e000940473d1423a42ef9c823fb23ccffe3f07ea ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index a29bf3ca0b48e9c34d91d0d98073a64fb7e79c5d..19c4a0a5727a46325d8fb26105e0b220908d5e9a 100644 (file)
@@ -10014,7 +10014,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)