]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: support multiple HWRM commands in flight
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 29 Aug 2021 07:35:06 +0000 (03:35 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Aug 2021 08:35:04 +0000 (09:35 +0100)
commita06eb0fd6fedbc1596b77fc3b339f1be580c30c0
tree939ecc9168bf3fc96602b2ba86a701572beeae8b
parent4354226e2dbb2ed8b30fa8f5c373366b0625a1b5
bnxt_en: support multiple HWRM commands in flight

Add infrastructure to maintain a pending list of HWRM commands awaiting
completion and reduce the scope of the hwrm_cmd_lock mutex so that it
protects only the request mailbox. The mailbox is free to use for one
or more concurrent commands after receiving deferred response events.

For uniformity and completeness, use the same pending list for
collecting completions for commands that respond via a completion ring.
These commands are only used for freeing rings and for IRQ test and
we only support one such command in flight.

Note deferred responses are also only supported on the main channel.
The secondary channel (KONG) does not support deferred responses.

Signed-off-by: Edwin Peer <edwin.peer@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.h
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h