Commit 03cc864a authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

s2io: Update driver to use dma_wmb

This change updates several spots where a wmb was being used to instead use
a dma_wmb to flush out writes before updating the control portion of the
descriptor.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4468cc6
...@@ -2520,7 +2520,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring, ...@@ -2520,7 +2520,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
DBG_PRINT(INFO_DBG, "%s: Could not allocate skb\n", DBG_PRINT(INFO_DBG, "%s: Could not allocate skb\n",
ring->dev->name); ring->dev->name);
if (first_rxdp) { if (first_rxdp) {
wmb(); dma_wmb();
first_rxdp->Control_1 |= RXD_OWN_XENA; first_rxdp->Control_1 |= RXD_OWN_XENA;
} }
swstats->mem_alloc_fail_cnt++; swstats->mem_alloc_fail_cnt++;
...@@ -2634,7 +2634,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring, ...@@ -2634,7 +2634,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
rxdp->Control_2 |= SET_RXD_MARKER; rxdp->Control_2 |= SET_RXD_MARKER;
if (!(alloc_tab & ((1 << rxsync_frequency) - 1))) { if (!(alloc_tab & ((1 << rxsync_frequency) - 1))) {
if (first_rxdp) { if (first_rxdp) {
wmb(); dma_wmb();
first_rxdp->Control_1 |= RXD_OWN_XENA; first_rxdp->Control_1 |= RXD_OWN_XENA;
} }
first_rxdp = rxdp; first_rxdp = rxdp;
...@@ -2649,7 +2649,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring, ...@@ -2649,7 +2649,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
* and other fields are seen by adapter correctly. * and other fields are seen by adapter correctly.
*/ */
if (first_rxdp) { if (first_rxdp) {
wmb(); dma_wmb();
first_rxdp->Control_1 |= RXD_OWN_XENA; first_rxdp->Control_1 |= RXD_OWN_XENA;
} }
...@@ -6950,7 +6950,7 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp) ...@@ -6950,7 +6950,7 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp)
} }
set_rxd_buffer_size(sp, rxdp, size); set_rxd_buffer_size(sp, rxdp, size);
wmb(); dma_wmb();
/* flip the Ownership bit to Hardware */ /* flip the Ownership bit to Hardware */
rxdp->Control_1 |= RXD_OWN_XENA; rxdp->Control_1 |= RXD_OWN_XENA;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment