• Tomer Tayar's avatar
    qed: Major changes to MB locking · 5529bad9
    Tomer Tayar authored
    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: default avatarTomer Tayar <Tomer.Tayar@qlogic.com>
    Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5529bad9
qed_mcp.c 25.8 KB