]> 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)
commit4ee25002b6c682161f48c02ef3cf9f6ed02dd7fc
treefc5b6d4c946488b2894f506c49eae6c748c76c13
parentb2601b510838b0a719e70bf7f2fd4f27100a3b7e
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