Re: eeepc-laptop rfkill, stupid question #4
From: Henrique de Moraes Holschuh
Date: Mon Nov 03 2008 - 09:52:12 EST
On Mon, 03 Nov 2008, Alan Jenkins wrote:
> >> Can you read the state? If so, you need to unconditionally do so on resume
> >> (from sleep or hibernation) and rfkill_force_state() it.
> >
> > The rfkill core actually forces the state on resume, so I think we're
> > fine.
Not if you can enter or exit HARD_BLOCK, you're not. If you cannot it is
fine. But if you can, you really need to rfkill_force_state() on resume,
even if you have a get_state() hook.
This might be something that needs explicit documentation, or something
wanting a fix.
> I think the reason it works is because eeepc-laptop provides a
> "get_state" callback. rfkill can call get_state on resume, and if the
It doesn't call get_state on resume right now, because rfkill_toggle_radio()
optimizes that away when called in forced mode.
I will think about removing that "optimization".
> state has changed, force it back to the old value. So I think it's ok
> as is.
And the rfkill core seems to be buggy when you call force_state() on resume,
which you guys didn't hit because you're not doing it yet. See my other
email...
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/