[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101217230702.GA21147@suse.de>
Date: Fri, 17 Dec 2010 15:07:02 -0800
From: Greg KH <gregkh@...e.de>
To: rmorell@...dia.com
Cc: David Brownell <dbrownell@...rs.sourceforge.net>,
Benoit Goby <benoit@...roid.com>,
Alan Stern <stern@...land.harvard.edu>,
Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
Matthew Wilcox <willy@...ux.intel.com>,
Ming Lei <tom.leiming@...il.com>,
Jacob Pan <jacob.jun.pan@...el.com>,
Olof Johansson <olof@...om.net>,
Erik Gilling <konkers@...roid.com>,
Colin Cross <ccross@...roid.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] Align tegra-ehci DMA transfers to 32B
On Fri, Dec 17, 2010 at 02:44:29PM -0800, rmorell@...dia.com wrote:
> On Fri, Dec 17, 2010 at 02:32:27PM -0800, Greg KH wrote:
> > On Fri, Dec 17, 2010 at 01:58:47PM -0800, Robert Morell wrote:
> > > This small set of patches fixes an issue where DMA from the tegra EHCI
> > > controller could be corrupted. It was most commonly seen with USB network
> > > adapters, though in theory it could happen with any USB traffic.
> > >
> > > (Note: An attempt was made to fix this with commit 367c3aab, which set
> > > NET_IP_ALIGN to 0 and NET_SKB_PAD to 32. Unfortunately, not all network
> > > drivers honor them (presumably since these are intended as optimizations rather
> > > than hard rules). This does mean that properly-written network drivers should
> > > fall through this code with very little overhead, however.)
> >
> > We don't have many USB network drivers, why not just fix them up to
> > handle this properly, then you will not need to change any core USB
> > code, right?
>
> The USB core code is used by devices other than USB adapters. We've
> only seen this problem so far with usbnet devices, but I can't test
> every USB device ever to make sure that they always align their DMA to
> 32 bytes.
Then it might just be easier for your driver to throw up a huge
WARN_ON() if it detects such memory so that the device driver could be
fixed, right?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists