From ef1eb66c268b17ad292f2ccac6952a67fc83f566 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Sun, 15 May 2011 22:33:19 +0200 Subject: [PATCH] --- yaml --- r: 247756 b: refs/heads/master c: bfeec8ca15c9c06c1978a25248e2bd11c4a26d72 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ata/pata_triflex.c | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 480b3bf0391a..7f6a8d788884 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f4e206666f834340b69ddb43f86de3851c8675a +refs/heads/master: bfeec8ca15c9c06c1978a25248e2bd11c4a26d72 diff --git a/trunk/drivers/ata/pata_triflex.c b/trunk/drivers/ata/pata_triflex.c index 03b6d69d6197..b3e0c9432283 100644 --- a/trunk/drivers/ata/pata_triflex.c +++ b/trunk/drivers/ata/pata_triflex.c @@ -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 = { .name = DRV_NAME, .id_table = triflex, .probe = triflex_init_one, .remove = ata_pci_remove_one, #ifdef CONFIG_PM - .suspend = ata_pci_device_suspend, + .suspend = triflex_ata_pci_device_suspend, .resume = ata_pci_device_resume, #endif };