Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145007785
D55265.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D55265.id.diff
View Options
diff --git a/sys/dev/acpi_support/acpi_panasonic.c b/sys/dev/acpi_support/acpi_panasonic.c
--- a/sys/dev/acpi_support/acpi_panasonic.c
+++ b/sys/dev/acpi_support/acpi_panasonic.c
@@ -80,6 +80,7 @@
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 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 +117,7 @@
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 +174,23 @@
CTLFLAG_MPSAFE, sc, i, acpi_panasonic_sysctl, "I", "");
}
+ /*
+ * 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,
+ * 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).
+ */
+ ACPI_HANDLE wlsw_handle;
+ 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));
+ }
+ }
+
#if 0
/* Activate hotkeys */
status = AcpiEvaluateObject(sc->handle, "", NULL, NULL);
@@ -232,6 +251,28 @@
return (0);
}
+static int
+acpi_panasonic_resume(device_t dev)
+{
+ ACPI_STATUS status;
+ ACPI_HANDLE wlsw_handle;
+
+ /*
+ * Re-enable wireless on resume from suspend.
+ * The EC latches RF_KILL on suspend, so we must call SHRF again.
+ */
+ 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));
+ }
+ }
+
+ return (0);
+}
+
static int
acpi_panasonic_sysctl(SYSCTL_HANDLER_ARGS)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 16, 12:01 AM (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28682086
Default Alt Text
D55265.id.diff (2 KB)
Attached To
Mode
D55265: acpi_panasonic: Clear wireless RF_KILL on boot and resume
Attached
Detach File
Event Timeline
Log In to Comment