From: Mark Kettenis Subject: Re: qwz: enable suspend/resume To: Marcus Glocker Cc: tech@openbsd.org Date: Sun, 07 Jun 2026 10:34:58 +0200 > Date: Sun, 7 Jun 2026 08:39:07 +0200 > From: Marcus Glocker > > This makes suspend/resume with qwz(4) work on my Samsung Galaxy Book4 > Edge. > > Ok? So qwx(4) calls _core_deinit() from _stop(), whereas qwz(4) has: /* * Firmware stays running across ifconfig down/up; the chip is * only released on driver detach. Do not clear pdevs_active * or call qwz_core_deinit() here. */ In that context, this diff makes sense. But I do wonder whether qwx(4) should do the same thing. Things to consider are: 1. Are there any power savings to be had by stopping the firmware on ifconfig down? 2. Are there firmware differences that justify that qwz(4) diverges from qwx(4) here. > Index: sys/dev/ic/qwz.c > =================================================================== > RCS file: /cvs/src/sys/dev/ic/qwz.c,v > diff -u -p -u -p -r1.38 qwz.c > --- sys/dev/ic/qwz.c 26 May 2026 14:55:16 -0000 1.38 > +++ sys/dev/ic/qwz.c 7 Jun 2026 06:01:46 -0000 > @@ -24857,8 +24857,14 @@ qwz_activate(struct device *self, int ac > qwz_stop(ifp); > rw_exit(&sc->ioctl_rwl); > } > + if (sc->fw_initialized) > + qwz_core_deinit(sc); > break; > case DVACT_RESUME: > + err = qwz_hal_srng_init(sc); > + if (err) > + printf("%s: could not initialize hal\n", > + sc->sc_dev.dv_xname); > break; > case DVACT_WAKEUP: > if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) == IFF_UP) { > >