NetBSD-Bugs archive

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

Re: kern/56739: Hang during boot since recent USB changes



The following reply was made to PR kern/56739; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Andreas Gustafsson <gson%gson.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/56739: Hang during boot since recent USB changes
Date: Sat, 5 Mar 2022 21:49:28 +0000

 Thanks, I see the problem -- uhci_poll_hub takes the bus lock from
 callout, but uhci_roothub_ctrl waits for a callout (via usb_delay_ms
 -> kpause) while holding the bus lock.
 
 Need to resolve this deadlock, perhaps by deferring uhci_poll_hub to a
 USB task.
 
 ...Except I'm not sure it's kosher to do kpause under any lock that is
 taken at IPL_SOFTSERIAL (a higher priority than IPL_SOFTCLOCK where
 callouts run to wake kpause), and ~every USB HCI driver does that --
 the bus lock is taken from softint context at IPL_SOFTSERIAL to
 complete xfers, and the HCI drivers tend to use usb_delay_ms under the
 bus lock for various things.  Need to think more about that.
 


Home | Main Index | Thread Index | Old Index