From mboxrd@z Thu Jan 1 00:00:00 1970 From: akpm@linux-foundation.org Subject: [patch 03/12] dell_laptop: when the "hardware" switch is disabled, don't actually allow changing the softblock status. Date: Tue, 17 Nov 2009 14:27:29 -0800 Message-ID: <200911172227.nAHMRUfe023122@imap1.linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:42338 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755527AbZKQW2h (ORCPT ); Tue, 17 Nov 2009 17:28:37 -0500 Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org, Mario_Limonciello@Dell.com From: Mario Limonciello The "hardware" switch is tied directly to a BIOS interface that will connect and disconnect the hardware from the bus. If you use the software interface to request the BIOS to make these changes, the HW switch will be in an inconsistent state and LEDs may not reflect the state of the HW. Signed-off-by: Mario Limonciello Signed-off-by: Andrew Morton --- drivers/platform/x86/dell-laptop.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN drivers/platform/x86/dell-laptop.c~dell_laptop-when-the-hardware-switch-is-disabled-dont-actually-allow-changing-the-softblock-status drivers/platform/x86/dell-laptop.c --- a/drivers/platform/x86/dell-laptop.c~dell_laptop-when-the-hardware-switch-is-disabled-dont-actually-allow-changing-the-softblock-status +++ a/drivers/platform/x86/dell-laptop.c @@ -181,6 +181,10 @@ static int dell_rfkill_set(void *data, b unsigned long radio = (unsigned long)data; memset(&buffer, 0, sizeof(struct calling_interface_buffer)); + dell_send_request(&buffer, 17, 11); + if (!(buffer.output[1] & BIT(16))) + return -EINVAL; + buffer.input[0] = (1 | (radio<<8) | (disable << 16)); dell_send_request(&buffer, 17, 11); _