On Tue, Jun 05, 2007 at 02:43:55PM +0200, Marcel Holtmann wrote: > Hi Oliver, > > > > > > an alternate way would be to extend the usb_kill_anchored_urbs() with > > > > > its own complete handler that gets called for every anchored URB. This > > > > > would make it possible to cleanup the allocated buffers. I attached a > > > > > patch for that, too. > > > > > > > > No, that would mean an URB could have both its original and the > > > > additional > > > > handler or only the additional handler called. That's increasing > > > > complexity, > > > > not lowering it. > > > > > > depends on how you use it. I would only use the original complete > > > handler to do the re-submission of the URB and the additional handler to > > > free the allocated buffers. For that use case it works perfectly fine. > > > > > > To avoid confusion we could rename it to usb_release_t or something > > > similar. > > > > One usage is a bit weak to add common code. > > this is why I wanna have a general solution for one-shot buffers. > > > > > It seems to me that freeing buffers in usbcore is the logical conclusion > > > > of the pattern used in usb-skeleton. It may be used to avoid calling a > > > > completion handler at all. > > > > > > I agree that it is the cleanest to free the buffers when URB is no > > > longer in use. Normally that means that any allocated buffer for this > > > URB is also not needed anymore. > > > > > > Actually I am happy with any solution that frees the driver from having > > > to track the buffers for incoming endpoints used by an URB. > > > > I am fine with your original patch. Perhaps you should resend it. > > Greg, did you see that patch? Do you have any comments on it? If the > solution is acceptable, I can complete the patch with the missing > helpers and "officially" submit it.
Sorry, I missed it. Care to CC: me on it? thanks, greg k-h ------------------------------------------------------------------------- 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