zhao, forrest wrote:
Yeah, on memsleep host_set->dev->power.power_state is set to PM_EVENT_SUSPEND in ata_host_set_suspend(). Then during resume process, firstly ata_host_set_resume() is called, in which host_set->dev->power. power_state is set to PMSG_ON, then ata_eh_handle_resume() is called later. This is the reason why ap->host_set->dev->power.power_state.event is 0 in ata_eh_handle_resume(). This is a race condition.
Yeap, you're right. Hmmm.. weird. I haven't noticed that race condition during my tests. I think we can use a DFLAG to mark that a device had been spun down. Thanks for spotting it.
-- tejun - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html