increase xhci sgl count
|Assignee:||Robert Mustacchi||% Done:|
|Category:||driver - device drivers|
The xhci driver today defaults to using DMA attributes of up to 8 entries when performing bulk transfers. We had examples where the OS wanted 9 sgl entries for such a transfer. If for some reason the system cannot satisfy this number of transfers, the attempt to bind DMA memory will fail because the xhci driver does not support falling back to using DMA windows to perform the bulk transfer. As such, we should increase the default number of SGLs that we use. The upper bound on such a number (as described in the code) is based on the ring size. We use page size rings which means 4k on x86. When divided by the size of a ring entry, this gives us 256 entries in the ring. Thus we need to determine a number that is flexible enough, without going over the total size of the ring for a given number . For the time being we've chosen 64 as a middle ground.
#1 Updated by Michal Nowak about 1 month ago
We recently had an user bug report regarding a similar issue when the user tried to access camera with gphoto2 app which is itself using libusb: https://openindiana.org/pipermail/openindiana-discuss/2018-May/022152.html.
Also available in: Atom