RE: [PATCH][RFC] USB: zerocopy support for usbfs

From: David Laight
Date: Thu Jul 03 2014 - 04:41:44 EST


From: Stefan Klug
...
> Is there any way to check if the host controller supports arbitrary
> alignment?
> If I read the xhci spec correctly arbitrary alignment is explicitly
> permitted.

Not entirely.
The xhci spec has a few limits on the alignment of transfer buffer.
They seem to be designed to make life difficult for the kernel!
1) Transfer buffers cannot be longer than 64k.
2) Transfer buffers cannot cross 64k address boundaries.
3) The end of a ring segment must occur on a USB packet boundary.

The current xhci driver doesn't implement check 3 - which causes
certain devices to fail (notable the ax88179_178a usb3 ethernet).

David