* [PATCH] [RFT] sony-laptop: re-read the rfkill state when resuming from suspend
@ 2009-09-25 9:18 Alan Jenkins
2009-09-25 10:51 ` Norbert Preining
2009-09-25 11:55 ` Mattia Dongili
0 siblings, 2 replies; 3+ messages in thread
From: Alan Jenkins @ 2009-09-25 9:18 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless@vger.kernel.org, Mattia Dongili, Norbert Preining
Without this, the hard-blocked state will be reported incorrectly if
the hardware switch is changed while the laptop is suspended.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
--
Again, this is from code inspection only. Since suspend/resume can
be tricky, please test that this change works (and is necessary).
diff a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1044,6 +1044,9 @@ static int sony_nc_resume(struct acpi_device *device)
sony_backlight_update_status(sony_backlight_device) < 0)
printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
+ /* re-read rfkill state */
+ sony_nc_rfkill_update();
+
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [RFT] sony-laptop: re-read the rfkill state when resuming from suspend
2009-09-25 9:18 [PATCH] [RFT] sony-laptop: re-read the rfkill state when resuming from suspend Alan Jenkins
@ 2009-09-25 10:51 ` Norbert Preining
2009-09-25 11:55 ` Mattia Dongili
1 sibling, 0 replies; 3+ messages in thread
From: Norbert Preining @ 2009-09-25 10:51 UTC (permalink / raw)
To: Alan Jenkins
Cc: John W. Linville, linux-wireless@vger.kernel.org, Mattia Dongili
On Fr, 25 Sep 2009, Alan Jenkins wrote:
> Without this, the hard-blocked state will be reported incorrectly if
> the hardware switch is changed while the laptop is suspended.
I confirm that with the old module (without that patch) after:
- having rfkill de-activated (so devices working)
- suspend to ram
- while suspended turn on rfkill (disable all devices)
- resume
the rfkill event shows:
RFKILL event: idx 0 type 1 op 0 soft 0 hard 0
RFKILL event: idx 1 type 2 op 0 soft 0 hard 0
RFKILL event: idx 2 type 5 op 0 soft 0 hard 0
RFKILL event: idx 4 type 1 op 0 soft 0 hard 1
so it didn't work.
Adding the patch after resume I have
RFKILL event: idx 0 type 1 op 0 soft 0 hard 1
RFKILL event: idx 1 type 2 op 0 soft 0 hard 1
RFKILL event: idx 2 type 5 op 0 soft 0 hard 1
RFKILL event: idx 5 type 1 op 0 soft 0 hard 1
so that is fixed.
Tested-by: Norbert Preining <preining@logic.at>
>
> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> --
>
> Again, this is from code inspection only. Since suspend/resume can
> be tricky, please test that this change works (and is necessary).
>
>
> diff a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> --- a/drivers/platform/x86/sony-laptop.c
> +++ b/drivers/platform/x86/sony-laptop.c
> @@ -1044,6 +1044,9 @@ static int sony_nc_resume(struct acpi_device *device)
> sony_backlight_update_status(sony_backlight_device) < 0)
> printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
>
> + /* re-read rfkill state */
> + sony_nc_rfkill_update();
> +
> return 0;
> }
>
>
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at> Vienna University of Technology
Debian Developer <preining@debian.org> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
HUTTOFT (n.)
The fibrous algae which grows in the dark, moist environment of
trouser turn-ups.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [RFT] sony-laptop: re-read the rfkill state when resuming from suspend
2009-09-25 9:18 [PATCH] [RFT] sony-laptop: re-read the rfkill state when resuming from suspend Alan Jenkins
2009-09-25 10:51 ` Norbert Preining
@ 2009-09-25 11:55 ` Mattia Dongili
1 sibling, 0 replies; 3+ messages in thread
From: Mattia Dongili @ 2009-09-25 11:55 UTC (permalink / raw)
To: Alan Jenkins
Cc: John W. Linville, linux-wireless@vger.kernel.org,
Norbert Preining
On Fri, Sep 25, 2009 at 10:18:21AM +0100, Alan Jenkins wrote:
> Without this, the hard-blocked state will be reported incorrectly if
> the hardware switch is changed while the laptop is suspended.
>
> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Thanks Alan.
Acked-by: Mattia Dongili <malattia@linux.it>
> --
>
> Again, this is from code inspection only. Since suspend/resume can
> be tricky, please test that this change works (and is necessary).
>
>
> diff a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> --- a/drivers/platform/x86/sony-laptop.c
> +++ b/drivers/platform/x86/sony-laptop.c
> @@ -1044,6 +1044,9 @@ static int sony_nc_resume(struct acpi_device *device)
> sony_backlight_update_status(sony_backlight_device) < 0)
> printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
>
> + /* re-read rfkill state */
> + sony_nc_rfkill_update();
> +
> return 0;
> }
>
>
>
--
mattia
:wq!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-25 11:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 9:18 [PATCH] [RFT] sony-laptop: re-read the rfkill state when resuming from suspend Alan Jenkins
2009-09-25 10:51 ` Norbert Preining
2009-09-25 11:55 ` Mattia Dongili
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).