From patchwork Fri Feb 26 04:11:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 82254 X-Patchwork-Delegate: lenb@kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1Q4Prjc016623 for ; Fri, 26 Feb 2010 04:25:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935192Ab0BZEZx (ORCPT ); Thu, 25 Feb 2010 23:25:53 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:44608 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935187Ab0BZEZx (ORCPT ); Thu, 25 Feb 2010 23:25:53 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id C2688E2588; Thu, 25 Feb 2010 23:11:32 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 25 Feb 2010 23:11:32 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; s=smtpout; bh=hlIhJLHID0Zh/qcdjLAA5AkCVBI=; b=p4OLegn29XUUAqawJNMnqWVofNOGyvbWCT9pqDgV/fOUifQytP6QzOI98giV+g/QIMdYWoX4Gmafa3UAqkrBOYhTFy++YaWudUS4PkD2wRQy11Wi/ZuylJw2Ypbvb7Q5EQn0AuRL0feE3HYF4tHnwMI8yNEliTHffr7q0VLCHzo= X-Sasl-enc: zizQAnvqy79xptM+n1kCFwRpF/5qfqaYYTKvurS0pkdE 1267157492 Received: from khazad-dum.debian.net (unknown [201.82.165.62]) by mail.messagingengine.com (Postfix) with ESMTPSA id 54F7A4BAEA1; Thu, 25 Feb 2010 23:11:32 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 20C1B2824C; Fri, 26 Feb 2010 01:11:29 -0300 (BRT) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BTS5O8DwjZpk; Fri, 26 Feb 2010 01:11:28 -0300 (BRT) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 3F20B28264; Fri, 26 Feb 2010 01:11:27 -0300 (BRT) From: Henrique de Moraes Holschuh To: Len Brown Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Henrique de Moraes Holschuh , stable@kernel.org Subject: [PATCH 5/6] thinkpad-acpi: fix bluetooth/wwan resume Date: Fri, 26 Feb 2010 01:11:23 -0300 Message-Id: <1267157484-23925-6-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1267157484-23925-1-git-send-email-hmh@hmh.eng.br> References: <1267157484-23925-1-git-send-email-hmh@hmh.eng.br> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 26 Feb 2010 04:25:55 +0000 (UTC) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 5f45083..3af4628 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3878,7 +3878,7 @@ enum { TP_ACPI_BLUETOOTH_HWPRESENT = 0x01, /* Bluetooth hw available */ TP_ACPI_BLUETOOTH_RADIOSSW = 0x02, /* Bluetooth radio enabled */ TP_ACPI_BLUETOOTH_RESUMECTRL = 0x04, /* Bluetooth state at resume: - off / last state */ + 0 = disable, 1 = enable */ }; enum { @@ -3924,10 +3924,11 @@ static int bluetooth_set_status(enum tpacpi_rfkill_state state) } #endif - /* We make sure to keep TP_ACPI_BLUETOOTH_RESUMECTRL off */ - status = TP_ACPI_BLUETOOTH_RESUMECTRL; if (state == TPACPI_RFK_RADIO_ON) - status |= TP_ACPI_BLUETOOTH_RADIOSSW; + status = TP_ACPI_BLUETOOTH_RADIOSSW + | TP_ACPI_BLUETOOTH_RESUMECTRL; + else + status = 0; if (!acpi_evalf(hkey_handle, NULL, "SBDC", "vd", status)) return -EIO; @@ -4078,7 +4079,7 @@ enum { TP_ACPI_WANCARD_HWPRESENT = 0x01, /* Wan hw available */ TP_ACPI_WANCARD_RADIOSSW = 0x02, /* Wan radio enabled */ TP_ACPI_WANCARD_RESUMECTRL = 0x04, /* Wan state at resume: - off / last state */ + 0 = disable, 1 = enable */ }; #define TPACPI_RFK_WWAN_SW_NAME "tpacpi_wwan_sw" @@ -4115,10 +4116,11 @@ static int wan_set_status(enum tpacpi_rfkill_state state) } #endif - /* We make sure to set TP_ACPI_WANCARD_RESUMECTRL */ - status = TP_ACPI_WANCARD_RESUMECTRL; if (state == TPACPI_RFK_RADIO_ON) - status |= TP_ACPI_WANCARD_RADIOSSW; + status = TP_ACPI_WANCARD_RADIOSSW + | TP_ACPI_WANCARD_RESUMECTRL; + else + status = 0; if (!acpi_evalf(hkey_handle, NULL, "SWAN", "vd", status)) return -EIO;