]> git.baikalelectronics.ru Git - kernel.git/commit
atl1e: unmap partially mapped skb on dma error and free skb
authorNeil Horman <nhorman@tuxdriver.com>
Tue, 16 Jul 2013 14:49:41 +0000 (10:49 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jul 2013 19:09:02 +0000 (12:09 -0700)
commit751567a6c4db92afd8ab82b010915bcec29f8189
tree9e58e5abe3b36222e1c730fb9083c91784e9e0fd
parent59624774a09a075dbabcdf9cce1425368f00af8a
atl1e: unmap partially mapped skb on dma error and free skb

Ben Hutchings pointed out that my recent update to atl1e
in commit a95eb2c729fe9d0b615ef7aeb66cf0cd195ff212
("atl1e: fix dma mapping warnings") was missing a bit of code.

Specifically it reset the hardware tx ring to its origional state when
we hit a dma error, but didn't unmap any exiting mappings from the
operation.  This patch fixes that up.  It also remembers to free the
skb in the event that an error occurs, so we don't leak.  Untested, as
I don't have hardware.  I think its pretty straightforward, but please
review closely.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
CC: Jay Cliburn <jcliburn@gmail.com>
CC: Chris Snook <chris.snook@gmail.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/atl1e/atl1e_main.c