1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sun, 12 Apr 2015 22:28:20 +0200
3 Subject: [PATCH] bgmac: add check for oversized packets
5 In very rare cases, the MAC can catch an internal buffer that is bigger
6 than it's supposed to be. Instead of crashing the kernel, simply pass
7 the buffer back to the hardware
9 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 --- a/drivers/net/ethernet/broadcom/bgmac.c
13 +++ b/drivers/net/ethernet/broadcom/bgmac.c
14 @@ -445,6 +445,13 @@ static int bgmac_dma_rx_read(struct bgma
18 + if (len > BGMAC_RX_ALLOC_SIZE) {
19 + bgmac_err(bgmac, "Found oversized packet at slot %d, DMA issue!\n",
21 + put_page(virt_to_head_page(buf));