Re: [linux-pm] [PATCH] [suspend] pci_raw_set_power_state: replacemsleep by udelay in resuming procedure

From: Alan Stern
Date: Thu Jul 16 2009 - 13:03:03 EST


On Thu, 16 Jul 2009, Wu Zhangjin wrote:

> we can not call msleep() when resuming from STR/Standby: if the
> current_state of the pci device is PCI_D3hot, means we are in the
> procedure of resuming, in this procedure, we can not re-schedule,
> otherwise, there will be a deadlock.

I don't understand.

First of all, why does current_state == PCI_D3hot mean the system is
resuming from sleep? Isn't it possible that the PCI device is going
through a runtime resume?

Secondly, why will scheduling during a resume cause a deadlock?

Alan Stern

--
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/