linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
@ 2013-04-13  1:31 Pali Rohár
  2013-04-13  1:35 ` Matthew Garrett
  2013-08-14  8:19 ` BUG: Again: Fn keys not working on EliteBook 8460p after b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd Pali Rohár
  0 siblings, 2 replies; 17+ messages in thread
From: Pali Rohár @ 2013-04-13  1:31 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Matthew Garrett, linux-kernel, platform-driver-x86

[-- Attachment #1: Type: Text/Plain, Size: 443 bytes --]

Hello,

all Fn keys, wifi switch, web and mute buttons not working anymore 
on my notebook HP EliteBook 8460p. I bisected git commit which 
broke all above keys: fabf85e3ca15d5b94058f391dac8df870cdd427a

When I reverted that commit after reboot buttons started working 
again. Can you fix it or revert that broken commit? This is 
critical problem, which caused my notebook to be unusable...

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-13  1:31 BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a Pali Rohár
@ 2013-04-13  1:35 ` Matthew Garrett
  2013-04-13 12:36   ` Kyle Evans
  2013-08-14  8:19 ` BUG: Again: Fn keys not working on EliteBook 8460p after b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd Pali Rohár
  1 sibling, 1 reply; 17+ messages in thread
From: Matthew Garrett @ 2013-04-13  1:35 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Kyle Evans, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 767 bytes --]

On Sat, 2013-04-13 at 03:31 +0200, Pali Rohár wrote:

> all Fn keys, wifi switch, web and mute buttons not working anymore 
> on my notebook HP EliteBook 8460p. I bisected git commit which 
> broke all above keys: fabf85e3ca15d5b94058f391dac8df870cdd427a
> 
> When I reverted that commit after reboot buttons started working 
> again. Can you fix it or revert that broken commit? This is 
> critical problem, which caused my notebook to be unusable...

Sure, I'll revert that. Kyle, can you look into figuring out a way to
only run this on machines that need it?

-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-13  1:35 ` Matthew Garrett
@ 2013-04-13 12:36   ` Kyle Evans
  2013-04-13 16:21     ` Matthew Garrett
  0 siblings, 1 reply; 17+ messages in thread
From: Kyle Evans @ 2013-04-13 12:36 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

Sure, sorry about that. I was hoping the GUID would be enough. I'll see 
what I can come up with.

On 04/12/2013 09:35 PM, Matthew Garrett wrote:
> On Sat, 2013-04-13 at 03:31 +0200, Pali Rohár wrote:
>
>> all Fn keys, wifi switch, web and mute buttons not working anymore
>> on my notebook HP EliteBook 8460p. I bisected git commit which
>> broke all above keys: fabf85e3ca15d5b94058f391dac8df870cdd427a
>>
>> When I reverted that commit after reboot buttons started working
>> again. Can you fix it or revert that broken commit? This is
>> critical problem, which caused my notebook to be unusable...
> Sure, I'll revert that. Kyle, can you look into figuring out a way to
> only run this on machines that need it?
>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-13 12:36   ` Kyle Evans
@ 2013-04-13 16:21     ` Matthew Garrett
  2013-04-13 17:39       ` Kyle Evans
  0 siblings, 1 reply; 17+ messages in thread
From: Matthew Garrett @ 2013-04-13 16:21 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 479 bytes --]

On Sat, 2013-04-13 at 08:36 -0400, Kyle Evans wrote:
> Sure, sorry about that. I was hoping the GUID would be enough. I'll see 
> what I can come up with.

Sure there's no WMI method that makes the EC write? It's a little weird
for WMI drivers to have to hit the EC directly.

-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-13 16:21     ` Matthew Garrett
@ 2013-04-13 17:39       ` Kyle Evans
  2013-04-13 17:42         ` Matthew Garrett
  2013-04-16 16:26         ` Matthew Garrett
  0 siblings, 2 replies; 17+ messages in thread
From: Kyle Evans @ 2013-04-13 17:39 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

On 04/13/2013 12:21 PM, Matthew Garrett wrote:
> On Sat, 2013-04-13 at 08:36 -0400, Kyle Evans wrote:
>> Sure, sorry about that. I was hoping the GUID would be enough. I'll see
>> what I can come up with.
> Sure there's no WMI method that makes the EC write? It's a little weird
> for WMI drivers to have to hit the EC directly.
>
I have no idea, I didn't know what a DSDT was before trying to get these 
buttons working.

...A quick grep reveals acpi_wmi_ec_space_handler, is that what I should 
use? It calls ec_write itself, but has more function parameters and of 
course error checking to make sure you don't screw up those extra 
parameters. Seems inefficient to me. Or, maybe like it was designed for 
an automated code routine.

Looking further, I don't see any other drivers that use it, ec_write 
seems to be the standard.

Your call though, you are the master in this domain and you wrote the 
driver.



static acpi_status
acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address,
                       u32 bits, u64 *value,
                       void *handler_context, void *region_context)
{
         int result = 0, i = 0;
         u8 temp = 0;

         if ((address > 0xFF) || !value)
                 return AE_BAD_PARAMETER;

         if (function != ACPI_READ && function != ACPI_WRITE)
                 return AE_BAD_PARAMETER;

         if (bits != 8)
                 return AE_BAD_PARAMETER;

         if (function == ACPI_READ) {
                 result = ec_read(address, &temp);
                 (*value) |= ((u64)temp) << i;
         } else {
                 temp = 0xff & ((*value) >> i);
                 result = ec_write(address, temp);
         }

         switch (result) {
         case -EINVAL:
                 return AE_BAD_PARAMETER;
                 break;
         case -ENODEV:
                 return AE_NOT_FOUND;
                 break;
         case -ETIME:
                 return AE_TIME;
                 break;
         default:
                 return AE_OK;
         }
}


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-13 17:39       ` Kyle Evans
@ 2013-04-13 17:42         ` Matthew Garrett
  2013-04-16 16:26         ` Matthew Garrett
  1 sibling, 0 replies; 17+ messages in thread
From: Matthew Garrett @ 2013-04-13 17:42 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 729 bytes --]

