From owner-p4-projects@FreeBSD.ORG Mon Jun 30 15:42:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C857106571A; Mon, 30 Jun 2008 15:42:13 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18D381065712 for ; Mon, 30 Jun 2008 15:42:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 068368FC2A for ; Mon, 30 Jun 2008 15:42:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5UFgCi1081810 for ; Mon, 30 Jun 2008 15:42:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5UFgCj0081808 for perforce@freebsd.org; Mon, 30 Jun 2008 15:42:12 GMT (envelope-from hselasky@FreeBSD.org) Date: Mon, 30 Jun 2008 15:42:12 GMT Message-Id: <200806301542.m5UFgCj0081808@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 144368 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 15:42:13 -0000 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) ====