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>
This commit is contained in:
Weongyo Jeong 2009-06-26 01:42:41 +00:00
parent 511b9af0c9
commit 58f30773d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=195031

View File

@ -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 @@ usbd_ctrl_callback(struct usb_xfer *xfer, usb_error_t error)
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);