Re: [BUG] Suspend tries to suspend devices already in D3

From: Frans Pop
Date: Tue Feb 03 2009 - 12:33:27 EST


On Tuesday 03 February 2009, you wrote:
> On Tuesday 03 February 2009, Frans Pop wrote:
> > This is the second time I've hit this warning on an STR. Most times
> > I do *not* get the warning. The first line is an extra debug printk I
> > added after the first occurrence to give me the driver causing the
> > problem.
> >
> > What is different is that before this suspend I had switched to my
> > wired e1000e NIC and had done an ifdown on the wireless. I suspect
> > that because of that the wireless already was at D3 _before_ the
> > suspend was started.

The warning is reproducible if wlan0 is down during suspend.

> If ifdown causes the device to go into D3, then this is possible.

I've done some extra checking and if I read it correctly lspci -vvv lists
the status as D0 after ifdown, so that's probably not it. I've also added
extra info in the warning and at that time the status is D3hot.

Looking at iwl-agn.c the cause could be that iwl_pci_suspend() depends on
iwl_mac_stop() to call pci_save_state(). I added some debug statements in
iwl_pci_suspend() that showed priv->is_open is false, so iwl_mac_stop
does indeed *not* get called when the interface is down.

Is that it? Not sure what the correct fix would be if it is.

Cheers,
FJP
--
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/