Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys Pull up following revision(s) (requested by riastradh...



details:   https://anonhg.NetBSD.org/src/rev/045e23b39ab4
branches:  netbsd-9
changeset: 964232:045e23b39ab4
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Dec 23 12:34:38 2020 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1159):

        sys/dev/usb/ohci.c: revision 1.314
        sys/external/bsd/dwc2/dwc2.c: revision 1.75
        sys/dev/usb/ehci.c: revision 1.284
        sys/dev/usb/uhci.c: revision 1.305
        sys/dev/usb/xhci.c: revision 1.136

usb: Omit bogus assertions about struct usbd_pipe::up_intrxfer.

These assertions were only valid for pipes at UE_IN_DIR, UE_INTERRUPT
endpoints created with usbd_open_pipe_intr, which uses up_intrxfer to
pass the struct usbd_xfer object to usbd_close_pipe to free later.

In contrast, for pipes at UE_OUT_DIR, UE_INTERRUPT endpoints,
up_intrxfer is never initialized, so the assertion cannot be right.
In principle we might even have more than one outstanding interrupt
transfer at a time, rendering the point of the assertion moot anyway.

Found by interrupting a uhidev write to a u2f device.

ok nick

diffstat:

 sys/dev/usb/ehci.c           |  5 ++---
 sys/dev/usb/ohci.c           |  5 ++---
 sys/dev/usb/uhci.c           |  5 ++---
 sys/dev/usb/xhci.c           |  5 ++---
 sys/external/bsd/dwc2/dwc2.c |  5 ++---
 5 files changed, 10 insertions(+), 15 deletions(-)

diffs (130 lines):

diff -r 79a13d0bbfcc -r 045e23b39ab4 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Dec 19 13:56:20 2020 +0000
+++ b/sys/dev/usb/ehci.c        Wed Dec 23 12:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.267.2.3 2020/03/01 12:35:16 martin Exp $ */
+/*     $NetBSD: ehci.c,v 1.267.2.4 2020/12/23 12:34:38 martin Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.3 2020/03/01 12:35:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.4 2020/12/23 12:34:38 martin Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -4132,7 +4132,6 @@
        EHCIHIST_FUNC(); EHCIHIST_CALLED();
 
        DPRINTF("xfer=%#jx", (uintptr_t)xfer, 0, 0, 0);
-       KASSERT(xfer->ux_pipe->up_intrxfer == xfer);
 
        /*
         * XXX - abort_xfer uses ehci_sync_hc, which syncs via the advance
diff -r 79a13d0bbfcc -r 045e23b39ab4 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sat Dec 19 13:56:20 2020 +0000
+++ b/sys/dev/usb/ohci.c        Wed Dec 23 12:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.289.4.6 2020/12/12 20:29:11 martin Exp $    */
+/*     $NetBSD: ohci.c,v 1.289.4.7 2020/12/23 12:34:38 martin Exp $    */
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289.4.6 2020/12/12 20:29:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289.4.7 2020/12/23 12:34:38 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -3356,7 +3356,6 @@
        ohci_softc_t *sc __diagused = OHCI_XFER2SC(xfer);
 
        KASSERT(mutex_owned(&sc->sc_lock));
-       KASSERT(xfer->ux_pipe->up_intrxfer == xfer);
 
        usbd_xfer_abort(xfer);
 }
diff -r 79a13d0bbfcc -r 045e23b39ab4 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sat Dec 19 13:56:20 2020 +0000
+++ b/sys/dev/usb/uhci.c        Wed Dec 23 12:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.288.4.2 2020/03/01 12:35:16 martin Exp $    */
+/*     $NetBSD: uhci.c,v 1.288.4.3 2020/12/23 12:34:38 martin Exp $    */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.288.4.2 2020/03/01 12:35:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.288.4.3 2020/12/23 12:34:38 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2817,7 +2817,6 @@
        uhci_softc_t *sc __diagused = UHCI_XFER2SC(xfer);
 
        KASSERT(mutex_owned(&sc->sc_lock));
-       KASSERT(xfer->ux_pipe->up_intrxfer == xfer);
 
        UHCIHIST_FUNC(); UHCIHIST_CALLED();
        DPRINTF("xfer=%#jx", (uintptr_t)xfer, 0, 0, 0);
diff -r 79a13d0bbfcc -r 045e23b39ab4 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sat Dec 19 13:56:20 2020 +0000
+++ b/sys/dev/usb/xhci.c        Wed Dec 23 12:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.107.2.6 2020/05/25 15:31:45 martin Exp $    */
+/*     $NetBSD: xhci.c,v 1.107.2.7 2020/12/23 12:34:38 martin Exp $    */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.107.2.6 2020/05/25 15:31:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.107.2.7 2020/12/23 12:34:38 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -4151,7 +4151,6 @@
        XHCIHIST_CALLARGS("%#jx", (uintptr_t)xfer, 0, 0, 0);
 
        KASSERT(mutex_owned(&sc->sc_lock));
-       KASSERT(xfer->ux_pipe->up_intrxfer == xfer);
        usbd_xfer_abort(xfer);
 }
 
diff -r 79a13d0bbfcc -r 045e23b39ab4 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c      Sat Dec 19 13:56:20 2020 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c      Wed Dec 23 12:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2.c,v 1.59.4.3 2020/03/01 12:35:16 martin Exp $     */
+/*     $NetBSD: dwc2.c,v 1.59.4.4 2020/12/23 12:34:38 martin Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.59.4.3 2020/03/01 12:35:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.59.4.4 2020/12/23 12:34:38 martin Exp $");
 
 #include "opt_usb.h"
 
@@ -880,7 +880,6 @@
        struct dwc2_softc *sc __diagused = DWC2_XFER2SC(xfer);
 
        KASSERT(mutex_owned(&sc->sc_lock));
-       KASSERT(xfer->ux_pipe->up_intrxfer == xfer);
 
        DPRINTF("xfer=%p\n", xfer);
        usbd_xfer_abort(xfer);



Home | Main Index | Thread Index | Old Index