diff options
author | Denis Bolotin <dbolotin@marvell.com> | 2019-01-03 12:02:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-04 12:57:30 -0800 |
commit | 46721c3d9e273aea880e9ff835b0e1271e1cd2fb (patch) | |
tree | 8752d6791be95cb1baeb746d78f3e4932f4c3498 /drivers/net | |
parent | 2d533a9287f2011632977e87ce2783f4c689c984 (diff) | |
download | linux-stable-46721c3d9e273aea880e9ff835b0e1271e1cd2fb.tar.gz linux-stable-46721c3d9e273aea880e9ff835b0e1271e1cd2fb.tar.bz2 linux-stable-46721c3d9e273aea880e9ff835b0e1271e1cd2fb.zip |
qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory barrier
Make sure chain element is updated before ringing the doorbell.
Signed-off-by: Denis Bolotin <dbolotin@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_ll2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c index 90afd514ffe1..d9237c65a838 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c @@ -1619,6 +1619,10 @@ static void qed_ll2_post_rx_buffer_notify_fw(struct qed_hwfn *p_hwfn, cq_prod = qed_chain_get_prod_idx(&p_rx->rcq_chain); rx_prod.bd_prod = cpu_to_le16(bd_prod); rx_prod.cqe_prod = cpu_to_le16(cq_prod); + + /* Make sure chain element is updated before ringing the doorbell */ + dma_wmb(); + DIRECT_REG_WR(p_rx->set_prod_addr, *((u32 *)&rx_prod)); } |