This is a note to let you know that I've just added the patch titled Subject: USB: Add URB_FREE_BUFFER flag and the logic behind it
to my gregkh-2.6 tree. Its filename is usb-add-urb_free_buffer-flag-and-the-logic-behind-it.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ >From [EMAIL PROTECTED] Tue Jun 12 23:03:11 2007 From: Marcel Holtmann <[EMAIL PROTECTED]> Date: Wed, 13 Jun 2007 08:02:11 +0200 Subject: USB: Add URB_FREE_BUFFER flag and the logic behind it To: Greg KH <[EMAIL PROTECTED]> Cc: USB development list <linux-usb-devel@lists.sourceforge.net> Message-ID: <[EMAIL PROTECTED]> USB: Add URB_FREE_BUFFER flag for freeing the transfer buffer In some cases it is not needed that the driver keeps track of the transfer buffer of an URB. It can be simply freed along with the URB itself when the reference count goes down to zero. The new flag URB_FREE_BUFFER enables this behavior. Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/usb/core/urb.c | 3 +++ include/linux/usb.h | 1 + 2 files changed, 4 insertions(+) --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -13,6 +13,9 @@ static void urb_destroy(struct kref *kre { struct urb *urb = to_urb(kref); + if (urb->transfer_flags & URB_FREE_BUFFER) + kfree(urb->transfer_buffer); + kfree(urb); } --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -978,6 +978,7 @@ extern int usb_disabled(void); #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt * needed */ +#define URB_FREE_BUFFER 0x0100 /* Free transfer buffer with the URB */ struct usb_iso_packet_descriptor { unsigned int offset; Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are usb/usb-hub.c-loops-forever-on-resume-from-ram-due-to-bluetooth.patch usb/usb-add-urb_free_buffer-flag-and-the-logic-behind-it.patch ------------------------------------------------------------------------- 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