Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/axgbe/xgbe-drv.c
Show First 20 Lines • Show All 880 Lines • ▼ Show 20 Lines | if (desc_if->map_rx_buffer(pdata, ring, rdata)) | ||||
break; | break; | ||||
hw_if->rx_desc_reset(pdata, rdata, ring->dirty); | hw_if->rx_desc_reset(pdata, rdata, ring->dirty); | ||||
ring->dirty++; | ring->dirty++; | ||||
} | } | ||||
/* Make sure everything is written before the register write */ | /* Make sure everything is written before the register write */ | ||||
#if defined(__arm__) | |||||
dsb(sy); | dsb(sy); | ||||
#endif | |||||
/* Update the Rx Tail Pointer Register with address of | /* Update the Rx Tail Pointer Register with address of | ||||
* the last cleaned entry */ | * the last cleaned entry */ | ||||
rdata = XGBE_GET_DESC_DATA(ring, ring->dirty - 1); | rdata = XGBE_GET_DESC_DATA(ring, ring->dirty - 1); | ||||
XGMAC_DMA_IOWRITE(channel, DMA_CH_RDTR_LO, | XGMAC_DMA_IOWRITE(channel, DMA_CH_RDTR_LO, | ||||
lower_32_bits(rdata->rdata_paddr)); | lower_32_bits(rdata->rdata_paddr)); | ||||
} | } | ||||
Show All 12 Lines | static int xgbe_tx_poll(struct xgbe_channel *channel) | ||||
/* Nothing to do if there isn't a Tx ring for this channel */ | /* Nothing to do if there isn't a Tx ring for this channel */ | ||||
if (!ring) | if (!ring) | ||||
return 0; | return 0; | ||||
cur = ring->cur; | cur = ring->cur; | ||||
/* Be sure we get ring->cur before accessing descriptor data */ | /* Be sure we get ring->cur before accessing descriptor data */ | ||||
#if defined(__arm__) | |||||
dsb(sy); | dsb(sy); | ||||
#endif | |||||
while ((processed < XGBE_TX_DESC_MAX_PROC) && | while ((processed < XGBE_TX_DESC_MAX_PROC) && | ||||
(ring->dirty != cur)) { | (ring->dirty != cur)) { | ||||
rdata = XGBE_GET_DESC_DATA(ring, ring->dirty); | rdata = XGBE_GET_DESC_DATA(ring, ring->dirty); | ||||
rdesc = rdata->rdesc; | rdesc = rdata->rdesc; | ||||
if (!hw_if->tx_complete(rdesc)) | if (!hw_if->tx_complete(rdesc)) | ||||
break; | break; | ||||
/* Make sure descriptor fields are read after reading the OWN | /* Make sure descriptor fields are read after reading the OWN | ||||
* bit */ | * bit */ | ||||
#if defined(__arm__) | |||||
dsb(sy); | dsb(sy); | ||||
#endif | |||||
/* Free the SKB and reset the descriptor for re-use */ | /* Free the SKB and reset the descriptor for re-use */ | ||||
desc_if->unmap_rdata(pdata, rdata); | desc_if->unmap_rdata(pdata, rdata); | ||||
hw_if->tx_desc_reset(rdata); | hw_if->tx_desc_reset(rdata); | ||||
processed++; | processed++; | ||||
ring->dirty++; | ring->dirty++; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |