From: Thomas Richter <thor@math.tu-berlin.de>
To: tianyu.lan@intel.com, paul.s.diefenbaugh@intel.com,
jun.nakajima@intel.com, gjohnson@austin.ibm.com, lenb@kernel.org,
rui.zhang@intel.com, linux-acpi@vger.kernel.org
Subject: Re: [Patch] Fujitsu extra buttons not working on S6010
Date: Mon, 06 Oct 2014 16:38:15 +0200 [thread overview]
Message-ID: <5432A957.2030205@math.tu-berlin.de> (raw)
In-Reply-To: <29964_1412366647_542F0137_29964_4513_9_542EFC10.7020508@math.tu-berlin.de>
Dear experts,
>
> following the bug report on bugzilla
>
> https://bugzilla.kernel.org/show_bug.cgi?id=84381
>
> the extra buttons (ACPI-driven buttons) on the R31 laptop do not work
> since kernel 3.17.0.
> Kernel 3.16.x worked fine. The same problem (or at least a very
> similar problem) exists
> on the Fujitsu-S6010 laptop.
>
> After debugging for a while, the culprit seems to be in
> arch/x86/kernel/acpi/boot.c, in specific
> in acpi_gsi_to_irq(). The following changes fix this problem for at
> least the S6010:
>
> static unsigned int gsi_to_irq(unsigned int gsi)
> {
> unsigned int irq = gsi + NR_IRQS_LEGACY;
> unsigned int i;
>
> for (i = 0; i< NR_IRQS_LEGACY; i++) {
> if (isa_irq_to_gsi[i] == gsi) {
> return i;
> }
> }
>
> /* Provide an identity mapping of gsi == irq
> * except on truly weird platforms that have
> * non isa irqs in the first 16 gsis.
> */
> if (gsi>= NR_IRQS_LEGACY)
> irq = gsi;
> else
> irq = gsi_top + gsi;
>
> return irq;
> }
> /* THOR: Experimental end */
>
> int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp)
> {
> int irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC |
> IOAPIC_MAP_CHECK);
>
> if (irq>= 0) {
> *irqp = irq;
> return 0;
> }
>
> /* THOR: Experimental start */
> irq = gsi_to_irq(gsi);
> if (irq>= 0) {
> *irqp = irq;
> return 0;
> }
> /* THOR Experimental end */
>
> return -1;
> }
>
> Whether this works on the R31 is yet to be determined.
The above patch has now also been tested on the IBM R31, and yes, it
also fixes the system keys there: Thinklight, volume up & down and
various other system-driven key-combinations now work again.
Could you please pick this patch up or comment on better alternatives?
Thank you,
Thomas
next parent reply other threads:[~2014-10-06 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <29964_1412366647_542F0137_29964_4513_9_542EFC10.7020508@math.tu-berlin.de>
2014-10-06 14:38 ` Thomas Richter [this message]
2014-10-06 22:47 ` [Patch] Fujitsu extra buttons not working on S6010 Rafael J. Wysocki
[not found] ` <29964_1412634435_54331741_29964_16384_1_8031540.z3p2ny3Gns@vostro.rjw.lan>
2014-10-07 14:17 ` [PATCH] Fujitsu extra buttons not working on S6010, Thinkpad Extra buttons not working on R31 Thomas Richter
2014-10-12 17:26 ` [Patch] Fujitsu extra buttons not working on S6010 Thomas Richter
2014-10-03 19:42 Thomas Richter
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=5432A957.2030205@math.tu-berlin.de \
--to=thor@math.tu-berlin.de \
--cc=gjohnson@austin.ibm.com \
--cc=jun.nakajima@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=paul.s.diefenbaugh@intel.com \
--cc=rui.zhang@intel.com \
--cc=tianyu.lan@intel.com \
/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.