diff options
author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2015-04-07 19:55:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-08 12:15:14 -0400 |
commit | b4468cc6f2aeccaea74baa3b211a49851fd84158 (patch) | |
tree | 1c9e7919c80749a6c7ca67b089e3d6773878c381 /drivers/net/ethernet/sun/sunvnet.c | |
parent | 04abac5fd6ad9341434add1c27047f4b16ada92c (diff) |
sungem, sunhme, sunvnet: Update drivers to use dma_wmb/rmb
This patch goes through and replaces wmb/rmb with dma_wmb/dma_rmb in cases
where the barrier is being used to order writes or reads to just memory and
doesn't involve any programmed I/O.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/sunvnet.c')
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 401abf7254d3..53fe200e0b79 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c | |||
@@ -519,7 +519,7 @@ static int vnet_walk_rx_one(struct vnet_port *port, | |||
519 | if (desc->hdr.state != VIO_DESC_READY) | 519 | if (desc->hdr.state != VIO_DESC_READY) |
520 | return 1; | 520 | return 1; |
521 | 521 | ||
522 | rmb(); | 522 | dma_rmb(); |
523 | 523 | ||
524 | viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n", | 524 | viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n", |
525 | desc->hdr.state, desc->hdr.ack, | 525 | desc->hdr.state, desc->hdr.ack, |
@@ -1380,7 +1380,7 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1380 | /* This has to be a non-SMP write barrier because we are writing | 1380 | /* This has to be a non-SMP write barrier because we are writing |
1381 | * to memory which is shared with the peer LDOM. | 1381 | * to memory which is shared with the peer LDOM. |
1382 | */ | 1382 | */ |
1383 | wmb(); | 1383 | dma_wmb(); |
1384 | 1384 | ||
1385 | d->hdr.state = VIO_DESC_READY; | 1385 | d->hdr.state = VIO_DESC_READY; |
1386 | 1386 | ||
@@ -1395,7 +1395,7 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1395 | * is marked READY, but start_cons was false. | 1395 | * is marked READY, but start_cons was false. |
1396 | * If so, vnet_ack() should send out the missed "start" trigger. | 1396 | * If so, vnet_ack() should send out the missed "start" trigger. |
1397 | * | 1397 | * |
1398 | * Note that the wmb() above makes sure the cookies et al. are | 1398 | * Note that the dma_wmb() above makes sure the cookies et al. are |
1399 | * not globally visible before the VIO_DESC_READY, and that the | 1399 | * not globally visible before the VIO_DESC_READY, and that the |
1400 | * stores are ordered correctly by the compiler. The consumer will | 1400 | * stores are ordered correctly by the compiler. The consumer will |
1401 | * not proceed until the VIO_DESC_READY is visible assuring that | 1401 | * not proceed until the VIO_DESC_READY is visible assuring that |