From nobody Mon Feb 23 16:21:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKR1z2Q9rz6Thnm for ; Mon, 23 Feb 2026 16:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKR1z1cJMz3pJm for ; Mon, 23 Feb 2026 16:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S7GJAty7Tmkt7dVH2D26vRyUxfX794ZiQ7ktvANXOzg=; b=g1MAvL9+Vgu8+C7toapunSpMx0mwtqdC2QGbPFJ6Na6Li2tLU21uKTW8QNEN5bbG0yZWn3 AqwYpgs9NiAVKQcSSPioCOnCf2GcEbgSEMK1btqaIYl3u6iRUaGI4cCVJBkudmwAuT3CrI zqUCNkOvOlptAlDXhdAxceqpkmX9dn/fNcASbWhUqveKjfArfISeyh0Gv83sgAr2v/NbCz Z8TfmRTPgV675TRyDS3AMbHwp2nv4GFoXrjE/B/a+0ILqiHJpoURjPXY6i/d/3ETrpeG2x OTFFOk/JQvhx8Do4OHrHdCoQKdqwIJCqwjUXfDF8KaEwDB+R34wF6uNyzKENXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771863703; a=rsa-sha256; cv=none; b=l6PSA1uxm2I9xf3PPLUcoaA7qicX2wnFW0JYLpXymrvlnHQzvkahSzfr3es68T8/9ZrAZZ IE/Mh5s9bu5ihG6GCuctKuNkemiieYR3jcvYU3YnLx3aN4ws2QrlLBwvobq05T6ToK9H+z lsCidryGDDSX57quEA9Liv0M3uHF6nvurCQxpl7T5WmJXJRzvtlHvA/5f5kW1Ml6n7RCLD oaYR3yoPDSOLUlJ4dw4aA6AEmNTxBUU05rsKMJ37d94RdFy++zNSLDethq2+iRPrtA7gN4 lqmT3ct+9Z0kD8a3Y1kX9UB6/1UG5QIdJm8TKo0FxE24SzgS9P3r1qdSagEaag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S7GJAty7Tmkt7dVH2D26vRyUxfX794ZiQ7ktvANXOzg=; b=igI4a85aIQ1WM6ryZc+g092dRpRKmTxOXLnjv6RypIYODLiTjlZVMz9eIDomF0P1yKB/Ng Qt+vyaHD7VSV6AQwBAF0pfcgbXE/9Lb9y2LVq1Wb8njL4SmCLOwMGEN9vZLvdeemksZY41 KU2SiX2XfFZDWR/KjosZ103AYZs8CMsRfc/6k02Iwd6c41sEGchr8ZCHZqH5v6c7Gh7027 h5Db7GVNi6wEoYlBlTfRKA8x4jFQeMBq8f58nnTy7OZv7mrrDIVvOH2TQ8BXaLDj5SBozd mVAcDv8WvwkPrU4Nxv0IfNi2Mvb9FxvzChEtMafbuSU/TPCUufn0VChnXtAgFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKR1z16ljzdlN for ; Mon, 23 Feb 2026 16:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a94 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 16:21:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Aymeric Wibo Subject: git: 16822dac32ab - main - acpi_panasonic: Clear wireless RF_KILL on boot and resume List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16822dac32ab8955539ffa4eda05145df8638154 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 16:21:43 +0000 Message-Id: <699c7e97.31a94.4a81884f@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=16822dac32ab8955539ffa4eda05145df8638154 commit 16822dac32ab8955539ffa4eda05145df8638154 Author: Abdelkader Boudih AuthorDate: 2026-02-23 16:11:10 +0000 Commit: Aymeric Wibo CommitDate: 2026-02-23 16:11:23 +0000 acpi_panasonic: Clear wireless RF_KILL on boot and resume On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on shutdown and suspend when battery is at certain level, causing wireless to boot with hard block. Call WLSW.SHRF during attach and resume to clear the block. Tested on Panasonic FZ-Y1 with Intel Wireless 7265. Reviewed by: adrian, obiwac Approved by: adrian, obiwac Differential Revision: https://reviews.freebsd.org/D55265 --- sys/dev/acpi_support/acpi_panasonic.c | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/sys/dev/acpi_support/acpi_panasonic.c b/sys/dev/acpi_support/acpi_panasonic.c index 67d51ea9bc1f..8fea47ee45e8 100644 --- a/sys/dev/acpi_support/acpi_panasonic.c +++ b/sys/dev/acpi_support/acpi_panasonic.c @@ -80,6 +80,8 @@ static int acpi_panasonic_probe(device_t dev); static int acpi_panasonic_attach(device_t dev); static int acpi_panasonic_detach(device_t dev); static int acpi_panasonic_shutdown(device_t dev); +static int acpi_panasonic_resume(device_t dev); +static void acpi_panasonic_clear_rfkill(device_t dev); static int acpi_panasonic_sysctl(SYSCTL_HANDLER_ARGS); static UINT64 acpi_panasonic_sinf(ACPI_HANDLE h, UINT64 index); static void acpi_panasonic_sset(ACPI_HANDLE h, UINT64 index, @@ -116,6 +118,7 @@ static device_method_t acpi_panasonic_methods[] = { DEVMETHOD(device_attach, acpi_panasonic_attach), DEVMETHOD(device_detach, acpi_panasonic_detach), DEVMETHOD(device_shutdown, acpi_panasonic_shutdown), + DEVMETHOD(device_resume, acpi_panasonic_resume), DEVMETHOD_END }; @@ -172,6 +175,8 @@ acpi_panasonic_attach(device_t dev) CTLFLAG_MPSAFE, sc, i, acpi_panasonic_sysctl, "I", ""); } + acpi_panasonic_clear_rfkill(dev); + #if 0 /* Activate hotkeys */ status = AcpiEvaluateObject(sc->handle, "", NULL, NULL); @@ -232,6 +237,37 @@ acpi_panasonic_shutdown(device_t dev) return (0); } +static int +acpi_panasonic_resume(device_t dev) +{ + + acpi_panasonic_clear_rfkill(dev); + return (0); +} + +static void +acpi_panasonic_clear_rfkill(device_t dev) +{ + ACPI_HANDLE wlsw_handle; + ACPI_STATUS status; + + /* + * Call WLSW.SHRF to clear wireless RF_KILL on models that have it. + * On FZ-Y1 and similar models, the EC latches RF_KILL on shutdown + * and suspend, causing the wireless card to boot with hard block + * enabled. The SHRF method sets the EC state to deassert RF_KILL + * GPIO on mini-PCIe pin 20 via SMI (ASRV call with function + * 0x0F/0x03). + */ + status = AcpiGetHandle(NULL, "\\_SB.WLSW", &wlsw_handle); + if (ACPI_SUCCESS(status)) { + status = AcpiEvaluateObject(wlsw_handle, "SHRF", NULL, NULL); + if (ACPI_FAILURE(status) && bootverbose) + device_printf(dev, "WLSW.SHRF failed: %s\n", + AcpiFormatException(status)); + } +} + static int acpi_panasonic_sysctl(SYSCTL_HANDLER_ARGS) {