]> git.baikalelectronics.ru Git - 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)
commit89ee4002ffa1b5e9840e50d281a8cef637363462
treefc5b6d4c946488b2894f506c49eae6c748c76c13
parent7228132ad80a4b4cfa9c64af419ffaf677810f2c
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