From: Alex Hung <alex.hung@canonical.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
Darren Hart <dvhart@infradead.org>,
Matthew Garrett <mjg59@srcf.ucam.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] Dell Airplane Mode Switch driver
Date: Fri, 24 Apr 2015 15:39:15 +0800 [thread overview]
Message-ID: <CAJ=jqubcFPk5mrGu_XMKQifXkfGP4gaF-NOhybe7EXbm6TAiqQ@mail.gmail.com> (raw)
In-Reply-To: <201412252111.06004@pali>
I encountered a Dell Latitude machine whose wireless hotkey will not
work with dell-rbtn alone, and therefore I merged functions from
dell-wireless and it worked quite well. I also tested it on 7 other
Dell machines, and only Inspiron 7437 failed because of a firmware bug
(see http://permalink.gmane.org/gmane.linux.acpi.devel/74915)
I am going to send the new patch for review.
On Fri, Dec 26, 2014 at 4:11 AM, Pali Rohár <pali.rohar@gmail.com> wrote:
> I will try to recap all information which we have...
>
> *) We should not send wireless key press to userspace when BIOS
> already handles wireless state (and enable/disable wifi):
> http://www.spinics.net/lists/platform-driver-x86/msg05922.html
>
> *) some tested dell machines does not implement GRBT method (or
> report constant value) which could return state of wireless
> (enabled/disabled) -- e.g. Inspiron 7447
>
> *) dell-wireless driver is doing nothing on devices which have
> wireless slider switch (except calling CRBT/ARBT methods)
>
> *) all tested machines emit key with keycode 240 (scancode is
> probably 136 = 0x88) to userspace via i8042 bus/AT keyboard when
> wireless button/slider is pressed/switched
>
> *) both drivers dell-wireless and dell-rbtn do not implement
> setting soft rfkill state (or change wifi state)
>
> So in my opinion: if we decide to use driver for acpi DELLABCE
> device we should use dell-rbnt for devices with hw slider switch
> and dell-wireless for devices with fn button. I think it does not
> make sense to use dell-wireless for devices with hw slider
> because it do nothing and dell-rbtn for devices with fn key
> button as GRBT does not working properly.
>
> And second note: Do we need some driver for acpi DELLABCE device?
> Which problem is trying acpi DELLABCE device to solve? Is not
> everything working fine without driver for DELLABCE device?
>
> My dell-rbtn approach is trying to export rfkill interface from
> DELLABCE device and eliminate using i8042 hook function in smbios
> dell-laptop driver.
>
> Alex, can you check if scancode of wireless change generated by
> BIOS is on all machines same: 136 (0x88)? And is send by keyboard
> controller (not acpi/wmi)?
>
> On Thursday 25 December 2014 04:13:02 Alex Hung wrote:
>> I usually prefer to stick with formal document as everything
>> else can be changed without reasons.
>>
>> I am not certain whether the keypress is defined in Dell's
>> document, and I will confirm with Dell. If this keypress is
>> well defined, it is a good idea to use it.
>>
>>
>> On Wed, Dec 24, 2014 at 7:40 PM, Gabriele Mazzotta
>>
>> <gabriele.mzt@gmail.com> wrote:
>> > On Wednesday 24 December 2014 17:13:45 Alex Hung wrote:
>> >> I uploaded acpidump files [1] (except for XPS 13 which is
>> >> not available), and this should help clarify what has been
>> >> tested.
>> >>
>> >> Does Inspirion 5721 does not have either DELLABCE or
>> >> DELRBTN. It is used for comparison. My apologies that I
>> >> did not point this out in previous email.
>> >>
>> >> When calling ARBT(1), BIOS will no longer issue scancode
>> >> and will not pull low hardware pin "W_DISABLE#" on mini
>> >> card. This essentially gives all wireless control to OS.
>> >> This is likely the answer to Microsoft's Windows
>> >> Certification Program
>> >> System.Client.RadioManagement.HardwareButton [2] as below:
>> >>
>> >> =============================================
>> >> If a PC has a physical (hardware) button switch on a PC
>> >> that turns wireless radios on and off, it must be software
>> >> controllable and interact appropriately with the Radio
>> >> Management UI
>> >> =============================================
>> >>
>> >> Dell's BIOS does issue a notify(RBTN, 0x80). This is done
>> >> purposely to re-enumerate the state of radio switch which
>> >> may be changed when system is in S3 or S4. I think this
>> >> should not occur when CRBT returns 0 or 1 (for hotkey that
>> >> cannot be changed during S3 or S4), but that's how it is
>> >> done currently.
>> >
>> > The notification is sent on my XPS13 (CRBT returns 0),
>> > toggling the WiFi state on resume.
>> >
>> >> dell-wireless does not handle this notification in S3 or S4
>> >> for following reasons:
>> >>
>> >> 1. dell-wireless does not handle slider (i.e. CRBT = 2 or
>> >> 3). Device drivers should read the hardware pin,
>> >> "W_DISABLE#" on mini spec and change hard block
>> >> accordingly. This pin is commonly used by OEM today.
>> >>
>> >> 2. it is not possible to distinguish the notification
>> >> (0x80) from hotkey press or S3/S4. I also concerned this
>> >> may mis-trigger state change when resuming from S3 or S4,
>> >> but it does not. Does any know how to ignore this
>> >> notification during resume only?
>> >>
>> >> dell-rbtn can use this notification + method (GRBT) [2] to
>> >> solve the problem that slider state.
>> >
>> > Unfortunately this won't solve the problem for me. After
>> > ARBT is called with 1 as parameter, it seems that GRBT
>> > always returns 1.
>> >
>> > I don't know how to ignore the notification on resume, if
>> > not through a flag set by a PM callback.
>> >
>> > Given that all the tested laptops reported a keypress on the
>> > i8042 bus, isn't it better to rely on that instead?
>> >
>> >> [1] http://people.canonical.com/~alexhung/dell-acpidump/
>> >> [2]
>> >> http://msdn.microsoft.com/en-us/library/windows/hardware/j
>> >> j128256.aspx [3] It seems GRBT may not always be
>> >> implemented...
>> >>
>> >> I'd love to do more tests and share the results on any
>> >> particular systems, but I may need some more detailed
>> >> instructions.
>> >>
>> >>
>> >>
>> >> On Tue, Dec 23, 2014 at 3:16 AM, Gabriele Mazzotta
>> >>
>> >> <gabriele.mzt@gmail.com> wrote:
>> >> > On Monday 22 December 2014 15:27:57 Alex Hung wrote:
>> >> >> = Testing =
>> >> >>
>> >> >> I tested six Dell systems for two sets of patches for
>> >> >> dell radio button - two system with radio slider and
>> >> >> four with radio hotkey. There are also two systems with
>> >> >> working ARBT method.
>> >> >>
>> >> >> == Basic Information ==
>> >> >> Based OS: Ubuntu 14.10 (kernel 3.16 [1]) and kernel 3.18
>> >> >> [2]
>> >> >>
>> >> >> Patches:
>> >> >> 1. dell-wireless v3 = original v2 + Gabriele's
>> >> >> suggestion [3] 2. dell-rbtn [4]
>> >> >>
>> >> >> Method:
>> >> >> 1. run "rfkill list" and press hotkey / toggle slider
>> >> >> during runtime 2. run "rfkill list" and toggle slider
>> >> >> during S3
>> >> >>
>> >> >> == Results ==
>> >> >>
>> >> >> I summarized the tests in Google sheet as below. Please
>> >> >> advise if anyone has problem reading it.
>> >> >>
>> >> >> https://docs.google.com/spreadsheets/d/1voffS6dNglwAExSG
>> >> >> h3UmG__UAO2qfZ829CkJLPo06aI/edit?usp=sharing
>> >> >>
>> >> >> PS. The document will stay as long as possible for
>> >> >> future references.
>> >> >>
>> >> >> == Summary ==
>> >> >>
>> >> >> 1. I did not observed a duplicated event. However,
>> >> >> keycode 240 (unknown) is generated on many UUT. It is
>> >> >> not issued by dell-laptop or del-wmi. I am suspecting
>> >> >> it is the other event Pali observes but it can be the
>> >> >> result of different distro.
>> >> >>
>> >> >> 2. Some system issues scancode "0xe0 0x73 0xe0 0xf3". It
>> >> >> can also be used toggle wireless state but this can
>> >> >> also be distro-dependent. This scancode does nothing on
>> >> >> Ubuntu 14.10.
>> >> >>
>> >> >> 2. There are two systems with working ARBT (XPS 13 9333
>> >> >> and Inspiron 7447). Calling ARBT(1) changes BIOS
>> >> >> behaviours, and this matches to Dell's document. We
>> >> >> should include it in the patch for maximum capability.
>> >> >>
>> >> >>
>> >> >> [1] dell-wireless is only tested 3.16.
>> >> >> [2] dell-rbtn is tested on 3.16 and 3.18, but no
>> >> >> differences are observed. [3]
>> >> >> http://people.canonical.com/~alexhung/dell-wireless/
>> >> >> [4] http://people.canonical.com/~alexhung/dell-rbtn/
>> >> >
>> >> > I've just tried the last revision of dell-wireless and
>> >> > noticed that a notification (0x80) is sent to DELLABCE
>> >> > after a transition from S3 to S0, causing dell-wireless
>> >> > to send KEY_RFKILL. This shouldn't happen. Same thing
>> >> > for transitions from S4 to S0.
>> >> >
>> >> > Gabriele
>
> --
> Pali Rohár
> pali.rohar@gmail.com
--
Cheers,
Alex Hung
next prev parent reply other threads:[~2015-04-24 7:39 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-23 15:09 [PATCH 0/3] Dell Airplane Mode Switch driver Pali Rohár
2014-11-23 15:09 ` [PATCH 1/3] platform: x86: dell-rbtn: " Pali Rohár
2014-11-24 20:09 ` Matthew Garrett
2014-11-24 20:55 ` Pali Rohár
2014-11-24 21:50 ` Matthew Garrett
2014-11-24 22:01 ` Pali Rohár
2014-11-28 11:33 ` Mika Westerberg
2014-11-28 11:45 ` Pali Rohár
2014-11-28 11:54 ` Mika Westerberg
2014-11-25 21:58 ` Darren Hart
2014-11-23 15:09 ` [PATCH 2/3] platform: x86: dell-rbtn: Export notifier for other kernel modules Pali Rohár
2014-11-25 22:39 ` Darren Hart
2015-04-29 9:55 ` Pali Rohár
2014-11-23 15:09 ` [PATCH 3/3] platform: x86: dell-laptop: Use dell-rbtn instead i8042 filter when possible Pali Rohár
2014-11-25 23:05 ` [PATCH 0/3] Dell Airplane Mode Switch driver Darren Hart
2014-12-02 8:42 ` Pali Rohár
2014-12-04 8:16 ` Alex Hung
2014-12-03 12:56 ` Darren Hart
2014-12-04 9:55 ` Pali Rohár
2014-12-03 13:00 ` Darren Hart
2014-12-05 20:38 ` Pali Rohár
2014-12-05 20:53 ` Gabriele Mazzotta
2014-12-05 21:03 ` Pali Rohár
2014-12-05 21:12 ` Gabriele Mazzotta
2014-12-05 21:23 ` Pali Rohár
2014-12-05 21:49 ` Gabriele Mazzotta
2014-12-22 7:27 ` Alex Hung
2014-12-22 9:21 ` Pali Rohár
2014-12-22 12:35 ` Gabriele Mazzotta
2014-12-22 19:16 ` Gabriele Mazzotta
2014-12-24 9:13 ` Alex Hung
2014-12-24 11:40 ` Gabriele Mazzotta
2014-12-25 3:13 ` Alex Hung
2014-12-25 20:11 ` Pali Rohár
2014-12-25 21:55 ` Gabriele Mazzotta
2014-12-29 7:27 ` Alex Hung
2014-12-29 8:32 ` Pali Rohár
2015-01-05 9:55 ` Alex Hung
2015-04-24 7:39 ` Alex Hung [this message]
2015-04-29 9:51 ` [PATCH v2 " Pali Rohár
2015-04-29 9:51 ` [PATCH v2 1/3] platform: x86: dell-rbtn: " Pali Rohár
2015-04-29 10:30 ` Gabriele Mazzotta
2015-04-29 13:08 ` Pali Rohár
2015-04-29 13:57 ` Gabriele Mazzotta
2015-04-29 16:28 ` Pali Rohár
2015-04-29 17:54 ` Gabriele Mazzotta
2015-04-29 18:00 ` Pali Rohár
2015-04-29 18:11 ` Gabriele Mazzotta
2015-04-29 18:16 ` Pali Rohár
2015-04-29 18:41 ` Gabriele Mazzotta
2015-04-29 18:59 ` Pali Rohár
2015-04-30 6:06 ` Alex Hung
2015-04-30 7:44 ` Pali Rohár
2015-05-02 13:51 ` Gabriele Mazzotta
2015-05-02 15:13 ` Pali Rohár
2015-05-05 20:31 ` Darren Hart
2015-05-05 21:23 ` Gabriele Mazzotta
2015-05-06 5:55 ` Darren Hart
2015-05-06 7:49 ` Pali Rohár
2015-05-06 9:34 ` Alex Hung
2015-04-29 9:51 ` [PATCH v2 2/3] platform: x86: dell-rbtn: Export notifier for other kernel modules Pali Rohár
2015-04-29 9:51 ` [PATCH v2 3/3] platform: x86: dell-laptop: Use dell-rbtn instead i8042 filter when possible Pali Rohár
2015-05-03 10:38 ` [PATCH v2 0/3] Dell Airplane Mode Switch driver Pali Rohár
2015-05-05 20:37 ` Darren Hart
2015-05-05 21:24 ` Gabriele Mazzotta
2015-05-06 7:58 ` Pali Rohár
2015-05-06 9:11 ` Alex Hung
2015-05-06 11:31 ` Pali Rohár
2015-05-06 21:57 ` Darren Hart
2015-05-07 2:24 ` Alex Hung
2015-05-13 11:48 ` Pali Rohár
2015-05-13 18:38 ` Darren Hart
2015-05-14 10:54 ` [PATCH v3 " Pali Rohár
2015-05-14 10:54 ` [PATCH v3 1/3] dell-rbtn: " Pali Rohár
2015-05-14 10:54 ` [PATCH v3 2/3] dell-rbtn: Export notifier for other kernel modules Pali Rohár
2015-05-22 22:45 ` Dmitry Torokhov
2015-05-23 1:05 ` Pali Rohár
2015-05-24 5:07 ` Valdis.Kletnieks
2015-05-24 11:42 ` Pali Rohár
2015-05-14 10:54 ` [PATCH v3 3/3] dell-laptop: Use dell-rbtn instead i8042 filter when possible Pali Rohár
2015-05-18 18:07 ` [PATCH v3 0/3] Dell Airplane Mode Switch driver Darren Hart
2015-05-27 21:28 ` [PATCH v4 " Pali Rohár
2015-05-27 21:28 ` [PATCH v4 1/3] dell-rbtn: " Pali Rohár
2015-05-27 21:28 ` [PATCH v4 2/3] dell-rbtn: Export notifier for other kernel modules Pali Rohár
2015-05-27 21:28 ` [PATCH v4 3/3] dell-laptop: Use dell-rbtn instead i8042 filter when possible Pali Rohár
2015-05-28 2:52 ` Darren Hart
2015-06-03 3:55 ` Darren Hart
2015-06-03 8:15 ` Pali Rohár
2015-06-04 5:16 ` Darren Hart
2015-06-06 8:24 ` Pali Rohár
2015-06-06 8:23 ` [PATCH v5 0/3] Dell Airplane Mode Switch driver Pali Rohár
2015-06-06 8:23 ` [PATCH v5 1/3] dell-rbtn: " Pali Rohár
2015-06-06 8:23 ` [PATCH v5 2/3] dell-rbtn: Export notifier for other kernel modules Pali Rohár
2015-06-06 8:23 ` [PATCH v5 3/3] dell-laptop: Use dell-rbtn instead i8042 filter when possible Pali Rohár
2015-06-08 4:12 ` [PATCH v5 0/3] Dell Airplane Mode Switch driver Darren Hart
2015-06-08 7:30 ` Pali Rohár
2015-06-11 4:55 ` Darren Hart
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='CAJ=jqubcFPk5mrGu_XMKQifXkfGP4gaF-NOhybe7EXbm6TAiqQ@mail.gmail.com' \
--to=alex.hung@canonical.com \
--cc=dvhart@infradead.org \
--cc=gabriele.mzt@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@vger.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 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).