2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 21:54:06 +08:00
linux-next/drivers/net/ethernet/micrel
Davide Ciminaghi 8a9a0ea603 net/ethernet: ks8851_mll fix rx frame buffer overflow
At the beginning of ks_rcv(), a for loop retrieves the
header information relevant to all the frames stored
in the mac's internal buffers. The number of pending
frames is stored as an 8 bits field in KS_RXFCTR.
If interrupts are disabled long enough to allow for more than
32 frames to accumulate in the MAC's internal buffers, a buffer
overflow occurs.
This patch fixes the problem by making the
driver's frame_head_info buffer big enough.
Well actually, since the chip appears to have 12K of
internal rx buffers and the shortest ethernet frame should
be 64 bytes long, maybe the limit could be set to
12*1024/64 = 192 frames, but 255 should be safer.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-14 15:21:27 -04:00
..
Kconfig drivers: misc: Remove MISC_DEVICES config option 2012-01-24 16:24:02 -08:00
ks8695net.c netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:52:27 -05:00
ks8695net.h ks8*/ksz8*: Move the Micrel drivers 2011-08-12 00:22:18 -07:00
ks8842.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-03-29 15:34:57 -07:00
ks8851_mll.c net/ethernet: ks8851_mll fix rx frame buffer overflow 2012-04-14 15:21:27 -04:00
ks8851.c ks8851: Fix missing mutex_lock/unlock 2012-04-13 14:04:47 -04:00
ks8851.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
ksz884x.c netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:52:27 -05:00
Makefile ks8*/ksz8*: Move the Micrel drivers 2011-08-12 00:22:18 -07:00