aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qla3xxx.c
diff options
context:
space:
mode:
authorSinan Kaya <okaya@codeaurora.org>2018-03-25 10:39:15 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-26 12:47:55 -0400
commit3c95c567322e1dfaa7e0348171181aaf63aa6049 (patch)
tree23e2ebcebaba2d72a4aa0be225eaed147658a741 /drivers/net/ethernet/qlogic/qla3xxx.c
parentMerge branch 'sh_eth-unify-the-SoC-feature-checks' (diff)
downloadlinux-dev-3c95c567322e1dfaa7e0348171181aaf63aa6049.tar.xz
linux-dev-3c95c567322e1dfaa7e0348171181aaf63aa6049.zip
net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing code to wmb() writel_relaxed() mmiowb() for multi-arch support. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qla3xxx.c')
-rw-r--r--drivers/net/ethernet/qlogic/qla3xxx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index 9e5264d8773b..b48f76182049 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -1858,8 +1858,9 @@ static void ql_update_small_bufq_prod_index(struct ql3_adapter *qdev)
qdev->small_buf_release_cnt -= 8;
}
wmb();
- writel(qdev->small_buf_q_producer_index,
- &port_regs->CommonRegs.rxSmallQProducerIndex);
+ writel_relaxed(qdev->small_buf_q_producer_index,
+ &port_regs->CommonRegs.rxSmallQProducerIndex);
+ mmiowb();
}
}