diff options
author | weongyo <weongyo@FreeBSD.org> | 2009-06-26 01:42:41 +0000 |
---|---|---|
committer | weongyo <weongyo@FreeBSD.org> | 2009-06-26 01:42:41 +0000 |
commit | 9a472dd5889ffcc7520ed12bf9cbc791eb34eab7 (patch) | |
tree | a1ac58eefaa788e34d57a30ea0856d96f906640f /sys | |
parent | d6c34cbf833cb699e5c839bebad0de280c295c00 (diff) | |
download | FreeBSD-src-9a472dd5889ffcc7520ed12bf9cbc791eb34eab7.zip FreeBSD-src-9a472dd5889ffcc7520ed12bf9cbc791eb34eab7.tar.gz |
provides a extra write buffer when the NDIS driver want to send a
request whose body has some datas through the default pipe.
Tested by: Nikos Vassiliadis <nvass9573 at gmx.com>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/ndis/subr_usbd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/ndis/subr_usbd.c b/sys/compat/ndis/subr_usbd.c index 1f317e8..1aae868 100644 --- a/sys/compat/ndis/subr_usbd.c +++ b/sys/compat/ndis/subr_usbd.c @@ -82,10 +82,11 @@ static usb_callback_t usbd_ctrl_callback; #define USBD_CTRL_WRITE_PIPE 1 #define USBD_CTRL_MAX_PIPE 2 #define USBD_CTRL_READ_BUFFER_SP 256 +#define USBD_CTRL_WRITE_BUFFER_SP 256 #define USBD_CTRL_READ_BUFFER_SIZE \ (sizeof(struct usb_device_request) + USBD_CTRL_READ_BUFFER_SP) #define USBD_CTRL_WRITE_BUFFER_SIZE \ - (sizeof(struct usb_device_request)) + (sizeof(struct usb_device_request) + USBD_CTRL_WRITE_BUFFER_SP) static struct usb_config usbd_default_epconfig[USBD_CTRL_MAX_PIPE] = { [USBD_CTRL_READ_PIPE] = { .type = UE_CONTROL, @@ -1065,7 +1066,7 @@ next: vcreq->uvc_trans_buflen)); usbd_xfer_set_frames(xfer, 2); } else { - if (nx->nx_urblen > 0) + if (nx->nx_urblen > USBD_CTRL_WRITE_BUFFER_SP) device_printf(sc->ndis_dev, "warning: not enough write buffer space" " (%d).\n", nx->nx_urblen); |