On Sat, 2013-04-13 at 13:39 -0400, Kyle Evans wrote:
> On 04/13/2013 12:21 PM, Matthew Garrett wrote:
> > On Sat, 2013-04-13 at 08:36 -0400, Kyle Evans wrote:
> >> Sure, sorry about that. I was hoping the GUID would be enough. I'll see
> >> what I can come up with.
> > Sure there's no WMI method that makes the EC write? It's a little weird
> > for WMI drivers to have to hit the EC directly.
> >
> I have no idea, I didn't know what a DSDT was before trying to get these 
> buttons working.

Got a copy of your ACPI tables?

-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-13 17:39       ` Kyle Evans
  2013-04-13 17:42         ` Matthew Garrett
@ 2013-04-16 16:26         ` Matthew Garrett
  2013-04-17 13:56           ` Pali Rohár
  2013-04-17 15:37           ` Kyle Evans
  1 sibling, 2 replies; 17+ messages in thread
From: Matthew Garrett @ 2013-04-16 16:26 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1334 bytes --]

Can you try this patch?

diff --git a/drivers/platform/x86/hp-wmi.c
b/drivers/platform/x86/hp-wmi.c
index 45cacf7..91cc5df 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -53,6 +53,7 @@
MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
 #define HPWMI_ALS_QUERY 0x3
 #define HPWMI_HARDWARE_QUERY 0x4
 #define HPWMI_WIRELESS_QUERY 0x5
+#define HPWMI_BIOS_QUERY 0x8
 #define HPWMI_HOTKEY_QUERY 0xc
 #define HPWMI_WIRELESS2_QUERY 0x1b
 
@@ -284,6 +285,18 @@ static int hp_wmi_tablet_state(void)
 	return (state & 0x4) ? 1 : 0;
 }
 
+static int hp_wmi_enable_hotkeys()
+{
+	int ret;
+	int query = 1;
+
+	ret = hp_wmi_perform_query(HPWMI_BIOS_QUERY, 1, &query, sizeof(query),
+				   0);
+	if (ret)
+		return -EINVAL;
+	return 0;
+}
+
 static int hp_wmi_set_block(void *data, bool blocked)
 {
 	enum hp_wmi_radio r = (enum hp_wmi_radio) data;
@@ -925,9 +938,7 @@ static int __init hp_wmi_init(void)
 		err = hp_wmi_input_setup();
 		if (err)
 			return err;
-		
-		//Enable magic for hotkeys that run on the SMBus
-		ec_write(0xe6,0x6e);
+		hp_wmi_enable_hotkeys();
 	}
 
 	if (bios_capable) {


-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-16 16:26         ` Matthew Garrett
@ 2013-04-17 13:56           ` Pali Rohár
  2013-04-17 15:37           ` Kyle Evans
  1 sibling, 0 replies; 17+ messages in thread
From: Pali Rohár @ 2013-04-17 13:56 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Kyle Evans, linux-kernel, platform-driver-x86

