qed: Revise MFW command locking
authorTomer Tayar <Tomer.Tayar@cavium.com>
Thu, 23 Mar 2017 13:50:15 +0000 (15:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Mar 2017 18:53:29 +0000 (11:53 -0700)
commit4ed1eea82a21ba460e53468cc1c73cfdf83d0e00
tree4b58fb4a3f9dbcfd8263316c859bb5dc7480455d
parent4deece6c9fe69f396812a956f526d1cb43e9c0f0
qed: Revise MFW command locking

Interaction of driver -> management firmware is based
on a one-pending mailbox [per interface], and various
mailbox commands need to be synchronized.

Current scheme is messy, and there's a difficulty extending
it as it deals differently with various commands as well as
making assumption on the required behavior for load/unload
requests.

Drop the current scheme into a completion-list-based approach;
Each flow would try sending the command when possible,
allowing one flow to complete another flow's completion and
relieve the mailbox before sending its own command.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_mcp.h