Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Revert previous (for now)
details: https://anonhg.NetBSD.org/src/rev/664569f31ff6
branches: nick-nhusb
changeset: 334232:664569f31ff6
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Jun 26 15:39:55 2015 +0000
description:
Revert previous (for now)
diffstat:
sys/dev/usb/xhci.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diffs (68 lines):
diff -r 5e3f06f8ff21 -r 664569f31ff6 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c Fri Jun 26 15:39:11 2015 +0000
+++ b/sys/dev/usb/xhci.c Fri Jun 26 15:39:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.28.2.30 2015/06/25 06:30:13 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.28.2.31 2015/06/26 15:39:55 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.30 2015/06/25 06:30:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.31 2015/06/26 15:39:55 skrll Exp $");
#include "opt_usb.h"
@@ -1419,8 +1419,7 @@
* Set TR Dequeue Pointer.
* xCHI 1.1 4.6.10 6.4.3.9
* Purge all of the transfer requests on ring.
- * EPSTATE of endpoint must be ERROR or STOPPED, otherwise CONTEXT_STATE
- * error will be generated.
+ * EPSTATE of endpoint must be ERROR or STOPPED, or CONTEXT_STATE error.
*/
static usbd_status
xhci_set_dequeue(struct usbd_pipe *pipe)
@@ -1760,10 +1759,7 @@
} else {
xx = (void *)(uintptr_t)(trb_0 & ~0x3);
}
- /*
- * stop_endpoint may cause ERR_STOPPED_LENGTH_INVALID,
- * in which case this condition may happen.
- */
+ /* XXX this may not happen */
if (xx == NULL) {
DPRINTFN(1, "xfer done: xx is NULL", 0, 0, 0, 0);
break;
@@ -2159,7 +2155,6 @@
KASSERT(bus->ub_devices[dev->ud_addr] == NULL);
bus->ub_devices[dev->ud_addr] = dev;
- /* read 64 bytes of device descriptor */
err = usbd_get_initial_ddesc(dev, dd);
if (err)
goto bad;
@@ -2361,10 +2356,6 @@
* (called from interrupt from xHCI), or timed-out.
* Command validation is performed in xhci_handle_event by checking if
* trb_0 in CMD_COMPLETE TRB and sc->sc_command_addr are identical.
- * locked = 0: called without lock held
- * locked = 1: allows called with lock held
- * 'locked' is needed as some methods are called with sc_lock_held.
- * (see usbdivar.h)
*/
static usbd_status
xhci_do_command1(struct xhci_softc * const sc, struct xhci_trb * const trb,
@@ -2382,7 +2373,7 @@
if (!locked)
mutex_enter(&sc->sc_lock);
- /* XXX KASSERT may fail when cv_timedwait unlocks sc_lock */
+ /* XXX KASSERT may fire when cv_timedwait unlocks sc_lock */
KASSERT(sc->sc_command_addr == 0);
sc->sc_command_addr = xhci_ring_trbp(cr, cr->xr_ep);
Home |
Main Index |
Thread Index |
Old Index