提交 72ad6ec4 编写于 作者: J Jeff Garzik

Revert "power_state: get rid of write-only variable in SATA"

This reverts commit 559bbe6c.

Michael S. Tsirkin reports that this changes breaks suspend/resume.
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 c5c61bda
...@@ -6567,6 +6567,8 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg) ...@@ -6567,6 +6567,8 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
ata_lpm_enable(host); ata_lpm_enable(host);
rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
if (rc == 0)
host->dev->power.power_state = mesg;
return rc; return rc;
} }
...@@ -6585,6 +6587,7 @@ void ata_host_resume(struct ata_host *host) ...@@ -6585,6 +6587,7 @@ void ata_host_resume(struct ata_host *host)
{ {
ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET,
ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0);
host->dev->power.power_state = PMSG_ON;
/* reenable link pm */ /* reenable link pm */
ata_lpm_disable(host); ata_lpm_disable(host);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册