]> git.baikalelectronics.ru Git - kernel.git/commit
bgmac: fix DMA rx corruption
authorFelix Fietkau <nbd@openwrt.org>
Tue, 14 Apr 2015 10:08:01 +0000 (12:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Apr 2015 18:57:11 +0000 (14:57 -0400)
commit39aa361bb762deedda31d361e1d39663b8ecfa22
tree10bdada0183fa33d78be95ab81b4d7cba5839710
parentb4a166977773299f09a3595f56934e8aa99d0326
bgmac: fix DMA rx corruption

The driver needs to inform the hardware about the first invalid (not yet
filled) rx slot, by writing its DMA descriptor pointer offset to the
BGMAC_DMA_RX_INDEX register.

This register was set to a value exceeding the rx ring size, effectively
allowing the hardware constant access to the full ring, regardless of
which slots are initialized.

To fix this issue, always mark the last filled rx slot as invalid.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac.c