]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tg3: Fix 4k tx bd segmentation code
authorJoe Jin <joe.jin@oracle.com>
Tue, 15 May 2012 13:18:45 +0000 (21:18 +0800)
committerJoe Jin <joe.jin@oracle.com>
Wed, 16 May 2012 02:29:30 +0000 (10:29 +0800)
commit24e2a59381a4dbc8df45d6f13883c70896592e00
tree6992b215c26586a7034a557f9bbdc5b8e0422ae3
parent04cf330eb9f4126d2a8b056071006c882719a8e0
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.

(backport from commit b9e454826f22e17d1945bd282834c87aef8d0f95)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/tg3.c