diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:20:38 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:20:38 +0000 |
commit | f498dc2227c7edc88b3ba4fdfbbe30ec4205369a (patch) | |
tree | ff099ee3c8b568709e18b80fe23a0f2cb176ef02 /sys/dev/usb/usb_msctest.c | |
parent | 0020f46b4a875816f7768284ac79b7b482aabf39 (diff) | |
download | FreeBSD-src-f498dc2227c7edc88b3ba4fdfbbe30ec4205369a.zip FreeBSD-src-f498dc2227c7edc88b3ba4fdfbbe30ec4205369a.tar.gz |
MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
"usb2_config" has a new field called "usb_mode" which select for which mode
the current xfer entry is active. Options are: a) Device mode only b) Host
mode only (default-by-zero) c) Both modes. This change was scripted using
the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
the code for the function uses less memory than the table itself.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_msctest.c')
-rw-r--r-- | sys/dev/usb/usb_msctest.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index bd5fdac..960cd95 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -137,57 +137,57 @@ static const struct usb2_config bbb_config[ST_MAX] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = sizeof(struct bbb_cbw), - .mh.callback = &bbb_command_callback, - .mh.timeout = 4 * USB_MS_HZ, /* 4 seconds */ + .bufsize = sizeof(struct bbb_cbw), + .callback = &bbb_command_callback, + .timeout = 4 * USB_MS_HZ, /* 4 seconds */ }, [ST_DATA_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = BULK_SIZE, - .mh.flags = {.proxy_buffer = 1,.short_xfer_ok = 1,}, - .mh.callback = &bbb_data_read_callback, - .mh.timeout = 4 * USB_MS_HZ, /* 4 seconds */ + .bufsize = BULK_SIZE, + .flags = {.proxy_buffer = 1,.short_xfer_ok = 1,}, + .callback = &bbb_data_read_callback, + .timeout = 4 * USB_MS_HZ, /* 4 seconds */ }, [ST_DATA_RD_CS] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &bbb_data_rd_cs_callback, - .mh.timeout = 1 * USB_MS_HZ, /* 1 second */ + .bufsize = sizeof(struct usb2_device_request), + .callback = &bbb_data_rd_cs_callback, + .timeout = 1 * USB_MS_HZ, /* 1 second */ }, [ST_DATA_WR] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = BULK_SIZE, - .mh.flags = {.proxy_buffer = 1,}, - .mh.callback = &bbb_data_write_callback, - .mh.timeout = 4 * USB_MS_HZ, /* 4 seconds */ + .bufsize = BULK_SIZE, + .flags = {.proxy_buffer = 1,}, + .callback = &bbb_data_write_callback, + .timeout = 4 * USB_MS_HZ, /* 4 seconds */ }, [ST_DATA_WR_CS] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &bbb_data_wr_cs_callback, - .mh.timeout = 1 * USB_MS_HZ, /* 1 second */ + .bufsize = sizeof(struct usb2_device_request), + .callback = &bbb_data_wr_cs_callback, + .timeout = 1 * USB_MS_HZ, /* 1 second */ }, [ST_STATUS] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = sizeof(struct bbb_csw), - .mh.flags = {.short_xfer_ok = 1,}, - .mh.callback = &bbb_status_callback, - .mh.timeout = 1 * USB_MS_HZ, /* 1 second */ + .bufsize = sizeof(struct bbb_csw), + .flags = {.short_xfer_ok = 1,}, + .callback = &bbb_status_callback, + .timeout = 1 * USB_MS_HZ, /* 1 second */ }, }; |