net: sh_eth: fix skb_over_panic happen
When this GETHER controller received a large frame (about 1800 bytes or more), skb_over_panic() happened. This is because the previous driver set the RFLR to 0x1000 (4096 bytes) and the skb allocate size is smaller than 4096 bytes. So, the controller accepted such a frame. The controller can discard a large frame by the RFLR setting. So, the patch modifies the value of RFLR to mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6d25886ee2
commit
fdb37a7f84
@@ -575,9 +575,6 @@ enum RPADIR_BIT {
|
||||
RPADIR_PADR = 0x0003f,
|
||||
};
|
||||
|
||||
/* RFLR */
|
||||
#define RFLR_VALUE 0x1000
|
||||
|
||||
/* FDR */
|
||||
#define DEFAULT_FDR_INIT 0x00000707
|
||||
|
||||
|
Reference in New Issue
Block a user