Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb uhci(4): Stop taking the intr lock in uhci_run.



details:   https://anonhg.NetBSD.org/src/rev/2b3253a7a1ee
branches:  trunk
changeset: 363469:2b3253a7a1ee
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Mar 13 11:29:46 2022 +0000

description:
uhci(4): Stop taking the intr lock in uhci_run.

Not needed for anything here.

diffstat:

 sys/dev/usb/uhci.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 488f4557d53f -r 2b3253a7a1ee sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sun Mar 13 11:29:38 2022 +0000
+++ b/sys/dev/usb/uhci.c        Sun Mar 13 11:29:46 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.314 2022/03/13 11:29:38 riastradh Exp $     */
+/*     $NetBSD: uhci.c,v 1.315 2022/03/13 11:29:46 riastradh Exp $     */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2016, 2020 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.314 2022/03/13 11:29:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.315 2022/03/13 11:29:46 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1786,7 +1786,6 @@
        UHCIHIST_FUNC(); UHCIHIST_CALLED();
 
        run = run != 0;
-       mutex_spin_enter(&sc->sc_intr_lock);
 
        DPRINTF("setting run=%jd", run, 0, 0, 0);
        cmd = UREAD2(sc, UHCI_CMD);
@@ -1799,14 +1798,12 @@
                running = !(UREAD2(sc, UHCI_STS) & UHCI_STS_HCH);
                /* return when we've entered the state we want */
                if (run == running) {
-                       mutex_spin_exit(&sc->sc_intr_lock);
                        DPRINTF("done cmd=%#jx sts=%#jx",
                            UREAD2(sc, UHCI_CMD), UREAD2(sc, UHCI_STS), 0, 0);
                        return USBD_NORMAL_COMPLETION;
                }
-               usb_delay_ms_locked(&sc->sc_bus, 1, &sc->sc_intr_lock);
+               usb_delay_ms(&sc->sc_bus, 1);
        }
-       mutex_spin_exit(&sc->sc_intr_lock);
        printf("%s: cannot %s\n", device_xname(sc->sc_dev),
               run ? "start" : "stop");
        return USBD_IOERROR;



Home | Main Index | Thread Index | Old Index