提交 bfeec8ca 编写于 作者: M Mikulas Patocka 提交者: Jeff Garzik

ATA: Don't powerdown Compaq Triflex IDE device on suspend

Don't powerdown Compaq Triflex IDE device on suspend

This fixes APM suspend on Compaq Armada 7400.
APM BIOS doesn't suspend if IDE is powered down when suspending.
The Triflex controller is found only on old Compaq boards,
so this patch will hopefully have no side effects.
Signed-off-by: NMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 5f4e2066
...@@ -210,13 +210,34 @@ static const struct pci_device_id triflex[] = { ...@@ -210,13 +210,34 @@ static const struct pci_device_id triflex[] = {
{ }, { },
}; };
#ifdef CONFIG_PM
static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
int rc = 0;
rc = ata_host_suspend(host, mesg);
if (rc)
return rc;
/*
* We must not disable or powerdown the device.
* APM bios refuses to suspend if IDE is not accessible.
*/
pci_save_state(pdev);
return 0;
}
#endif
static struct pci_driver triflex_pci_driver = { static struct pci_driver triflex_pci_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = triflex, .id_table = triflex,
.probe = triflex_init_one, .probe = triflex_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = triflex_ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif #endif
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册