svn commit: r213148 - user/weongyo/usb/sys/dev/usb
Weongyo Jeong
weongyo at FreeBSD.org
Fri Sep 24 23:56:25 UTC 2010
Author: weongyo
Date: Fri Sep 24 23:56:25 2010
New Revision: 213148
URL: http://svn.freebsd.org/changeset/base/213148
Log:
Records the length of the local buffer. It'd be used to check the
buffer boundary.
Modified:
user/weongyo/usb/sys/dev/usb/usb_core.h
user/weongyo/usb/sys/dev/usb/usb_transfer.c
Modified: user/weongyo/usb/sys/dev/usb/usb_core.h
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_core.h Fri Sep 24 23:54:03 2010 (r213147)
+++ user/weongyo/usb/sys/dev/usb/usb_core.h Fri Sep 24 23:56:25 2010 (r213148)
@@ -136,6 +136,7 @@ struct usb_xfer {
void *priv_sc; /* device driver data pointer 1 */
void *priv_fifo; /* device driver data pointer 2 */
void *local_buffer;
+ int local_buflen;
usb_frlength_t *frlengths;
struct usb_page_cache *frbuffers;
usb_callback_t *callback;
Modified: user/weongyo/usb/sys/dev/usb/usb_transfer.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_transfer.c Fri Sep 24 23:54:03 2010 (r213147)
+++ user/weongyo/usb/sys/dev/usb/usb_transfer.c Fri Sep 24 23:56:25 2010 (r213148)
@@ -628,6 +628,7 @@ usbd_transfer_setup_sub(struct usb_setup
xfer->local_buffer =
USB_ADD_BYTES(parm->buf, parm->size[0]);
+ xfer->local_buflen = parm->bufsize;
usbd_xfer_set_frame_offset(xfer, 0, 0);
More information about the svn-src-user
mailing list