All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: Andi Kleen <andi@firstfloor.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Len Brown <lenb@kernel.org>,
	linux-next@vger.kernel.org, stable@kernel.org
Subject: Re: linux-next: acpi tree build failure
Date: Tue, 12 Aug 2008 21:07:54 +0100	[thread overview]
Message-ID: <200808122107.55403.carlos@strangeworlds.co.uk> (raw)
In-Reply-To: <20080812070658.GY9038@one.firstfloor.org>

On Tuesday 12 August 2008 08:06:58 Andi Kleen wrote:
> > Clearly, this hasn't even been build tested.  A bit more care, please.
>
> It has, but the ACER_WMI option got disabled for unknown reasons in the
> test builds :/
>
> Thanks, will fix.
>
> -Andi

Looks like my config was screwed up as well. Here's a fixed version of the patch.

-Carlos
---

acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops

From: Carlos Corbacho <carlos@strangeworlds.co.uk>

In the old acer_acpi, I discovered that on some of the newer AMW0 laptops
that supported the WMID methods, they don't work properly for setting the
wireless and bluetooth values.

So for the AMW0 V2 laptops, we want to use both the 'old' AMW0 and the
'new' WMID methods for setting wireless & bluetooth to guarantee we always
enable it.

This was fixed in acer_acpi some time ago, but I forgot to port the patch
over to acer-wmi when it was merged.

(Without this patch, early AMW0 V2 laptops such as the Aspire 5040 won't
work with acer-wmi, where-as they did with the old acer_acpi).

v2: Fix compile error

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@kernel.org
---

 drivers/misc/acer-wmi.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)


diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index e7a3fe5..b2d9878 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -803,11 +803,30 @@ static acpi_status get_u32(u32 *value, u32 cap)
 
 static acpi_status set_u32(u32 value, u32 cap)
 {
+	acpi_status status;
+
 	if (interface->capability & cap) {
 		switch (interface->type) {
 		case ACER_AMW0:
 			return AMW0_set_u32(value, cap, interface);
 		case ACER_AMW0_V2:
+			if (cap == ACER_CAP_MAILLED)
+				return AMW0_set_u32(value, cap, interface);
+
+			/*
+			 * On some models, some WMID methods don't toggle
+			 * properly. For those cases, we want to run the AMW0
+			 * method afterwards to be certain we've really toggled
+			 * the device state.
+			 */
+			if (cap == ACER_CAP_WIRELESS ||
+				cap == ACER_CAP_BLUETOOTH) {
+				status = WMID_set_u32(value, cap, interface);
+				if (ACPI_FAILURE(status))
+					return status;
+
+				return AMW0_set_u32(value, cap, interface);
+			}
 		case ACER_WMID:
 			return WMID_set_u32(value, cap, interface);
 		default:

  reply	other threads:[~2008-08-12 20:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12  3:16 linux-next: acpi tree build failure Stephen Rothwell
2008-08-12  7:06 ` Andi Kleen
2008-08-12 20:07   ` Carlos Corbacho [this message]
2008-08-12 21:29 ` Carlos Corbacho
2008-10-15  4:51 Stephen Rothwell
2008-10-15  5:08 Stephen Rothwell
2008-10-15  5:15 ` Shaohua Li
2009-02-02  2:22 Stephen Rothwell
2009-02-05  2:13 ` Stephen Rothwell
2009-02-05  5:00   ` Greg KH
2009-02-07  4:06     ` Len Brown
2009-02-07  5:32       ` Greg KH
2009-02-24  4:37 Stephen Rothwell
2009-03-03  1:47 ` Stephen Rothwell
2009-03-16  5:10   ` Stephen Rothwell
2009-03-27 20:58   ` Len Brown
2009-03-18  0:57 Stephen Rothwell
2009-03-18  1:09 ` Lin Ming
2009-03-18  3:27   ` Stephen Rothwell
2009-03-27 20:49     ` Len Brown
2009-04-24  4:46 Stephen Rothwell
2009-04-24 15:15 ` Len Brown
2009-06-30  3:16 Stephen Rothwell
2009-07-06  6:18 ` Stephen Rothwell
2009-07-07  3:17 ` Len Brown
2009-07-07  3:53   ` Stephen Rothwell
2009-09-01  2:57 Stephen Rothwell
2009-09-07 13:46 ` Stephen Rothwell
2009-09-08  0:47   ` Zhang Rui
2009-09-09  4:02     ` Len Brown
2009-09-09  5:45       ` Stephen Rothwell
2009-09-26  2:15 Stephen Rothwell
2009-09-26  3:11 ` Bjorn Helgaas
2009-09-27  1:27   ` Crane Cai
2009-09-27  7:54     ` Len Brown
2009-12-14  1:20 Stephen Rothwell
2009-12-14 19:20 ` Bjorn Helgaas
2009-12-15  4:57 ` Bjorn Helgaas
2009-12-15 22:37   ` Len Brown
2009-12-15 23:28     ` Stephen Rothwell
2009-12-16  2:28     ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200808122107.55403.carlos@strangeworlds.co.uk \
    --to=carlos@strangeworlds.co.uk \
    --cc=andi@firstfloor.org \
    --cc=lenb@kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.