Re: [RFC] xhci: Let completion handlers run before rings are restarted.

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

 



On Wed, 6 Jun 2012, Sarah Sharp wrote:

> Should we add an asynchronous scatter-gather interface to the USB core
> that falls back to submitting multiple URBs if the host controller
> doesn't have a native scatter gather interface?

Pete Zaitcev and I discussed changing usb_sg_wait and friends to be
asynchronous some time ago.  I even posted a patch or two to do it.  
In the end it didn't seem worth the trouble.  (This was back before
native SG support was added to any of the HCDs.)

I don't see that UAS really needs this.  Nobody should be using UAS 
with an HCD that doesn't support SG operation.  But usbfs may be a good 
reason for doing it.  Or it could be implemented entirely within usbfs 
instead of changing usb_sg_*.

> What would it mean to have an asynchronous callback for potentially
> multiple URBs?  The USB core could submit each URB one at a time, with

Probably not one at a time.  Maybe all at once, the way usb_sg_wait 
works now, or maybe in bunches.

> the Nth URB being submitted from a USB core completion callback.  Then
> the driver's completion function could be called when all the URBs
> complete (or one URB fails with an error status, and the other URBs
> aren't submitted).

Rather: or one URB fails with an error status and all the others either
get cancelled or don't get submitted.

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