]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: fix oversized frame reception
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Thu, 26 Nov 2015 07:35:45 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2015 19:52:52 +0000 (14:52 -0500)
commitf96a2fcc2f959ad8561c69d929b5fcfca726db11
tree3418a8c1016d017de9260e0c544a5b19d9a53568
parent89c5c0b83cc54b74eb792da30345e2538b0c1329
stmmac: fix oversized frame reception

The receive skb buffers can be preallocated when the link is opened
according to mtu size.
While testing on a network environment with not standard MTU (e.g. 3000),
a panic occurred if an incoming packet had a length greater than rx skb
buffer size. This is because the HW is programmed to copy, from the DMA,
an Jumbo frame and the Sw must check if the allocated buffer is enough to
store the frame.

Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c