diff options
author | Manish Chopra <manish.chopra@caviumnetworks.com> | 2016-10-14 05:19:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-14 11:59:59 -0400 |
commit | d5df7688b6a36dbb5611a58229a5e294cd978999 (patch) | |
tree | fc5b6d4c946488b2894f506c49eae6c748c76c13 /drivers/net/ethernet/qlogic/qed/qed_sp.h | |
parent | 7eff82b0fc26937d23e59d3de8a1930b25d4738c (diff) | |
download | linux-stable-d5df7688b6a36dbb5611a58229a5e294cd978999.tar.gz linux-stable-d5df7688b6a36dbb5611a58229a5e294cd978999.tar.bz2 linux-stable-d5df7688b6a36dbb5611a58229a5e294cd978999.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_sp.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_sp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp.h b/drivers/net/ethernet/qlogic/qed/qed_sp.h index 652c90819758..27c450fd2193 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_sp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_sp.h @@ -111,8 +111,8 @@ union qed_spq_req_comp { }; struct qed_spq_comp_done { - u64 done; - u8 fw_return_code; + unsigned int done; + u8 fw_return_code; }; struct qed_spq_entry { |