OSDN Git Service

[PATCH] sis900: come alive after temporary memory shortage
authorKonstantin Khorenko <khorenko@sw.ru>
Mon, 26 Sep 2005 12:40:42 +0000 (16:40 +0400)
committerMarcelo Tosatti <marcelo@pegasos.cnet>
Wed, 23 Nov 2005 18:56:19 +0000 (12:56 -0600)
commitecf3337f76eaa94c5a771308d184dc248b74b725
treecd35831b9ba583b92387c8e5ef3e93cc1332c4c1
parent115c5065504fd7a66c850793af7e8b101604013a
[PATCH] sis900: come alive after temporary memory shortage

Patch solves following problems:
1) Forgotten counter incrementation in sis900_rx() in case
      it doesn't get memory for skb, that leads to whole interface failure.
      Problem is accompanied with messages:
     eth0: Memory squeeze,deferring packet.
     eth0: NULL pointer encountered in Rx ring, skipping
2) If counter cur_rx overflows and there'll be temporary memory problems
      buffer can't be recreated later, when memory IS avaliable.
3) Limit the work in handler to prevent the endless packets processing if
      new packets are generated faster then handled.

Signed-off-by: Konstantin Khorenko <khorenko@sw.ru>
Signed-off-by: Vasily Averin <vvs@sw.ru>
drivers/net/sis900.c