Re: [RFC] musb: Add workqueue for request giveback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Feb 2010, Oliver Neukum wrote:

> Am Mittwoch, 24. Februar 2010 14:42:11 schrieb Ajay Kumar Gupta:
> > Current musb host driver does the giveback of completed urb first and
> > then start the next request. This is significantly affecting the streaming
> > from an USB camera wherein we observe huge delay between the two IN tokens
> > from musb host. This is due to the fact that UVC driver is doing decoding
> > and further processing in giveback context.
> > 
> > The patch tries to defer the giveback part to a workqueue and continues
> > with the start of new request in completion path.
> 
> I am afraid this is conceptually broken. Drivers are supposed to be able
> to evaluate the response and do error handling before the next URB
> is processed.

Only if the completed URB got an error.  If there was no error then
HCDs are allowed to start processing the next URB before giving back
the completed URB.  Conversely, if there was an error then the HCD
_must_ give back the URB before starting to process the next one
(unless the endpoint is Isochronous or it is a control endpoint and the
error was -EREMOTEIO).  This is all explained in the kerneldoc for
usb_unlink_urb().

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux