]> 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)
commit0e3e1c1e98905e69f5d7011c2d8449d2012a81a6
treee90abb4a6f8bc8bdb67b1b4bacd030bfad15b9ed
parent91d6c5ef0c7c2262d019194b00f18679efeda709
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