Date: Fri, 26 Jun 2009 01:42:41 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r195031 - head/sys/compat/ndis Message-ID: <200906260142.n5Q1gfVj070939@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: weongyo Date: Fri Jun 26 01:42:41 2009 New Revision: 195031 URL: http://svn.freebsd.org/changeset/base/195031 Log: 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> Modified: head/sys/compat/ndis/subr_usbd.c Modified: head/sys/compat/ndis/subr_usbd.c ============================================================================== --- head/sys/compat/ndis/subr_usbd.c Fri Jun 26 01:27:31 2009 (r195030) +++ head/sys/compat/ndis/subr_usbd.c Fri Jun 26 01:42:41 2009 (r195031) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906260142.n5Q1gfVj070939>