aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>2011-05-15 16:33:19 -0400
committerJeff Garzik <jgarzik@pobox.com>2011-05-19 20:46:40 -0400
commitbfeec8ca15c9c06c1978a25248e2bd11c4a26d72 (patch)
tree433899d620fbb5542ced276e7b467d915ccf2e64 /drivers/ata
parent5f4e206666f834340b69ddb43f86de3851c8675a (diff)
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: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_triflex.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index 03b6d69d619..b3e0c943228 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -210,13 +210,34 @@ static const struct pci_device_id triflex[] = {
210 { }, 210 { },
211}; 211};
212 212
213#ifdef CONFIG_PM
214static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
215{
216 struct ata_host *host = dev_get_drvdata(&pdev->dev);
217 int rc = 0;
218
219 rc = ata_host_suspend(host, mesg);
220 if (rc)
221 return rc;
222
223 /*
224 * We must not disable or powerdown the device.
225 * APM bios refuses to suspend if IDE is not accessible.
226 */
227 pci_save_state(pdev);
228
229 return 0;
230}
231
232#endif
233
213static struct pci_driver triflex_pci_driver = { 234static struct pci_driver triflex_pci_driver = {
214 .name = DRV_NAME, 235 .name = DRV_NAME,
215 .id_table = triflex, 236 .id_table = triflex,
216 .probe = triflex_init_one, 237 .probe = triflex_init_one,
217 .remove = ata_pci_remove_one, 238 .remove = ata_pci_remove_one,
218#ifdef CONFIG_PM 239#ifdef CONFIG_PM
219 .suspend = ata_pci_device_suspend, 240 .suspend = triflex_ata_pci_device_suspend,
220 .resume = ata_pci_device_resume, 241 .resume = ata_pci_device_resume,
221#endif 242#endif
222}; 243};