2011-02-04 19:59:12

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 3/3] USB: ehci: tegra: Align DMA transfers to 32 bytes

On Wed, Jan 26, 2011 at 07:06:49PM -0800, Robert Morell wrote:
> The Tegra2 USB controller doesn't properly deal with misaligned DMA
> buffers, causing corruption. This is especially prevalent with USB
> network adapters, where skbuff alignment is often in the middle of a
> 4-byte dword.
>
> To avoid this, allocate a temporary buffer for the DMA if the provided
> buffer isn't sufficiently aligned.
>
> Signed-off-by: Robert Morell <[email protected]>
> ---
> drivers/usb/host/ehci-tegra.c | 90 +++++++++++++++++++++++++++++++++++++++++

This file doesn't seem to be in any tree that I can find, including my
own, so I can't apply this patch.

What am I supposed to do with it?

confused,

greg k-h


2011-02-04 20:14:58

by Olof Johansson

[permalink] [raw]
Subject: Re: [PATCH 3/3] USB: ehci: tegra: Align DMA transfers to 32 bytes

On Fri, Feb 4, 2011 at 11:49 AM, Greg KH <[email protected]> wrote:
> On Wed, Jan 26, 2011 at 07:06:49PM -0800, Robert Morell wrote:
>> The Tegra2 USB controller doesn't properly deal with misaligned DMA
>> buffers, causing corruption. ?This is especially prevalent with USB
>> network adapters, where skbuff alignment is often in the middle of a
>> 4-byte dword.
>>
>> To avoid this, allocate a temporary buffer for the DMA if the provided
>> buffer isn't sufficiently aligned.
>>
>> Signed-off-by: Robert Morell <[email protected]>
>> ---
>> ?drivers/usb/host/ehci-tegra.c | ? 90 +++++++++++++++++++++++++++++++++++++++++
>
> This file doesn't seem to be in any tree that I can find, including my
> own, so I can't apply this patch.
>
> What am I supposed to do with it?

It hasn't been posted for upstream yet, so nothing for you to do. The
driver will be posted for review soon, hopefully in time for .39.


-Olof

2011-02-04 20:18:06

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 3/3] USB: ehci: tegra: Align DMA transfers to 32 bytes

On Fri, Feb 04, 2011 at 12:14:54PM -0800, Olof Johansson wrote:
> On Fri, Feb 4, 2011 at 11:49 AM, Greg KH <[email protected]> wrote:
> > On Wed, Jan 26, 2011 at 07:06:49PM -0800, Robert Morell wrote:
> >> The Tegra2 USB controller doesn't properly deal with misaligned DMA
> >> buffers, causing corruption. ?This is especially prevalent with USB
> >> network adapters, where skbuff alignment is often in the middle of a
> >> 4-byte dword.
> >>
> >> To avoid this, allocate a temporary buffer for the DMA if the provided
> >> buffer isn't sufficiently aligned.
> >>
> >> Signed-off-by: Robert Morell <[email protected]>
> >> ---
> >> ?drivers/usb/host/ehci-tegra.c | ? 90 +++++++++++++++++++++++++++++++++++++++++
> >
> > This file doesn't seem to be in any tree that I can find, including my
> > own, so I can't apply this patch.
> >
> > What am I supposed to do with it?
>
> It hasn't been posted for upstream yet, so nothing for you to do. The
> driver will be posted for review soon, hopefully in time for .39.

Then why would someone send me a patch for it already?

Still confused,

greg k-h

2011-02-04 20:27:04

by Robert Morell

[permalink] [raw]
Subject: Re: [PATCH 3/3] USB: ehci: tegra: Align DMA transfers to 32 bytes

On Fri, Feb 04, 2011 at 12:16:16PM -0800, Greg KH wrote:
> On Fri, Feb 04, 2011 at 12:14:54PM -0800, Olof Johansson wrote:
> > On Fri, Feb 4, 2011 at 11:49 AM, Greg KH <[email protected]> wrote:
> > > This file doesn't seem to be in any tree that I can find, including my
> > > own, so I can't apply this patch.
> > >
> > > What am I supposed to do with it?
> >
> > It hasn't been posted for upstream yet, so nothing for you to do. The
> > driver will be posted for review soon, hopefully in time for .39.
>
> Then why would someone send me a patch for it already?

Sorry, this is my fault. My immediate need is to get this merged into
our release linux-tegra-2.6.36 branch, but wanted to get broad review
for the change since it affects USB core code. I figured that it will
be easier to push the full driver into the USB tree with this part out
of the way already, anyway.

Thanks,
Robert

2011-02-04 20:36:10

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 3/3] USB: ehci: tegra: Align DMA transfers to 32 bytes

On Fri, Feb 04, 2011 at 12:26:40PM -0800, [email protected] wrote:
> On Fri, Feb 04, 2011 at 12:16:16PM -0800, Greg KH wrote:
> > On Fri, Feb 04, 2011 at 12:14:54PM -0800, Olof Johansson wrote:
> > > On Fri, Feb 4, 2011 at 11:49 AM, Greg KH <[email protected]> wrote:
> > > > This file doesn't seem to be in any tree that I can find, including my
> > > > own, so I can't apply this patch.
> > > >
> > > > What am I supposed to do with it?
> > >
> > > It hasn't been posted for upstream yet, so nothing for you to do. The
> > > driver will be posted for review soon, hopefully in time for .39.
> >
> > Then why would someone send me a patch for it already?
>
> Sorry, this is my fault. My immediate need is to get this merged into
> our release linux-tegra-2.6.36 branch, but wanted to get broad review
> for the change since it affects USB core code. I figured that it will
> be easier to push the full driver into the USB tree with this part out
> of the way already, anyway.

Ok, that makes more sense, but next time, please say something,
as I wasted a lot of time trying to figure out why this patch wasn't
applying correctly :(