Date: Wed, 9 Jan 2008 21:58:05 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 132920 for review Message-ID: <200801092158.m09Lw5fP049205@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132920 Change 132920 by hselasky@hselasky_laptop001 on 2008/01/09 21:57:42 Follow up commit - make "bufsize", "frames" and "interval" mode specific. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#103 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#103 (text+ko) ==== @@ -370,7 +370,6 @@ MIN_PKT = 8, }; struct usbd_xfer *xfer = parm->curr_xfer; - const struct usbd_config *setup = parm->curr_setup; const struct usbd_config_sub *setup_sub = parm->curr_setup_sub; usb_endpoint_descriptor_t *edesc; struct usbd_std_packet_size std_size; @@ -393,16 +392,16 @@ type = (edesc->bmAttributes & UE_XFERTYPE); xfer->flags = setup_sub->flags; - xfer->nframes = setup->frames; + xfer->nframes = setup_sub->frames; xfer->timeout = setup_sub->timeout; xfer->callback = setup_sub->callback; - xfer->interval = setup->interval; + xfer->interval = setup_sub->interval; xfer->endpoint = edesc->bEndpointAddress; xfer->max_packet_size = UGETW(edesc->wMaxPacketSize); xfer->max_packet_count = 1; xfer->flags_int.usb_mode = parm->udev->flags.usb_mode; /* make a shadow copy */ - parm->bufsize = setup->bufsize; + parm->bufsize = setup_sub->bufsize; if (parm->speed == USB_SPEED_HIGH) { xfer->max_packet_count += (xfer->max_packet_size >> 11) & 3; @@ -793,7 +792,8 @@ /* sanity checks */ for (setup = setup_start, n = 0; setup != setup_end; setup++, n++) { - if (setup->bufsize == 0xffffffff) { + if ((setup->mh.bufsize == 0xffffffff) || + (setup->md.bufsize == 0xffffffff)) { parm.err = USBD_ERR_BAD_BUFSIZE; PRINTF(("invalid bufsize\n")); } @@ -3480,9 +3480,10 @@ .type = UE_CONTROL, .endpoint = 0x00, /* Control endpoint */ .direction = UE_DIR_ANY, - .bufsize = 1024, /* bytes */ + .mh.bufsize = 1024, /* bytes */ .mh.flags = {.proxy_buffer = 1,.short_xfer_ok = 1,}, .mh.callback = &usbd_do_request_callback, + .md.bufsize = 1024, /* bytes */ .md.flags = {.proxy_buffer = 1,.short_xfer_ok = 0,}, .md.callback = &usbd_handle_request_callback, },
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801092158.m09Lw5fP049205>