r8169: balance pci_map / pci_unmap pair

The leak hurts with swiotlb and jumbo frames.

Fix http://bugzilla.kernel.org/show_bug.cgi?id=9468.

Heavily hinted by Ilpo Järvinen <[email protected]>.

Signed-off-by: Francois Romieu <[email protected]>
Tested-by: Alistair John Strachan <[email protected]>
Tested-by: Timothy J Fontaine <[email protected]>
Cc: Edward Hsu <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
This commit is contained in:
Francois Romieu 2008-08-26 21:56:06 +02:00 • committed by Jeff Garzik
commit a866bbf6aa

View file

@ -2792,7 +2792,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
pkt_size, PCI_DMA_FROMDEVICE);
rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
} else {
pci_unmap_single(pdev, addr, pkt_size,
pci_unmap_single(pdev, addr, tp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
tp->Rx_skbuff[entry] = NULL;
}