From: Vasundhara Volam Date: Sun, 14 Jun 2020 23:57:10 +0000 (-0400) Subject: bnxt_en: Return from timer if interface is not in open state. X-Git-Tag: v5.15~3550^2~15^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e000940473d1423a42ef9c823fb23ccffe3f07ea;p=platform%2Fkernel%2Flinux-starfive.git bnxt_en: Return from timer if interface is not in open state. 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 Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 47b45ea696f8..b93e05f91d77 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -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)