提交 839e7306 编写于 作者: M Mikulas Patocka 提交者: David S. Miller

IDE: 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.

This patch fixes a suspend regression introduced in
feb22b7f ("ide: add proper PCI PM
support (v2)").
Signed-off-by: NMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
[bart: add commit's summary in parens]
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dc9c0bee
...@@ -113,12 +113,26 @@ static const struct pci_device_id triflex_pci_tbl[] = { ...@@ -113,12 +113,26 @@ static const struct pci_device_id triflex_pci_tbl[] = {
}; };
MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); MODULE_DEVICE_TABLE(pci, triflex_pci_tbl);
#ifdef CONFIG_PM
static int triflex_ide_pci_suspend(struct pci_dev *dev, pm_message_t state)
{
/*
* We must not disable or powerdown the device.
* APM bios refuses to suspend if IDE is not accessible.
*/
pci_save_state(dev);
return 0;
}
#else
#define triflex_ide_pci_suspend NULL
#endif
static struct pci_driver triflex_pci_driver = { static struct pci_driver triflex_pci_driver = {
.name = "TRIFLEX_IDE", .name = "TRIFLEX_IDE",
.id_table = triflex_pci_tbl, .id_table = triflex_pci_tbl,
.probe = triflex_init_one, .probe = triflex_init_one,
.remove = ide_pci_remove, .remove = ide_pci_remove,
.suspend = ide_pci_suspend, .suspend = triflex_ide_pci_suspend,
.resume = ide_pci_resume, .resume = ide_pci_resume,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册