@@ -1068,7 +1068,7 @@ static void xgbe_tx_desc_reset(struct xgbe_ring_data *rdata)
1068
1068
rdesc -> desc3 = 0 ;
1069
1069
1070
1070
/* Make sure ownership is written to the descriptor */
1071
- wmb ();
1071
+ dma_wmb ();
1072
1072
}
1073
1073
1074
1074
static void xgbe_tx_desc_init (struct xgbe_channel * channel )
@@ -1124,12 +1124,12 @@ static void xgbe_rx_desc_reset(struct xgbe_ring_data *rdata)
1124
1124
* is written to the descriptor(s) before setting the OWN bit
1125
1125
* for the descriptor
1126
1126
*/
1127
- wmb ();
1127
+ dma_wmb ();
1128
1128
1129
1129
XGMAC_SET_BITS_LE (rdesc -> desc3 , RX_NORMAL_DESC3 , OWN , 1 );
1130
1130
1131
1131
/* Make sure ownership is written to the descriptor */
1132
- wmb ();
1132
+ dma_wmb ();
1133
1133
}
1134
1134
1135
1135
static void xgbe_rx_desc_init (struct xgbe_channel * channel )
@@ -1358,6 +1358,9 @@ static void xgbe_tx_start_xmit(struct xgbe_channel *channel,
1358
1358
struct xgbe_prv_data * pdata = channel -> pdata ;
1359
1359
struct xgbe_ring_data * rdata ;
1360
1360
1361
+ /* Make sure everything is written before the register write */
1362
+ wmb ();
1363
+
1361
1364
/* Issue a poll command to Tx DMA by writing address
1362
1365
* of next immediate free descriptor */
1363
1366
rdata = XGBE_GET_DESC_DATA (ring , ring -> cur );
@@ -1565,7 +1568,7 @@ static void xgbe_dev_xmit(struct xgbe_channel *channel)
1565
1568
* is written to the descriptor(s) before setting the OWN bit
1566
1569
* for the first descriptor
1567
1570
*/
1568
- wmb ();
1571
+ dma_wmb ();
1569
1572
1570
1573
/* Set OWN bit for the first descriptor */
1571
1574
rdata = XGBE_GET_DESC_DATA (ring , start_index );
@@ -1577,7 +1580,7 @@ static void xgbe_dev_xmit(struct xgbe_channel *channel)
1577
1580
#endif
1578
1581
1579
1582
/* Make sure ownership is written to the descriptor */
1580
- wmb ();
1583
+ dma_wmb ();
1581
1584
1582
1585
ring -> cur = cur_index + 1 ;
1583
1586
if (!packet -> skb -> xmit_more ||
@@ -1613,7 +1616,7 @@ static int xgbe_dev_read(struct xgbe_channel *channel)
1613
1616
return 1 ;
1614
1617
1615
1618
/* Make sure descriptor fields are read after reading the OWN bit */
1616
- rmb ();
1619
+ dma_rmb ();
1617
1620
1618
1621
#ifdef XGMAC_ENABLE_RX_DESC_DUMP
1619
1622
xgbe_dump_rx_desc (ring , rdesc , ring -> cur );
0 commit comments