Date: Mon, 30 Jun 2008 15:42:12 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 144368 for review Message-ID: <200806301542.m5UFgCj0081808@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=144368 Change 144368 by hselasky@hselasky_laptop001 on 2008/06/30 15:42:04 Some minor fixes and corrections. - usb2_generic.c : Exit from clear stall callback if not clearing stall. - Compile fixes. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_generic.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_handle_request.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.h#3 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_generic.c#3 (text+ko) ==== @@ -442,6 +442,10 @@ struct usb2_fifo *f = xfer->priv_sc; struct usb2_xfer *xfer_other = f->xfer[0]; + if (f->flag_stall == 0) { + /* nothing to do */ + return; + } if (usb2_clear_stall_callback(xfer, xfer_other)) { DPRINTF(4, "f=%p: stall cleared\n", f); f->flag_stall = 0; @@ -456,6 +460,10 @@ struct usb2_fifo *f = xfer->priv_sc; struct usb2_xfer *xfer_other = f->xfer[0]; + if (f->flag_stall == 0) { + /* nothing to do */ + return; + } if (usb2_clear_stall_callback(xfer, xfer_other)) { DPRINTF(4, "f=%p: stall cleared\n", f); f->flag_stall = 0; ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_handle_request.c#3 (text+ko) ==== @@ -82,7 +82,7 @@ if (err == USB_ERR_BAD_CONTEXT) { /* we need to re-setup the control transfer */ - usb2_needs_explore(xfer->udev->bus); + usb2_needs_explore(xfer->udev->bus, 0); break; } /* ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.c#4 (text+ko) ==== @@ -1879,7 +1879,7 @@ * if this is the last USB transfer on the PIPE queue we are no * longer synced: */ - if (TAILQ_FIRST(&(xfer->pipe->pipe_q->head)) == NULL) { + if (TAILQ_FIRST(&(xfer->pipe->pipe_q.head)) == NULL) { xfer->pipe->is_synced = 0; } /* call the USB transfer callback */ @@ -2068,7 +2068,7 @@ * transfer. If the timeout has been deferred the callback given by * "cb" will get called after "ms" milliseconds. *------------------------------------------------------------------------*/ -static void +void usb2_transfer_timeout_ms(struct usb2_xfer *xfer, void (*cb) (void *arg), uint32_t ms) { @@ -2134,7 +2134,7 @@ usb2_transfer_timeout_ms(xfer, &usb2_dma_delay_done_cb, temp); - return; /* wait for new callback */ + return (1); /* wait for new callback */ } /* check actual number of frames */ if (xfer->aframes > xfer->nframes) { ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.h#3 (text+ko) ====
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806301542.m5UFgCj0081808>