From 5b24870b0b8fb52cfc1715886eaf8cb3e9fe99c6 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sun, 16 Jul 2023 09:33:18 +0000 Subject: [PATCH] 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@ --- sys/dev/usb/xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 518a569240d..8b78d5ff2cb 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.128 2023/01/01 21:45:40 kettenis Exp $ */ +/* $OpenBSD: xhci.c,v 1.129 2023/07/16 09:33:18 kettenis Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -656,7 +656,7 @@ xhci_softintr(void *v) { struct xhci_softc *sc = v; - if (sc->sc_bus.dying) + if (sc->sc_dead) return; sc->sc_bus.intr_context++; -- 2.20.1