]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Reset rings if ring reservation fails during open()
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Sun, 22 Mar 2020 20:40:05 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:44 +0000 (11:01 +0200)
commitc087bfafae3d80f9c20cd17109870fe4bc61f372
tree665869c926fb33d3768b60fba4c38fe6f731eebd
parenta28cb64e0fd3778b3c03ecd098ab3ee2cb4c1fef
bnxt_en: Reset rings if ring reservation fails during open()

[ Upstream commit ec542ab8741c3d27245657cba4a1e6ebcfbe852f ]

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: 370b587f979a ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c