When detaching devices when we suspend, we need to continue processing
command completion events. So only return early in xhci_softintr() if
the controller is dead instead of dying. This fixes USB suspend/resume
in Apple M1/M2.
ok mlarkin@, deraadt@
-----
The change does not only allow completion events to be processed but also
events that get processed by the drivers attached to this usb bus. As a
result I see a uvm panic on suspend in urtwn(4) which is triggered by a
bad rx eof.
OK kettenis@
-/* $OpenBSD: xhci.c,v 1.129 2023/07/16 09:33:18 kettenis Exp $ */
+/* $OpenBSD: xhci.c,v 1.130 2023/07/20 09:43:00 claudio Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
{
struct xhci_softc *sc = v;
- if (sc->sc_dead)
+ if (sc->sc_bus.dying)
return;
sc->sc_bus.intr_context++;