提交 6329fe5c 编写于 作者: M Maciej W. Rozycki 提交者: David S. Miller

defxx: Discard DMA maps on buffer deallocation

Prearranged receive DMA bounce buffer mappings are not released in the
card reboot/shutdown path.  That does not affect frame reception, but
probably explains the random segmentation fault I observed the other day
on interface shutdown.  Card is rebooted as required by the spec in the
process of ring fault recovery when a PC Trace signal has been received.

This change fixes the problem in an obvious manner.
Reported-by: NRobert Coerver <Robert.Coerver@ll.mit.edu>
Tested-by: NRobert Coerver <Robert.Coerver@ll.mit.edu>
Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d68ab591
......@@ -3447,8 +3447,13 @@ static void dfx_rcv_flush( DFX_board_t *bp )
{
struct sk_buff *skb;
skb = (struct sk_buff *)bp->p_rcv_buff_va[i+j];
if (skb)
if (skb) {
dma_unmap_single(bp->bus_dev,
bp->descr_block_virt->rcv_data[i+j].long_1,
PI_RCV_DATA_K_SIZE_MAX,
DMA_FROM_DEVICE);
dev_kfree_skb(skb);
}
bp->p_rcv_buff_va[i+j] = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册