mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Timothy J Fontaine <tjfontaine@atxconsulting.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>,
	Netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: r8169 MTU greater than 1500 causes corruption for other controllers
Date: Thu, 21 Aug 2008 11:20:27 -0400	[thread overview]
Message-ID: <20080821152025.GA29610@tophat.atxconsulting.com> (raw)
In-Reply-To: <20080820214350.GA18747@electric-eye.fr.zoreil.com>

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

On Wed, Aug 20, 2008 at 11:43:50PM +0200, Francois Romieu wrote:
> Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> :
> [...]
> > Hmm, there was no explanation why the tp->rx_buf_sz to pkt_size change
> > was made in that commit (I have no idea whether those sizes have to match 
> > to other places that use tp->rx_buf_sz)...
> 
> Because there is no need to sync data that has not been used ?
> 
> Timothy, could you check if the patch below does the job too ? It should
> fix at least one pci_map / pci_unmap unbalance.
> 
> @@ -2789,10 +2789,10 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
>  
>  			if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) {
>  				pci_dma_sync_single_for_device(pdev, addr,
>  					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;
>  			}
> 
> -- 
> Ueimor

Yup, this patch also works.

tjfontaine

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2008-08-21 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 17:09 Timothy J Fontaine
2008-08-20 19:21 ` Ilpo Järvinen
2008-08-20 21:17   ` Timothy J Fontaine
2008-08-20 21:43   ` Francois Romieu
2008-08-21 15:20     ` Timothy J Fontaine [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080821152025.GA29610@tophat.atxconsulting.com \
    --to=tjfontaine@atxconsulting.com \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®