netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] r8169: balance pci_map / pci_unmap pair
@ 2008-08-21 21:47 Francois Romieu
  2008-08-21 21:57 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Francois Romieu @ 2008-08-21 21:47 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: netdev, Ilpo =?unknown-8bit?B?SsOkcnZpbmVu?=,
	Alistair John Strachan, Timothy J Fontaine, Edward Hsu,
	Andrew Morton, Ivan Vecera

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 984 bytes --]

The leak hurts with swiotlb and jumbo frames (see
http://bugzilla.kernel.org/show_bug.cgi?id=9468).

Heavily hinted by Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Alistair John Strachan <alistair@devzero.co.uk>
Tested-by: Timothy J Fontaine <tjfontaine@atxconsulting.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
---
 drivers/net/r8169.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index a3e3895..0f6f974 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -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;
 			}
-- 
1.5.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] r8169: balance pci_map / pci_unmap pair
  2008-08-21 21:47 [PATCH 1/1] r8169: balance pci_map / pci_unmap pair Francois Romieu
@ 2008-08-21 21:57 ` Andrew Morton
  2008-08-21 22:18   ` Francois Romieu
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-08-21 21:57 UTC (permalink / raw)
  To: Francois Romieu
  Cc: jeff, netdev, ilpo.jarvinen, alistair, tjfontaine, edward_hsu,
	ivecera, stable

On Thu, 21 Aug 2008 23:47:34 +0200
Francois Romieu <romieu@fr.zoreil.com> wrote:

> The leak hurts with swiotlb and jumbo frames (see
> http://bugzilla.kernel.org/show_bug.cgi?id=9468).
> 
> Heavily hinted by Ilpo J__rvinen <ilpo.jarvinen@helsinki.fi>.
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> Tested-by: Alistair John Strachan <alistair@devzero.co.uk>
> Tested-by: Timothy J Fontaine <tjfontaine@atxconsulting.com>
> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
> ---
>  drivers/net/r8169.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index a3e3895..0f6f974 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -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;
>  			}

Also needed in 2.6.25.x and 2.6.26.x, yes?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] r8169: balance pci_map / pci_unmap pair
  2008-08-21 21:57 ` Andrew Morton
@ 2008-08-21 22:18   ` Francois Romieu
  0 siblings, 0 replies; 3+ messages in thread
From: Francois Romieu @ 2008-08-21 22:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: jeff, netdev, ilpo.jarvinen, alistair, tjfontaine, edward_hsu,
	ivecera, stable

Andrew Morton <akpm@linux-foundation.org> :
[...]
> Also needed in 2.6.25.x and 2.6.26.x, yes?

Yes. Needed since 2.6.23.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-21 22:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21 21:47 [PATCH 1/1] r8169: balance pci_map / pci_unmap pair Francois Romieu
2008-08-21 21:57 ` Andrew Morton
2008-08-21 22:18   ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).