[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EAF47CD23C76F840A9E7FCE10091EFAB02C3CF84FF@dbde02.ent.ti.com>
Date: Wed, 17 Feb 2010 14:47:28 +0530
From: "Shilimkar, Santosh" <santosh.shilimkar@...com>
To: Oliver Neukum <oliver@...kum.org>
CC: Russell King - ARM Linux <linux@....linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Pavel Machek <pavel@....cz>, Greg KH <greg@...ah.com>,
Matthew Dharm <mdharm-kernel@...-eyed-alien.net>,
Sergei Shtylyov <sshtylyov@...mvista.com>,
Ming Lei <tom.leiming@...il.com>,
Sebastian Siewior <bigeasy@...utronix.de>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"Mankad, Maulik Ojas" <x0082077@...com>,
"Gadiyar, Anand" <gadiyar@...com>
Subject: RE: USB mass storage and ARM cache coherency
> -----Original Message-----
> From: Oliver Neukum [mailto:oliver@...kum.org]
> Sent: Wednesday, February 17, 2010 2:41 PM
> To: Shilimkar, Santosh
> Cc: Russell King - ARM Linux; Catalin Marinas; Pavel Machek; Greg KH; Matthew Dharm; Sergei Shtylyov;
> Ming Lei; Sebastian Siewior; linux-usb@...r.kernel.org; linux-kernel; linux-arm-kernel; Mankad,
> Maulik Ojas; Gadiyar, Anand
> Subject: Re: USB mass storage and ARM cache coherency
>
> Am Mittwoch, 17. Februar 2010 09:55:08 schrieb Shilimkar, Santosh:
> > > Your original patch however kills ehci, ohci and uhci on some architectures.
> >
> > How about below approach? Controller driver can set
> > "uses_pio_for_control" if it can't do dma for control transfer.
> >
> > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> > index 80995ef..e3eae02 100644
> > --- a/drivers/usb/core/hcd.c
> > +++ b/drivers/usb/core/hcd.c
> > @@ -1276,7 +1276,7 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
> >
> > if (usb_endpoint_xfer_control(&urb->ep->desc)
> > && !(urb->transfer_flags & URB_NO_SETUP_DMA_MAP)) {
> > - if (hcd->self.uses_dma) {
> > + if (hcd->self.uses_dma && !hcd->self.uses_pio_for_control) {
>
> It is not elegant to describe exceptions. It would be better, if you split up
> the flag into two flags, called uses_dma_for_ordinary_transfers and
> uses_dma_for control_transfers. Doing so also makes sure you look at
> all hcd drivers ;-)
>
Good point. Negative checks are any way not elegant
> And the tests become straightforward. And please add a detailed comment
> to explain why this differentiation is needed on ARM.
OK. I shall create a patch with description about the problem.
Thanks for feedback!!
Regards,
Santosh
--
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