[-- Attachment #1: Type: Text/Plain, Size: 1475 bytes --]

On Tuesday 16 April 2013 18:26:26 Matthew Garrett wrote:
> Can you try this patch?
> 
> diff --git a/drivers/platform/x86/hp-wmi.c
> b/drivers/platform/x86/hp-wmi.c
> index 45cacf7..91cc5df 100644
> --- a/drivers/platform/x86/hp-wmi.c
> +++ b/drivers/platform/x86/hp-wmi.c
> @@ -53,6 +53,7 @@
> MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
>  #define HPWMI_ALS_QUERY 0x3
>  #define HPWMI_HARDWARE_QUERY 0x4
>  #define HPWMI_WIRELESS_QUERY 0x5
> +#define HPWMI_BIOS_QUERY 0x8
>  #define HPWMI_HOTKEY_QUERY 0xc
>  #define HPWMI_WIRELESS2_QUERY 0x1b
> 
> @@ -284,6 +285,18 @@ static int hp_wmi_tablet_state(void)
>  	return (state & 0x4) ? 1 : 0;
>  }
> 
> +static int hp_wmi_enable_hotkeys()
> +{
> +	int ret;
> +	int query = 1;
> +
> +	ret = hp_wmi_perform_query(HPWMI_BIOS_QUERY, 1, &query,
> sizeof(query), +				   0);
> +	if (ret)
> +		return -EINVAL;
> +	return 0;
> +}
> +
>  static int hp_wmi_set_block(void *data, bool blocked)
>  {
>  	enum hp_wmi_radio r = (enum hp_wmi_radio) data;
> @@ -925,9 +938,7 @@ static int __init hp_wmi_init(void)
>  		err = hp_wmi_input_setup();
>  		if (err)
>  			return err;
> -
> -		//Enable magic for hotkeys that run on the SMBus
> -		ec_write(0xe6,0x6e);
> +		hp_wmi_enable_hotkeys();
>  	}
> 
>  	if (bios_capable) {

Hello,
I tested above patch and it fixing my problem. Now Fn keys working 
again on my HP EliteBook 8460p.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-16 16:26         ` Matthew Garrett
  2013-04-17 13:56           ` Pali Rohár
@ 2013-04-17 15:37           ` Kyle Evans
  2013-04-17 17:59             ` Matthew Garrett
  1 sibling, 1 reply; 17+ messages in thread
From: Kyle Evans @ 2013-04-17 15:37 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

On 04/16/2013 12:26 PM, Matthew Garrett wrote:
> Can you try this patch?
>

No dice. I have a dmi check patch that I will send in a day or two if 
you don't find what you are looking for.

Currently, I am based on the torvalds master, but I can base off 
something else if you'd like.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-17 15:37           ` Kyle Evans
@ 2013-04-17 17:59             ` Matthew Garrett
  2013-04-17 18:55               ` Kyle Evans
  2013-04-18 13:55               ` Kyle Evans
  0 siblings, 2 replies; 17+ messages in thread
From: Matthew Garrett @ 2013-04-17 17:59 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 753 bytes --]

On Wed, 2013-04-17 at 11:37 -0400, Kyle Evans wrote:
> On 04/16/2013 12:26 PM, Matthew Garrett wrote:
> > Can you try this patch?
> >
> 
> No dice. I have a dmi check patch that I will send in a day or two if 
> you don't find what you are looking for.

DMI's almost certainly the wrong solution. According to your DSDT, EC
register 0xe6 is called SFHK. That's written to by the SSHK method,
which in turn is executed by SHKS which should be called by the
hp_wmi_query call added there. Any chance you can try to figure out why
that's not happening?

-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-17 17:59             ` Matthew Garrett
@ 2013-04-17 18:55               ` Kyle Evans
  2013-04-18 13:55               ` Kyle Evans
  1 sibling, 0 replies; 17+ messages in thread
From: Kyle Evans @ 2013-04-17 18:55 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Pali Rohár, linux-kernel, platform-driver-x86


On 04/17/2013 01:59 PM, Matthew Garrett wrote:
> On Wed, 2013-04-17 at 11:37 -0400, Kyle Evans wrote:
>> On 04/16/2013 12:26 PM, Matthew Garrett wrote:
>>> Can you try this patch?
>>>
>> No dice. I have a dmi check patch that I will send in a day or two if
>> you don't find what you are looking for.
> DMI's almost certainly the wrong solution. According to your DSDT, EC
> register 0xe6 is called SFHK. That's written to by the SSHK method,
> which in turn is executed by SHKS which should be called by the
> hp_wmi_query call added there. Any chance you can try to figure out why
> that's not happening?
>

I see, I don't know how I missed that before. I think because I was 
searching for e6 instead of E6. I'm sure we can crack this the right way 
now. I'll do some digging.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-17 17:59             ` Matthew Garrett
  2013-04-17 18:55               ` Kyle Evans
@ 2013-04-18 13:55               ` Kyle Evans
  2013-04-18 15:58                 ` Matthew Garrett
  1 sibling, 1 reply; 17+ messages in thread
From: Kyle Evans @ 2013-04-18 13:55 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Pali Rohár, linux-kernel, platform-driver-x86


On 04/17/2013 01:59 PM, Matthew Garrett wrote:
> On Wed, 2013-04-17 at 11:37 -0400, Kyle Evans wrote:
>> On 04/16/2013 12:26 PM, Matthew Garrett wrote:
>>> Can you try this patch?
>>>
>> No dice. I have a dmi check patch that I will send in a day or two if
>> you don't find what you are looking for.
> DMI's almost certainly the wrong solution. According to your DSDT, EC
> register 0xe6 is called SFHK. That's written to by the SSHK method,
> which in turn is executed by SHKS which should be called by the
> hp_wmi_query call added there. Any chance you can try to figure out why
> that's not happening?
>

I am not fully understanding how the bios query ID gets translated into 
the method. As far as I can tell this happens under HWMC. But, if I 
trace through that, 0x8(write) and 0x9(read) do not exist. However, 
0x9(read) does have a method that works when I query it, GHKS. I do not 
find the method for 0x8(write).

0x9(write), or SHKS, is essentially ec_write(SFHK,Arg0). Arg0 turns out 
to be whatever data is sent in the 0x9 buffer.
                                 ...
                                 CreateDWordField (Arg1, 0x10, DDWD)

                                 If (LEqual (CMDT, 0x09))
                                 {
                                     Store (SHKS (DDWD), Local2)
                                 ...

I tried writing 0x60, and I tried writing 0x0e just to see if it if a 
subset of that register is needed to enable the keys and it seems I need 
the full 0x6e. I only find two places in the DSDT with that value, both 
in the WQAE buffer and I can't see how that is used.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-18 13:55               ` Kyle Evans
@ 2013-04-18 15:58                 ` Matthew Garrett
  2013-04-18 16:48                   ` Kyle Evans
  0 siblings, 1 reply; 17+ messages in thread
From: Matthew Garrett @ 2013-04-18 15:58 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 387 bytes --]

