Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2011 15:16:53 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225556 - head/sys/dev/usb
Message-ID:  <201109141516.p8EFGrqg031733@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Sep 14 15:16:53 2011
New Revision: 225556
URL: http://svn.freebsd.org/changeset/base/225556

Log:
  Reduce USB memory usage during enumeration.
  
  We are allocating some kilobytes of extra memory during USB device enumeration.
  This does not change alot under FreeBSD, but makes sense for various embedded
  operating systems using the FreeBSD USB stack, which have less memory
  resources available.
  
  Approved by:	re (kib)
  MFC after:	1 week

Modified:
  head/sys/dev/usb/usb_msctest.c

Modified: head/sys/dev/usb/usb_msctest.c
==============================================================================
--- head/sys/dev/usb/usb_msctest.c	Wed Sep 14 14:37:54 2011	(r225555)
+++ head/sys/dev/usb/usb_msctest.c	Wed Sep 14 15:16:53 2011	(r225556)
@@ -182,6 +182,7 @@ static const struct usb_config bbb_confi
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
 		.bufsize = sizeof(struct bbb_cbw),
+		.flags = {.ext_buffer = 1,},
 		.callback = &bbb_command_callback,
 		.timeout = 4 * USB_MS_HZ,	/* 4 seconds */
 	},
@@ -191,7 +192,7 @@ static const struct usb_config bbb_confi
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
 		.bufsize = BULK_SIZE,
-		.flags = {.proxy_buffer = 1,.short_xfer_ok = 1,},
+		.flags = {.ext_buffer = 1,.proxy_buffer = 1,.short_xfer_ok = 1,},
 		.callback = &bbb_data_read_callback,
 		.timeout = 4 * USB_MS_HZ,	/* 4 seconds */
 	},
@@ -210,7 +211,7 @@ static const struct usb_config bbb_confi
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
 		.bufsize = BULK_SIZE,
-		.flags = {.proxy_buffer = 1,},
+		.flags = {.ext_buffer = 1,.proxy_buffer = 1,},
 		.callback = &bbb_data_write_callback,
 		.timeout = 4 * USB_MS_HZ,	/* 4 seconds */
 	},
@@ -229,7 +230,7 @@ static const struct usb_config bbb_confi
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
 		.bufsize = sizeof(struct bbb_csw),
-		.flags = {.short_xfer_ok = 1,},
+		.flags = {.ext_buffer = 1,.short_xfer_ok = 1,},
 		.callback = &bbb_status_callback,
 		.timeout = 1 * USB_MS_HZ,	/* 1 second  */
 	},



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109141516.p8EFGrqg031733>