RDMA/bnxt_re: Simplify the function that sends the FW commands
authorKashyap Desai <kashyap.desai@broadcom.com>
Fri, 9 Jun 2023 11:01:45 +0000 (04:01 -0700)
committerLeon Romanovsky <leon@kernel.org>
Mon, 12 Jun 2023 07:10:17 +0000 (10:10 +0300)
commit159cf95e42a7ca7375646fab82c0056cbb71f9e9
treefe47e5f59dfd62f398a43028d02a7d08dbbe0360
parent65288a22ddd81422a2a2a10c15df976a5332e41b
RDMA/bnxt_re: Simplify the function that sends the FW commands

 - Use __send_message_basic_sanity helper function.
 - Do not retry posting same command if there is a queue full detection.
 - ENXIO is used to indicate controller recovery.
 - In the case of ERR_DEVICE_DETACHED state, the driver should not post
   commands to the firmware, but also return fabricated written code.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1686308514-11996-9-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h