NetBSD-Bugs archive

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

Re: port-arm/60021: USB-only boot: uhub0 attaches but uhub1 never appears, no hotplug events; SD-boot sees hub+umass fine



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

From: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
To: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Cc: mac%culver.net@localhost,
 "gnats-bugs%netbsd.org@localhost" <gnats-bugs%NetBSD.org@localhost>,
 "netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%NetBSD.org@localhost>
Subject: Re: port-arm/60021: USB-only boot: uhub0 attaches but uhub1 never
 appears, no hotplug events; SD-boot sees hub+umass fine
Date: Tue, 4 Aug 2026 19:32:12 +0100

 > On 4 Aug 2026, at 14:34, Taylor R Campbell <riastradh%NetBSD.org@localhost> =
 wrote:
 >=20
 >> Date: Sat, 21 Feb 2026 10:39:41 +0000
 >> From: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
 >>=20
 >> This is almost certainly that autoconf doesn't wait (long enough) for
 >> sub-ordintate hubs
 >>=20
 >> https://nxr.netbsd.org/xref/src/sys/dev/usb/uhub.c#880
 >>=20
 >>     880 mutex_enter(&sc->sc_lock);
 >>     881 sc->sc_explorepending =3D false;
 >>     882 for (int i =3D 0; i < sc->sc_statuslen; i++) {
 >>     883 if (sc->sc_statuspend[i] !=3D 0) {
 >>     884 memcpy(sc->sc_status, sc->sc_statuspend,
 >>     885    sc->sc_statuslen);
 >>     886 memset(sc->sc_statuspend, 0, sc->sc_statuslen);
 >>     887 usb_needs_explore(sc->sc_hub);
 >>     888 break;
 >>     889 }
 >>     890 }
 >>     891 mutex_exit(&sc->sc_lock);
 >>     892 if (sc->sc_first_explore) {
 >>     893 config_pending_decr(sc->sc_dev);
 >>     894 sc->sc_first_explore =3D false;
 >>     895 }
 >=20
 > I don't understand, doesn't it wait for subordinate hubs?
 
 Sure, but not long enough...
 
 > ... Maybe the
 > USB hub just doesn't report the device ready at first?
 
 Because there=E2=80=99s no guarantee (afaik) that the root hub will see =
 the built-in hub immediately.
 



Home | Main Index | Thread Index | Old Index