Skip to contentSkip to conversation

sony-laptop: check for rfkill hard block at load time

DISCUSSION Norbert Preining 2 participants 3 messages Oct 2, 2009

Subsystems (2)
lore
Share & tools
lore

Norbert Preining

author Tested-by
#0 lore raw
Quoted 2 lines · Alan Jenkins

We can fix this by querying the firmware at load time and calling rfkill_set_hw_state().

The bug concerning checking the state after suspend to ram should probably be also queued. Original email attached.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SWANAGE (pl.n.)
Swanage is the series of diversionary tactics used when trying to cover up the existence of a glossop (q.v.) and may include (a) uttering a high-pitched laugh and pointing out of the window (NB. this doesn't work more that twice); (b) sneezing as loudly as possible and wiping the glossop off the table in the same movement as whipping out your handkerchief; (c) saying 'Christ! I seen to have dropped some shit on your table' (very unwise); (d) saying 'Christ, who did that?' (better) (e) pressing your elbow on the glossop itself and working your arms slowly to the edge of the table; (f) leaving the glossop where it is but moving a plate over it and putting up with sitting at an uncomfortable angle the rest of the meal; or, if the glossop is in too exposed a position, (g) leaving it there unremarked except for the occasional humorous glance.
--- Douglas Adams, The Meaning of Liff

Without this, the hard-blocked state will be reported incorrectly if the hardware switch is changed while the laptop is suspended.

--

Again, this is from code inspection only. Since suspend/resume can be tricky, please test that this change works (and is necessary).

drivers/platform/x86/sony-laptop.c +3 -0
diff 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;
 }
 
#1 lore raw
Quoted 6 lines · Norbert Preining
Quoted 2 lines · Alan Jenkins

We can fix this by querying the firmware at load time and calling rfkill_set_hw_state().

The bug concerning checking the state after suspend to ram should probably be also queued. Original email attached.

Queued for what?

confused,

greg k-h

author Applied
#2 lore raw
Quoted 9 lines · Greg KH
Quoted 6 lines · Norbert Preining
Quoted 2 lines · Alan Jenkins

We can fix this by querying the firmware at load time and calling rfkill_set_hw_state().

The bug concerning checking the state after suspend to ram should probably be also queued. Original email attached.

Queued for what?

Queued for inclusion into 2.6.3N (for N>=2), that is what the original email was stating. Sorry if I stripped it down to far.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
HIBBING (n.)
The marks left on the outside breast pocket of a storekeeper's overall where he has put away his pen and missed.
--- Douglas Adams, The Meaning of Liff