NetBSD-Bugs archive

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

Re: port-amd64/59180: System reboots instead of shutting down



The following reply was made to PR port-amd64/59180; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Daniel Bowling <swaggboi@gangstalking.agency>
Cc: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: port-amd64/59180: System reboots instead of shutting down
Date: Sun, 16 Mar 2025 14:38:40 +0000

 This is a multi-part message in MIME format.
 --=_QJyEfqlAfncoM8fB56hLDQdX5vxg3caH
 
 Can you please try a kernel with the attached patch and see if it
 solves the problem?
 
 (If you need, I can provide a prebuilt kernel with this patch.)
 
 --=_QJyEfqlAfncoM8fB56hLDQdX5vxg3caH
 Content-Type: text/plain; charset="ISO-8859-1"; name="pr59180-failedohcidetachpanic-part1"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="pr59180-failedohcidetachpanic-part1.patch"
 
 # HG changeset patch
 # User Taylor R Campbell <riastradh%NetBSD.org@localhost>
 # Date 1742134550 0
 #      Sun Mar 16 14:15:50 2025 +0000
 # Branch trunk
 # Node ID 3f8a61dfed92d463627e7bbf859c24f0255dd5aa
 # Parent  4c220187a0cad6a0dbb2b1ceeda3067ff430b505
 # EXP-Topic riastradh-pr59180-failedohcidetachpanic
 ohci(4): Handle failed attach when we detach.
 
 PR port-amd64/59180: System reboots instead of shutting down
 
 diff -r 4c220187a0ca -r 3f8a61dfed92 sys/dev/usb/ohci.c
 --- a/sys/dev/usb/ohci.c	Thu Mar 13 18:41:34 2025 +0000
 +++ b/sys/dev/usb/ohci.c	Sun Mar 16 14:15:50 2025 +0000
 @@ -373,6 +373,9 @@ ohci_detach(struct ohci_softc *sc, int f
  {
  	int rv =3D 0;
 =20
 +	if (!sc->sc_attached)
 +		return 0;
 +
  	if (sc->sc_child !=3D NULL)
  		rv =3D config_detach(sc->sc_child, flags);
 =20
 @@ -1092,6 +1095,7 @@ ohci_init(ohci_softc_t *sc)
  	DPRINTF("enabling %#jx", sc->sc_eintrs | OHCI_MIE, 0, 0, 0);
  	OWRITE4(sc, OHCI_INTERRUPT_ENABLE, sc->sc_eintrs | OHCI_MIE);
 =20
 +	sc->sc_attached =3D true;
  	return 0;
 =20
   bad5:
 diff -r 4c220187a0ca -r 3f8a61dfed92 sys/dev/usb/ohcivar.h
 --- a/sys/dev/usb/ohcivar.h	Thu Mar 13 18:41:34 2025 +0000
 +++ b/sys/dev/usb/ohcivar.h	Sun Mar 16 14:15:50 2025 +0000
 @@ -90,6 +90,7 @@ typedef struct ohci_softc {
  	bus_space_tag_t iot;
  	bus_space_handle_t ioh;
  	bus_size_t sc_size;
 +	bool sc_attached;
 =20
  	kmutex_t sc_lock;
  	kmutex_t sc_intr_lock;
 
 --=_QJyEfqlAfncoM8fB56hLDQdX5vxg3caH--
 


Home | Main Index | Thread Index | Old Index