On Wed, 16 May 2007, Hans Petter Selasky wrote: > > It's also true for bulk-only; the same URB and buffer get used for the > > IN and the OUT endpoints (CSW and CDB). Yes, we could dealias them if > > necessary. > > I would says it is a specification design fault that read and write endpoints > are not used at the same time.
It's not a specification design fault; the specification says nothing about whether the endpoints are or are not used at the same time. It's a design limitation of the usb-storage driver. > > With a large potential waste of memory! UHCI is so inefficient that > > the TDs use up almost as much memory as the data to be transferred > > (within a factor of 2). Do we really want to keep those things around > > when they're not being used? > > That depends largely on wMaxPacketSize. With UHCI, wMaxPacketSize for bulk endpoints is almost always 64, and that's what I was talking about. If wMaxPacketSize is smaller then the ratio is even worse. > All devices need to allocate some memory, even if they are not used. That is > just the way it is. If you want to save memory, then USB has the advantage > that you can unplug the device and save resources. Of course all devices need memory. But there's a big difference between preallocating 4 KB and preallocating 512 KB. And if you start telling people they can save memory by unplugging their USB devices, they'll just laugh at you. Saving memory is the OS's job, not the user's. > Most likely I will end up with 16Kbyte buffers on every > bulk/interrupt/control > endpoint. That should give a maximum transfer rate of approximately 16MB/sec, > which is not so bad for ordinary USB gadgets. No doubt you would reduce that amount for hubs, keyboards, and mice. It's not so bad, as you say. Although for mass-storage devices people would want higher transfer rates. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel