NetBSD-Bugs archive

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

Re: port-i386/57662: StarTech ICUSB23208FD 8-Port USB-to-Serial Adapter Hub fails on Alix with NetBSD/i386 9.3



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

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Alexander Schreiber <als%thangorodrim.ch@localhost>
Cc: matthew green <mrg%eterna.com.au@localhost>,
	port-i386-maintainer%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost, gnats-bugs%netbsd.org@localhost
Subject: Re: port-i386/57662: StarTech ICUSB23208FD 8-Port USB-to-Serial Adapter Hub fails on Alix with NetBSD/i386 9.3
Date: Sat, 28 Oct 2023 02:05:02 +0000

 This is a multi-part message in MIME format.
 --=_iH22Mq8cEGadrlwrn55fhppMX7+AHtfW
 
 Also: Can you try this patch on top as well?
 
 --=_iH22Mq8cEGadrlwrn55fhppMX7+AHtfW
 Content-Type: text/plain; charset="ISO-8859-1"; name="pr57662-ehcisyncloop.2"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="pr57662-ehcisyncloop.2.patch"
 
 From fe71f2d88628e0a801d04fc4ad4b4667272c065f Mon Sep 17 00:00:00 2001
 From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 Date: Sat, 28 Oct 2023 02:01:10 +0000
 Subject: [PATCH] ehci(4): Fix bug causing missed wakeups since ehci.c 1.308.
 
 For reasons beyond me now, I used cv_signal on the same cv that is
 used to wait for the doorbell to be available _and_ to wait for the
 host controller to acknowledge the doorbell.  Which means when the
 host controller acknowledges the doorbell, we might wake some thread
 waiting for the doorbell to be available -- and leave the thread
 waiting for the doorbell acknowledgment hanging indefinitely.
 
 PR port-i386/57662
 
 XXX pullup-10
 ---
  sys/dev/usb/ehci.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
 index b59ad33b6395..3ffdec9c6657 100644
 --- a/sys/dev/usb/ehci.c
 +++ b/sys/dev/usb/ehci.c
 @@ -826,7 +826,7 @@ ehci_doorbell(void *addr)
  	if (sc->sc_doorbelllwp =3D=3D NULL)
  		DPRINTF("spurious doorbell interrupt", 0, 0, 0, 0);
  	sc->sc_doorbelllwp =3D NULL;
 -	cv_signal(&sc->sc_doorbell);
 +	cv_broadcast(&sc->sc_doorbell);
  	mutex_exit(&sc->sc_lock);
  }
 =20
 @@ -2279,7 +2279,7 @@ ehci_sync_hc(ehci_softc_t *sc)
  		now =3D getticks();
  		if (now - starttime >=3D delta) {
  			sc->sc_doorbelllwp =3D NULL;
 -			cv_signal(&sc->sc_doorbell);
 +			cv_broadcast(&sc->sc_doorbell);
  			DPRINTF("doorbell timeout", 0, 0, 0, 0);
  #ifdef DIAGNOSTIC		/* XXX DIAGNOSTIC abuse, do this differently */
  			printf("ehci_sync_hc: timed out\n");
 
 --=_iH22Mq8cEGadrlwrn55fhppMX7+AHtfW--
 


Home | Main Index | Thread Index | Old Index