• Neil Horman's avatar
    atl1e: unmap partially mapped skb on dma error and free skb · 584ec435
    Neil Horman authored
    Ben Hutchings pointed out that my recent update to atl1e
    in commit 352900b5
    ("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: default avatarNeil 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: default avatarDavid S. Miller <davem@davemloft.net>
    584ec435
atl1e_main.c 68.3 KB