defxx: Handle DMA mapping errors
authorMaciej W. Rozycki <macro@linux-mips.org>
Sat, 5 Jul 2014 14:14:40 +0000 (15:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 22:30:11 +0000 (15:30 -0700)
commitb37cccf031bdcaba2f461cdb5a2b93ebbd0af03c
treea7b05f482ba6835c23ad01772d018c53ee780763
parenta630be70771ddbe8253f619ac4b9ca4c3277b13b
defxx: Handle DMA mapping errors

This adds error handling for DMA mapping requests; I think there isn't
much else to say about it.

A good side-effect is the mapping in the transmit path is now made with
the board lock released.  Also if DMA mapping fails for a newly
allocated receive buffer, then data from the old buffer will be copied
out (as is presently done for small frames only whose size does not
exceed SKBUFF_RX_COPYBREAK) and the original buffer returned, with its
mapping unchanged, to the DMA descriptor ring.

Reported-by: Robert Coerver <Robert.Coerver@ll.mit.edu>
Tested-by: Robert Coerver <Robert.Coerver@ll.mit.edu>
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fddi/defxx.c