From: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Corentin Chary <corentin.chary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux acpi <linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
acpi4asus-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Alan Jenkins
<alan-jenkins-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
Subject: Re: [PATCH] eeepc-laptop: fix wlan rfkill state change during init
Date: Sun, 29 Mar 2009 22:55:11 +0100 [thread overview]
Message-ID: <20090329215511.GE13446@srcf.ucam.org> (raw)
In-Reply-To: <71cd59b00903291416o4e8d6013n8a061098bb4fabef-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, Mar 29, 2009 at 11:16:25PM +0200, Corentin Chary wrote:
> On Sun, Mar 29, 2009 at 7:20 PM, Alan Jenkins
> <alan-jenkins-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org> wrote:
> > When an rfkill device is registered, the rfkill core will change its
> > state to the system default. So we need to prepare for state changes
> > *before* we register it. That means installing the eeepc-specific ACPI
> > callback which handles the hotplug of the wireless network adaptor.
> >
> > This problem doesn't occur during normal operation. You have to
> >
> > 1) Boot with wireless enabled. eeepc-laptop should load automatically.
> > 2) modprobe -r eeepc-laptop
> > 3) modprobe eeepc-laptop
> >
> > On boot, the default rfkill state will be set to enabled.
> > With the current core code, step 2) will disable the wireless.
> > Therefore in step 3), the wireless will change state during registration,
> > from disabled to enabled. But without this fix, the PCI device for the
> > wireless adaptor will not appear.
> >
> > Signed-off-by: Alan Jenkins <alan-jenkins-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
> >
> > diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
> > index 786ed86..b8951b9 100644
> > --- a/drivers/platform/x86/eeepc-laptop.c
> > +++ b/drivers/platform/x86/eeepc-laptop.c
> > @@ -645,6 +645,9 @@ static int eeepc_hotk_add(struct acpi_device *device)
> > if (ACPI_FAILURE(status))
> > printk(EEEPC_ERR "Error installing notify handler\n");
> >
> > + eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6");
> > + eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");
> > +
> > if (get_acpi(CM_ASL_WLAN) != -1) {
> > ehotk->eeepc_wlan_rfkill = rfkill_allocate(&device->dev,
> > RFKILL_TYPE_WLAN);
> > @@ -700,9 +703,6 @@ static int eeepc_hotk_add(struct acpi_device *device)
> > goto bluetooth_fail;
> > }
> >
> > - eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6");
> > - eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");
> > -
> > return 0;
> >
> > bluetooth_fail:
> >
> >
> >
>
> Hi,
> Cc'd linux-acpi to get more review about that.
> I'm not very familiar with rfkill interface.
Looks fine to me.
Acked-by: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
------------------------------------------------------------------------------
next prev parent reply other threads:[~2009-03-29 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49CFADDF.4040007@tuffmail.co.uk>
2009-03-29 21:16 ` [PATCH] eeepc-laptop: fix wlan rfkill state change during init Corentin Chary
[not found] ` <71cd59b00903291416o4e8d6013n8a061098bb4fabef-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-29 21:55 ` Matthew Garrett [this message]
2009-03-30 7:01 ` Corentin Chary
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=20090329215511.GE13446@srcf.ucam.org \
--to=mjg-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=acpi4asus-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=alan-jenkins-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org \
--cc=corentin.chary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.