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

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

 



Hi,

On 06/06/2012 04:56 PM, Alan Stern wrote:
On Wed, 6 Jun 2012, Hans de Goede wrote:

  usbfs can then:

   a) verify each iovec entry is not too long
   b) verify the total length of the iovec isn't too big
   c) translate each iovec entry into one sglist vector
   d) submit one URB with a populated sglist to the USB core

In fact, the kernel doesn't need to support iovecs for usbfs.  (We can,
but we don't need to.)  Libusb doesn't support them, after all.

All we really need to do is teach usbfs to copy large data buffers from
userspace to the kernel in suitably small chunks, creating an sglist to
keep track of the chunks.  Then libusb would need only to _avoid_
breaking big transfers up into pieces.

Good idea! I guess that will be about as complicated at the kernel side
as the iovec solution, while at the same time making things easier for
userspace.

The only advantage to the iovec approach then would be if userspace actually
wants to use iovecs, which certainly does not apply to libusb and I cannot
come up with any valid userspace iovec uses from the top of my head atm,
so that argument seems mute, and the approach you suggest seems like the
best approach to me.

So that leaves the question whom is going to code up this solution, I
see 3 possible candidates: Alan, Sarah or Hans (aka me). So any volunteers?

Regards,

Hans
--
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