On Wednesday 28 January 2009, Alan Stern wrote: > On Wed, 28 Jan 2009, Oliver Neukum wrote: > > > Am Wednesday 28 January 2009 16:52:31 schrieb Alan Stern: > > > There are several limitations to the current implementation. The two > > > most notable are: It can't run asynchronously, and it doesn't directly > > > map buffers from userspace. > > > > That clashes with a need to observe the limits of the hardware. > > We'd need to export mmap() from the hcds. > > There was a recent proposal on libusb-devel to do almost exactly that: > add mmap support to usbfs. It would allow the kernel to avoid an extra > copy on all I/O data. I looked at part of this problem several years ago, and concluded that usbcore (and thus HCDs) *still* shouldn't try to deal with userspace buffers. Ditto gadgetfs, which was the context I was looking at. ;) It suffices to have something *above* usbcore -- like usbfs, or usbfs2 (Sarah?? :) take a userspace buffer, pin its pages, and turn those pages into kernel buffers that would get handled in the usual way. Of course, un-aligned buffers would still require the kind of bounce buffering that the "3.5K WUSB packet" case requires: you couldn't do zerocopy I/O for all buffers, you'd still need single-copy code paths. Key point: keep all that crap out of usbcore, and HCDs. Putting it in usbfs (or usbfs2) or other drivers is OK; ditto putting it in library code they could use. - Dave -- 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