From: Ian Campbell <ijc-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: rjw-KKrjLPT3xs0@public.gmane.org,
walt-Wo+ox+avW/9ByuSxxbvQtw@public.gmane.org,
kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
khc-9GfyWEdoJtJmR6Xm/wNWPw@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [Bug #14057] Strange network timeouts w/ e100
Date: Sun, 06 Sep 2009 12:22:58 +0100 [thread overview]
Message-ID: <1252236178.7811.28024.camel@localhost.localdomain> (raw)
In-Reply-To: <20090826.151153.169388217.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2595 bytes --]
On Wed, 2009-08-26 at 15:11 -0700, David Miller wrote:
> From: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>
> Date: Wed, 26 Aug 2009 23:12:03 +0200
>
> >> Krzysztof has a patch which has corrected this issue for me. Thanks,
> >
> > Thanks for the update.
> >
> > Do you have a pointer to the patch, please?
>
> commit 6ff9c2e7fa8ca63a575792534b63c5092099c286
> Author: Krzysztof Hałasa <khc-9GfyWEdoJtJmR6Xm/wNWPw@public.gmane.org>
> Date: Sun Aug 23 19:02:13 2009 -0700
>
> E100: fix interaction with swiotlb on X86.
This fixes 303d67c2 which has been included in at least the 2.6.27.29
and 2.6.30.5 stable releases so I think this should be a candidate for
those stable branches too.
Ian.
>
> E100 places it's RX packet descriptors inside skb->data and uses them
> with bidirectional streaming DMA mapping. Data in descriptors is
> accessed simultaneously by the chip (writing status and size when
> a packet is received) and CPU (reading to check if the packet was
> received). This isn't a valid usage of PCI DMA API, which requires use
> of the coherent (consistent) memory for such purpose. Unfortunately e100
> chips working in "simplified" RX mode have to store received data
> directly after the descriptor. Fixing the driver to conform to the API
> would require using unsupported "flexible" RX mode or receiving data
> into a coherent memory and using CPU to copy it to network buffers.
>
> This patch, while not yet making the driver conform to the PCI DMA API,
> allows it to work correctly on X86 with swiotlb (while not breaking
> other architectures).
>
> Signed-off-by: Krzysztof Hałasa <khc-9GfyWEdoJtJmR6Xm/wNWPw@public.gmane.org>
> Signed-off-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
>
> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> index 41b648a..3a6735d 100644
> --- a/drivers/net/e100.c
> +++ b/drivers/net/e100.c
> @@ -1899,7 +1899,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
> nic->ru_running = RU_SUSPENDED;
> pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
> sizeof(struct rfd),
> - PCI_DMA_BIDIRECTIONAL);
> + PCI_DMA_FROMDEVICE);
> return -ENODATA;
> }
>
> NrybXǧv^){.n+{zXܨ}Ơz&j:+vzZ++zfh~izw?&)ߢf^jǫym@Aa\x7f0hi\x7f
--
Ian Campbell
Q: Why did the chicken cross the road?
A: To see his friend Gregory peck.
Q: Why did the chicken cross the playground?
A: To get to the other slide.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-09-06 11:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1884130464.51251246789620.JavaMail.root@mail.holmansrus.com>
2009-08-26 0:34 ` [Bug #14057] Strange network timeouts w/ e100 Walt Holman
[not found] ` <828279661.71251246859811.JavaMail.root-vwZBVSELaeZtpmJ/C2Vu30EOCMrvLtNR@public.gmane.org>
2009-08-26 21:12 ` Rafael J. Wysocki
[not found] ` <200908262312.04000.rjw-KKrjLPT3xs0@public.gmane.org>
2009-08-26 22:01 ` Walt Holman
2009-08-26 22:11 ` David Miller
[not found] ` <20090826.151153.169388217.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-08-26 22:23 ` Rafael J. Wysocki
2009-09-06 11:22 ` Ian Campbell [this message]
[not found] ` <1252236178.7811.28024.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-09-06 11:27 ` David Miller
2009-08-25 20:00 2.6.31-rc7-git2: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-08-25 20:34 ` [Bug #14057] Strange network timeouts w/ e100 Rafael J. Wysocki
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=1252236178.7811.28024.camel@localhost.localdomain \
--to=ijc-kcikpvwj1kudxyznreorvg@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=khc-9GfyWEdoJtJmR6Xm/wNWPw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=walt-Wo+ox+avW/9ByuSxxbvQtw@public.gmane.org \
/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