bnxt_en: Improve bnxt_ulp_stop()/bnxt_ulp_start() call sequence.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Thu, 31 Oct 2019 05:07:49 +0000 (01:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 21:48:20 +0000 (14:48 -0700)
commitaa46dffff452f7c6d907c4e6a0062e2c53a87fc0
tree0b32c230a65db078215650847dfba32e65185d71
parent627c89d00fb969f9b3b4f3156716149631d2796c
bnxt_en: Improve bnxt_ulp_stop()/bnxt_ulp_start() call sequence.

We call bnxt_ulp_stop() to notify the RDMA driver that some error or
imminent reset is about to happen.  After that we always call
some variants of bnxt_close().

In the next patch, we will integrate the recently added error
recovery with the RDMA driver.  In response to ulp_stop, the
RDMA driver may free MSIX vectors and that will also trigger
bnxt_close().  To avoid bnxt_close() from being called twice,
we set a new flag after ulp_stop is called.  If the RDMA driver
frees MSIX vectors while the new flag is set, we will not call
bnxt_close(), knowing that it will happen in due course.

With this change, we must make sure that the bnxt_close() call
after ulp_stop will reset IRQ.  Modify bnxt_reset_task()
accordingly if we call ulp_stop.

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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h