]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
qed: Fix possible race when reading firmware return code.
authorManish Chopra <manish.chopra@caviumnetworks.com>
Fri, 14 Oct 2016 09:19:23 +0000 (05:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2016 15:59:59 +0000 (11:59 -0400)
commitd5df7688b6a36dbb5611a58229a5e294cd978999
treefc5b6d4c946488b2894f506c49eae6c748c76c13
parent7eff82b0fc26937d23e59d3de8a1930b25d4738c
qed: Fix possible race when reading firmware return code.

While handling SPQ ramrod completion, there is a possible race
where driver might not read updated fw return code based on
ramrod completion done. This patch ensures that fw return code
is written first and then completion done flag is updated
using appropriate memory barriers.

Signed-off-by: Manish Chopra <manish.chopra@caviumnetworks.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@caviumnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_sp.h
drivers/net/ethernet/qlogic/qed/qed_spq.c