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/compat/ndis | |
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/compat/ndis')
-rw-r--r-- | sys/compat/ndis/subr_usbd.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/compat/ndis/subr_usbd.c b/sys/compat/ndis/subr_usbd.c index 926c4a1..bb72732 100644 --- a/sys/compat/ndis/subr_usbd.c +++ b/sys/compat/ndis/subr_usbd.c @@ -93,20 +93,20 @@ static struct usb2_config usbd_default_epconfig[USBD_CTRL_MAX_PIPE] = { .endpoint = 0x00, /* control pipe */ .direction = UE_DIR_ANY, .if_index = 0, - .mh.bufsize = USBD_CTRL_READ_BUFFER_SIZE, - .mh.flags = { .short_xfer_ok = 1, }, - .mh.callback = &usbd_ctrl_callback, - .mh.timeout = 5000, /* 5 seconds */ + .bufsize = USBD_CTRL_READ_BUFFER_SIZE, + .flags = { .short_xfer_ok = 1, }, + .callback = &usbd_ctrl_callback, + .timeout = 5000, /* 5 seconds */ }, [USBD_CTRL_WRITE_PIPE] = { .type = UE_CONTROL, .endpoint = 0x00, /* control pipe */ .direction = UE_DIR_ANY, .if_index = 0, - .mh.bufsize = USBD_CTRL_WRITE_BUFFER_SIZE, - .mh.flags = { .proxy_buffer = 1, }, - .mh.callback = &usbd_ctrl_callback, - .mh.timeout = 5000, /* 5 seconds */ + .bufsize = USBD_CTRL_WRITE_BUFFER_SIZE, + .flags = { .proxy_buffer = 1, }, + .callback = &usbd_ctrl_callback, + .timeout = 5000, /* 5 seconds */ } }; @@ -674,11 +674,11 @@ usbd_setup_endpoint(ip, ifidx, ep) cfg.type = UE_GET_XFERTYPE(ep->bmAttributes); cfg.endpoint = UE_GET_ADDR(ep->bEndpointAddress); cfg.direction = UE_GET_DIR(ep->bEndpointAddress); - cfg.mh.callback = &usbd_non_isoc_callback; - cfg.mh.bufsize = UGETW(ep->wMaxPacketSize); - cfg.mh.flags.proxy_buffer = 1; + cfg.callback = &usbd_non_isoc_callback; + cfg.bufsize = UGETW(ep->wMaxPacketSize); + cfg.flags.proxy_buffer = 1; if (UE_GET_DIR(ep->bEndpointAddress) == UE_DIR_IN) - cfg.mh.flags.short_xfer_ok = 1; + cfg.flags.short_xfer_ok = 1; status = usb2_transfer_setup(sc->ndisusb_dev, &ifidx, ne->ne_xfer, &cfg, 1, sc, &sc->ndisusb_mtx); |