diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 14:31:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 14:31:27 -0700 |
commit | 557eed603159b4e007c57d97fad1333ecebd3c2e (patch) | |
tree | ae784d4578da59617f87e36728ed2cafb2be50d6 /drivers/ata/pata_triflex.c | |
parent | be84bfcc3ed8f824751ab79349779e50cc98aa01 (diff) | |
parent | 8a745f1f39b7a20047a362b67ce9151c07d14440 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: Power off empty ports
libata-pmp: add support for Thermaltake BlackX Duet esata drive dock
ATA: Don't powerdown Compaq Triflex IDE device on suspend
libata: Use Maximum Write Same Length to report discard size limit
drivers/ata/acard-ahci.c: fix enum warning
pata_at91: SMC settings calculation bugfixes, support for t6z and IORDY
libata-sff: prevent irq descriptions for dummy ports
pata_cm64x: fix boot crash on parisc
Diffstat (limited to 'drivers/ata/pata_triflex.c')
-rw-r--r-- | drivers/ata/pata_triflex.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index 03b6d69d6197..b3e0c9432283 100644 --- a/drivers/ata/pata_triflex.c +++ b/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 }; |