aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2015-04-07 19:55:21 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-08 12:15:14 -0400
commit03cc864a2571af278fc83d24b6a78d8424f92736 (patch)
treea2bd3f2ee55faf3d1e5530dcb4489f3ea93352b1
parentb4468cc6f2aeccaea74baa3b211a49851fd84158 (diff)
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: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/neterion/s2io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index 092dcae0d4a9..1e0f72b65459 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -2520,7 +2520,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
2520 DBG_PRINT(INFO_DBG, "%s: Could not allocate skb\n", 2520 DBG_PRINT(INFO_DBG, "%s: Could not allocate skb\n",
2521 ring->dev->name); 2521 ring->dev->name);
2522 if (first_rxdp) { 2522 if (first_rxdp) {
2523 wmb(); 2523 dma_wmb();
2524 first_rxdp->Control_1 |= RXD_OWN_XENA; 2524 first_rxdp->Control_1 |= RXD_OWN_XENA;
2525 } 2525 }
2526 swstats->mem_alloc_fail_cnt++; 2526 swstats->mem_alloc_fail_cnt++;
@@ -2634,7 +2634,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
2634 rxdp->Control_2 |= SET_RXD_MARKER; 2634 rxdp->Control_2 |= SET_RXD_MARKER;
2635 if (!(alloc_tab & ((1 << rxsync_frequency) - 1))) { 2635 if (!(alloc_tab & ((1 << rxsync_frequency) - 1))) {
2636 if (first_rxdp) { 2636 if (first_rxdp) {
2637 wmb(); 2637 dma_wmb();
2638 first_rxdp->Control_1 |= RXD_OWN_XENA; 2638 first_rxdp->Control_1 |= RXD_OWN_XENA;
2639 } 2639 }
2640 first_rxdp = rxdp; 2640 first_rxdp = rxdp;
@@ -2649,7 +2649,7 @@ end:
2649 * and other fields are seen by adapter correctly. 2649 * and other fields are seen by adapter correctly.
2650 */ 2650 */
2651 if (first_rxdp) { 2651 if (first_rxdp) {
2652 wmb(); 2652 dma_wmb();
2653 first_rxdp->Control_1 |= RXD_OWN_XENA; 2653 first_rxdp->Control_1 |= RXD_OWN_XENA;
2654 } 2654 }
2655 2655
@@ -6950,7 +6950,7 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp)
6950 } 6950 }
6951 6951
6952 set_rxd_buffer_size(sp, rxdp, size); 6952 set_rxd_buffer_size(sp, rxdp, size);
6953 wmb(); 6953 dma_wmb();
6954 /* flip the Ownership bit to Hardware */ 6954 /* flip the Ownership bit to Hardware */
6955 rxdp->Control_1 |= RXD_OWN_XENA; 6955 rxdp->Control_1 |= RXD_OWN_XENA;
6956 } 6956 }