Searched hist:"730 ee3602f300b5133717048859358a02251322f" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/net/ethernet/freescale/ |
H A D | fec_main.c | diff 730ee3602f300b5133717048859358a02251322f Tue Jul 08 01:23:14 CEST 2014 Russell King <rmk+kernel@arm.linux.org.uk> net: fec: make rx skb handling more robust
Allocate, and then map the receive skb before writing any data to the ring descriptor or storing the skb. When freeing the receive ring entries, unmap and free the skb, and then clear the stored skb pointer.
This means we have ring data and skb pointer in one of two states: either both fully setup, or nothing setup.
This simplifies the cleanup, as we can use just the skb pointer to indicate whether the descriptor is setup, and thus avoids potentially calling dma_unmap_single() on a DMA error value.
Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
|