ionic: clear broken state on generation change
authorShannon Nelson <snelson@pensando.io>
Wed, 24 Aug 2022 16:50:49 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:16:45 +0000 (17:16 +0200)
commit9a41433cc73b20db36eec0f91d0c83cacc55879b
tree04faf92e1c631cada95641adbabf89bcf3fd04cf
parent8d2761dbfcb9e4ae801c9c3431b33280438c4072
ionic: clear broken state on generation change

[ Upstream commit 9cb9dadb8f45c67e4310e002c2f221b70312b293 ]

There is a case found in heavy testing where a link flap happens just
before a firmware Recovery event and the driver gets stuck in the
BROKEN state.  This comes from the driver getting interrupted by a FW
generation change when coming back up from the link flap, and the call
to ionic_start_queues() in ionic_link_status_check() fails.  This can be
addressed by having the fw_up code clear the BROKEN bit if seen, rather
than waiting for a user to manually force the interface down and then
back up.

Fixes: 9e8eaf8427b6 ("ionic: stop watchdog when in broken state")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_lif.c