The MAC DMA engine updates each receive descriptor's address as it transfers data. Clearing the descriptor control bits during reset does not restore the buffer's starting address. au1000_init() only set RX_DMA_ENABLE on the address left in the descriptor. After closing and reopening the interface, a receive could therefore start partway through its buffer and overwrite memory beyond the allocation. Reload each RX descriptor from rx_db_inuse before enabling it, as the receive completion path already does. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Florian Fainelli --- drivers/net/ethernet/amd/au1000_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 67f4899c34a6..8b7a88ceb3c5 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c @@ -722,7 +722,8 @@ static int au1000_init(struct net_device *dev) for (i = 0; i < NUM_RX_DMA; i++) - aup->rx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE; + writel(lower_32_bits(aup->rx_db_inuse[i]->dma_addr) | + RX_DMA_ENABLE, &aup->rx_dma_ring[i]->buff_stat); wmb(); /* drain writebuffer */ -- 2.53.0