]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Fix 4k tx bd segmentation code
authorMatt Carlson <mcarlson@broadcom.com>
Fri, 4 Nov 2011 09:14:59 +0000 (09:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Nov 2011 21:31:47 +0000 (17:31 -0400)
commit6bfd6a3c992ae31f885c184ea7c9da7ca9eeb20b
treee90abb4a6f8bc8bdb67b1b4bacd030bfad15b9ed
parent1eaaabbc410fcf0d30f9b3005c5aebe23d915b0d
tg3: Fix 4k tx bd segmentation code

The new 4k tx bd segmentation code had a bug in the error cleanup path.
If the driver did not map all the physical fragments, the abort path
would wind up advancing the producer index beyond the point where the
setup code stopped.  This would ultimately turn into a tx recovery error
where the driver would expect the skb pointer to be set when it isn't.
This patch fixes the problem, and then makes the code a little easier to
understand.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c