RDMA/bnxt_re: Correct the sequence of device suspend
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fri, 15 Nov 2024 08:47:44 +0000 (00:47 -0800)
committerLeon Romanovsky <leon@kernel.org>
Sun, 17 Nov 2024 09:56:39 +0000 (04:56 -0500)
commit68b3bca2df00f0a63f0aa2db2b2adc795665229e
tree1aaa661e4502e4943453633e5d0db19d3d04cfab
parentbfb27ae6d0f9a1229ab15c2f13616e96b4a4419e
RDMA/bnxt_re: Correct the sequence of device suspend

When in fatal error condition, mark device as detached first
and then complete all pending HWRM commands as firmware is not
going to process them and eventually time out. Move the device
to error only if suspend is called when device is in Fatal state.

Also, remove some outdated comments. Remove the stop_irq call
which is no longer required.

Fixes: cc5b9b48d447 ("RDMA/bnxt_re: Recover the device when FW error is detected")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/1731660464-27838-4-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/main.c