On Mon, 24 Jun 2013, Felipe Balbi wrote: > > MUSB shouldn't be copying data to and from bounce buffers just to be > > able to handle SG tranfers. > > well, if we can assume all SG elements to be wMaxPacketSize aligned, we > could just break it up into smaller URBs and avoid the copy, but I > wasn't aware we could make that assumption in the host side. Other than usbtest, the only driver using SG that I know of is usb-storage, and it does make that assumption. It works because the block layer packages the I/O up into groups of pages and the bulk maxpacket values always divide 4096 (or whatever the page size happens to be) -- except for wireless USB. And MUSB doesn't have to break anything up into smaller URBs; that's what the SG library does. > > > DWC3, OTOH, can handle anything. Your data can be anywhere, and it'll > > > just transfer it, we just need to set the 'chain' bit properly to tell > > > the internal DMA controller that the USB transfer isn't over yet. > > > > Maybe the same is true of xHCI; I don't know. In any case, those HCDs > > are definitely in the minority. > > not fair :-p Ironically, it's the least-capable hardware which should have the fewest difficulties. It's easy to support SG when you're forced to use PIO. :-) 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