diff options
Diffstat (limited to 'drivers/net/ethernet/sun/sunvnet.c')
| -rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 22e0cad1b4b5..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,  	if (desc->hdr.state != VIO_DESC_READY)  		return 1; -	rmb(); +	dma_rmb();  	viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n",  	       desc->hdr.state, desc->hdr.ack, @@ -1380,7 +1380,7 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)  	/* This has to be a non-SMP write barrier because we are writing  	 * to memory which is shared with the peer LDOM.  	 */ -	wmb(); +	dma_wmb();  	d->hdr.state = VIO_DESC_READY; @@ -1395,7 +1395,7 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)  	 * is marked READY, but start_cons was false.  	 * If so, vnet_ack() should send out the missed "start" trigger.  	 * -	 * Note that the wmb() above makes sure the cookies et al. are +	 * Note that the dma_wmb() above makes sure the cookies et al. are  	 * not globally visible before the VIO_DESC_READY, and that the  	 * stores are ordered correctly by the compiler. The consumer will  	 * not proceed until the VIO_DESC_READY is visible assuring that @@ -1411,6 +1411,8 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)  	if (unlikely(err < 0)) {  		netdev_info(dev, "TX trigger error %d\n", err);  		d->hdr.state = VIO_DESC_FREE; +		skb = port->tx_bufs[txi].skb; +		port->tx_bufs[txi].skb = NULL;  		dev->stats.tx_carrier_errors++;  		goto out_dropped;  	}  |