[PATCH 1/2] libertas: add ability to power off card on suspend
dsd at laptop.org
Tue Aug 2 18:32:21 EDT 2011
On 2 August 2011 22:12, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> Now generic libertas driver controls power, not if_spi. So it should be able
> to turn off card before going suspend. Messing with power in if_* and generic
> part does not look like a good idea to me.
But there's no way your approach will bring good results. Userspace
won't see any interface state change, but the entire hardware and
firmware will be fully reset. Things will get very confused.
A lot of the stuff done in stop_iface is not relevant for the suspend
case. e.g. If commands were queued before suspend, they should execute
after resume. stop_iface is designed to run when the userspace-visible
interfaces are brought down - by running it while they are still up,
you will confuse things.
You are battling with a general suspend/resume problem which should be
handled by suspend/resume handlers alone. libertas already has plenty
of experience in this area which you can build upon.
More information about the libertas-dev