]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: fix undo of reserve()
authorBen Menchaca <ben@bigfootnetworks.com>
Wed, 24 Mar 2010 05:05:02 +0000 (05:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Mar 2010 03:16:23 +0000 (20:16 -0700)
commit4ad4776ef0d20a92fbc728c7f93c8c8445014e6a
tree19de0640cf7f9c8cf634ac2d1c334094303e5bd8
parent6ccdfbebdc63ef8935f64b136c7c080edc285c75
gianfar: fix undo of reserve()

Fix undo of reserve() before RX recycle

gfar_new_skb reserve()s space in the SKB to align it.  If an error occurs,
and the skb needs to be returned to the RX recycle queue, the current code
attempts to reset head, but did not reset tail.  This patch remembers the
alignment amount, and reverses the reserve() when needed.

Signed-off-by: Ben Menchaca <ben@bigfootnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c
drivers/net/gianfar.h