Module Name: src Committed By: riastradh Date: Wed Aug 17 20:03:05 UTC 2022
Modified Files: src/sys/dev/usb: uhci.c Log Message: uhci(4): Fix wrong lock in callout_halt in uhci_suspend. Maybe this should just be unconditional and outside the lock to make it simpler. Found by code inspection. Maybe someone should test uhci suspend resume... To generate a diff of this commit: cvs rdiff -u -r1.315 -r1.316 src/sys/dev/usb/uhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/uhci.c diff -u src/sys/dev/usb/uhci.c:1.315 src/sys/dev/usb/uhci.c:1.316 --- src/sys/dev/usb/uhci.c:1.315 Sun Mar 13 11:29:46 2022 +++ src/sys/dev/usb/uhci.c Wed Aug 17 20:03:05 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.315 2022/03/13 11:29:46 riastradh Exp $ */ +/* $NetBSD: uhci.c,v 1.316 2022/08/17 20:03:05 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.315 2022/03/13 11:29:46 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.316 2022/08/17 20:03:05 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -761,7 +761,7 @@ uhci_suspend(device_t dv, const pmf_qual mutex_enter(&sc->sc_lock); sc->sc_suspend = PWR_SUSPEND; if (sc->sc_intr_xfer != NULL) - callout_halt(&sc->sc_poll_handle, &sc->sc_intr_lock); + callout_halt(&sc->sc_poll_handle, &sc->sc_lock); mutex_exit(&sc->sc_lock); cmd = UREAD2(sc, UHCI_CMD);