diff options
author | hselasky <hselasky@FreeBSD.org> | 2011-09-14 15:16:53 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2011-09-14 15:16:53 +0000 |
commit | 79dd2afc0bac76768a48b949de5750372af85472 (patch) | |
tree | 5ea30b8a89a16f41e5c023318ae019e3d9422fc4 /sys/dev/usb/usb_msctest.c | |
parent | eab7de0c8f2e020f13c85e1f6c4169d552b72d8e (diff) | |
download | FreeBSD-src-79dd2afc0bac76768a48b949de5750372af85472.zip FreeBSD-src-79dd2afc0bac76768a48b949de5750372af85472.tar.gz |
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
Diffstat (limited to 'sys/dev/usb/usb_msctest.c')
-rw-r--r-- | sys/dev/usb/usb_msctest.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 9447a93..0355653 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -182,6 +182,7 @@ static const struct usb_config bbb_config[ST_MAX] = { .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_config[ST_MAX] = { .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_config[ST_MAX] = { .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_config[ST_MAX] = { .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 */ }, |