On Thu, 2013-04-18 at 09:55 -0400, Kyle Evans wrote:

> 0x9(write), or SHKS, is essentially ec_write(SFHK,Arg0). Arg0 turns out 

Oh - try changing

int query = 1

to 

int query=0x6e

-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-18 15:58                 ` Matthew Garrett
@ 2013-04-18 16:48                   ` Kyle Evans
  2013-04-18 16:53                     ` Matthew Garrett
  0 siblings, 1 reply; 17+ messages in thread
From: Kyle Evans @ 2013-04-18 16:48 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Pali Rohár, linux-kernel, platform-driver-x86


On 04/18/2013 11:58 AM, Matthew Garrett wrote:
> On Thu, 2013-04-18 at 09:55 -0400, Kyle Evans wrote:
>
>> 0x9(write), or SHKS, is essentially ec_write(SFHK,Arg0). Arg0 turns out
> Oh - try changing
>
> int query = 1
>
> to
>
> int query=0x6e
>
That only works if I also change:

-#define HPWMI_BIOS_QUERY 0x8
+#define HPWMI_BIOS_QUERY 0x9

But then we are still faced with a hardware detection problem I would assume.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a
  2013-04-18 16:48                   ` Kyle Evans
@ 2013-04-18 16:53                     ` Matthew Garrett
  0 siblings, 0 replies; 17+ messages in thread
From: Matthew Garrett @ 2013-04-18 16:53 UTC (permalink / raw)
  To: Kyle Evans; +Cc: Pali Rohár, linux-kernel, platform-driver-x86

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 636 bytes --]

On Thu, 2013-04-18 at 12:48 -0400, Kyle Evans wrote:

> That only works if I also change:
> 
> -#define HPWMI_BIOS_QUERY 0x8
> +#define HPWMI_BIOS_QUERY 0x9
> 
> But then we are still faced with a hardware detection problem I would assume.

Heh. That's actually what it should have been in the first place - I
just screwed it up. So, looks like that's a good starting point. I'll
push the revert to Linux and queue this up for 3.10.

-- 
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* BUG: Again: Fn keys not working on EliteBook 8460p after b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd
  2013-04-13  1:31 BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a Pali Rohár
  2013-04-13  1:35 ` Matthew Garrett
