On Mon, 11 Jun 2007, Greg KH wrote: > > Another idea suggested itself too: We could make usbcore allocate > > urb->hcpriv during submission instead of having each HCD do its own > > private allocation. It's not a big deal, just a matter of replacing > > several different calls to kmalloc/kfree by a single call. Any reason > > not to do it? > > No objection from me.
It turns out to be harder than I thought it would. ohci-hcd allocates a variable-length private structure, depending on the transfer length. This means we can't simply store an urb_hcpriv_size field in the hc_driver structure. So I'm not going to do this now; it can be added later. > > Ideally, of course, each HCD would allocate its own URBs with the > > private area included. But we can't do that just now, since some > > drivers maintain pools of URBs that they use for multiple devices, > > potentially on different buses. > > I don't object to fixing those drivers to do a per-device pool instead > of a per-driver pool to make this easier. > > So then you could just do a: > usb_alloc_urb(struct usb_interface *intf, ...) > which would allow the bus that is assigned to the device to do the > proper allocation? I think that would be good to do. That can be the second major alteration -- first get rid of urb->status, then change URB allocation. Large changes like this take some time... 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