diff options
author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2020-03-22 21:40:05 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-24 05:42:48 +0100 |
commit | 5d765a5e4bd7c368e564e11402bba74cf7f03ac1 (patch) | |
tree | 68577815d53900c84b58607c2f608db8d0991e08 /drivers/net/ethernet/broadcom | |
parent | bnxt_en: Free context memory after disabling PCI in probe error path. (diff) | |
download | linux-5d765a5e4bd7c368e564e11402bba74cf7f03ac1.tar.xz linux-5d765a5e4bd7c368e564e11402bba74cf7f03ac1.zip |
bnxt_en: Reset rings if ring reservation fails during open()
If ring counts are not reset when ring reservation fails,
bnxt_init_dflt_ring_mode() will not be called again to reinitialise
IRQs when open() is called and results in system crash as napi will
also be not initialised. This patch fixes it by resetting the ring
counts.
Fixes: 47558acd56a7 ("bnxt_en: Reserve rings at driver open if none was reserved at probe time.")
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 95f4c02aa7e1..d28b406a26b1 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11677,6 +11677,10 @@ static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh) bp->rx_nr_rings++; bp->cp_nr_rings++; } + if (rc) { + bp->tx_nr_rings = 0; + bp->rx_nr_rings = 0; + } return rc; } |