@ 2013-08-14  8:19 ` Pali Rohár
  2013-08-14 19:16   ` [PATCH] hp-wmi; Limit hotkey enable funtion Kyle Evans
  1 sibling, 1 reply; 17+ messages in thread
From: Pali Rohár @ 2013-08-14  8:19 UTC (permalink / raw)
  To: Kyle Evans, Matthew Garrett; +Cc: linux-kernel, platform-driver-x86

[-- Attachment #1: Type: Text/Plain, Size: 1291 bytes --]

On Saturday 13 April 2013 03:31:17 Pali Rohár wrote:
> Hello,
> 
> all Fn keys, wifi switch, web and mute buttons not working
> anymore on my notebook HP EliteBook 8460p. I bisected git
> commit which broke all above keys:
> fabf85e3ca15d5b94058f391dac8df870cdd427a
> 
> When I reverted that commit after reboot buttons started
> working again. Can you fix it or revert that broken commit?
> This is critical problem, which caused my notebook to be
> unusable...

Hello, same problem happen again on my notebook. Problematic 
commit is now: b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd
hp-wmi: Enable hotkeys on some systems

When I disabled calling function hp_wmi_enable_hotkeys() from 
hp_wmi_init() keys started working again after reboot.

This problem is present in 3.11 rc5. Please can you do something 
so keys on my notebook will work again and it will not be broken 
again in next kernel release? If you need some debug data or 
something else, I can help.

In mail from 16.04.2013 you provided similar patch but with
#define HPWMI_BIOS_QUERY 0x8
I tested that patch and that does not broke keys.

But commit b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd have
#define HPWMI_BIOS_QUERY 0x9
which broke keys again...

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] hp-wmi; Limit hotkey enable funtion
  2013-08-14  8:19 ` BUG: Again: Fn keys not working on EliteBook 8460p after b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd Pali Rohár
@ 2013-08-14 19:16   ` Kyle Evans
  0 siblings, 0 replies; 17+ messages in thread
From: Kyle Evans @ 2013-08-14 19:16 UTC (permalink / raw)
  To: pali.rohar, matthew.garrett, platform-driver-x86, linux-kernel; +Cc: Kyle Evans

This patch is a supplement to commit
b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd

Signed-off-by: Kyle Evans <kvans32@gmail.com>
---
 drivers/platform/x86/hp-wmi.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 97bb05e..b65014f 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -35,6 +35,7 @@
 #include <linux/input/sparse-keymap.h>
 #include <linux/platform_device.h>
 #include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/rfkill.h>
 #include <linux/string.h>
 
@@ -996,6 +997,17 @@ static struct platform_driver hp_wmi_driver = {
 	.remove = __exit_p(hp_wmi_bios_remove),
 };
 
+static struct dmi_system_id __initdata tx2_dmi_table[] = {
+	{
+		.ident = "tx2",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "tx2"),
+		},
+	},
+	{ }
+};
+
 static int __init hp_wmi_init(void)
 {
 	int err;
@@ -1010,7 +1022,9 @@ static int __init hp_wmi_init(void)
 		if (err)
 			return err;
 
-		hp_wmi_enable_hotkeys();
+		if (dmi_check_system(tx2_dmi_table)) {
+			hp_wmi_enable_hotkeys();
+		{
 	}
 
 	if (bios_capable) {
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-08-14 14:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13  1:31 BUG: Fn keys not working on EliteBook 8460p after fabf85e3ca15d5b94058f391dac8df870cdd427a Pali Rohár
2013-04-13  1:35 ` Matthew Garrett
2013-04-13 12:36   ` Kyle Evans
2013-04-13 16:21     ` Matthew Garrett
2013-04-13 17:39       ` Kyle Evans
2013-04-13 17:42         ` Matthew Garrett
2013-04-16 16:26         ` Matthew Garrett
2013-04-17 13:56           ` Pali Rohár
2013-04-17 15:37           ` Kyle Evans
2013-04-17 17:59             ` Matthew Garrett
2013-04-17 18:55               ` Kyle Evans
2013-04-18 13:55               ` Kyle Evans
2013-04-18 15:58                 ` Matthew Garrett
2013-04-18 16:48                   ` Kyle Evans
2013-04-18 16:53                     ` Matthew Garrett
2013-08-14  8:19 ` BUG: Again: Fn keys not working on EliteBook 8460p after b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd Pali Rohár
2013-08-14 19:16   ` [PATCH] hp-wmi; Limit hotkey enable funtion Kyle Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).