]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
qed: Major changes to MB locking
authorTomer Tayar <Tomer.Tayar@qlogic.com>
Wed, 9 Mar 2016 07:16:24 +0000 (09:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Mar 2016 20:20:20 +0000 (15:20 -0500)
commit5529bad98f10f742e3ab490733bed8e108508759
tree8564fbcf435afad3c794c1b965e333fb839ef419
parentfc916ff2027760900f3b373c388a2098253f3c2a
qed: Major changes to MB locking

Driver interaction with the managemnt firmware is done via mailbox
commands which the management firmware periodically sample, as well
as placing of additional data in set places in the shared memory.
Each PF has a single designated mailbox address, and all flows that
require messaging to the management should use it.

This patch does 2 things:
 1. It re-defines the critical section surrounding the mailbox sending -
that section should include the setting of the shared memory as well as
the sending of the command [otherwise a race might send a command with
the data of a different command].
 2. It moves the locking scheme from using mutices into using spinlocks.
This lays the groundwork for sending MFW commands from non-sleepable
contexts.

Signed-off-by: Tomer Tayar <Tomer.Tayar@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.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