aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_sis.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-12-03 14:32:13 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-12-03 16:12:49 -0500
commit750c7136ea873255ed0b74e20f0d3ef9ac8984c0 (patch)
tree96f220c063e62c1c6940fbc16713da91e21a883d /drivers/ata/pata_sis.c
parent0826ef5f6fa28c50b70cfae001fd31531a1656f8 (diff)
pata_sis: Power Management fix
Call sis_fixup() on resume. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_sis.c')
-rw-r--r--drivers/ata/pata_sis.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index d70ecece93e..8af0dc88fd9 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -2,7 +2,7 @@
2 * pata_sis.c - SiS ATA driver 2 * pata_sis.c - SiS ATA driver
3 * 3 *
4 * (C) 2005 Red Hat 4 * (C) 2005 Red Hat
5 * (C) 2007 Bartlomiej Zolnierkiewicz 5 * (C) 2007,2009 Bartlomiej Zolnierkiewicz
6 * 6 *
7 * Based upon linux/drivers/ide/pci/sis5513.c 7 * Based upon linux/drivers/ide/pci/sis5513.c
8 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> 8 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
@@ -876,6 +876,23 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
876 return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset); 876 return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset);
877} 877}
878 878
879#ifdef CONFIG_PM
880static int sis_reinit_one(struct pci_dev *pdev)
881{
882 struct ata_host *host = dev_get_drvdata(&pdev->dev);
883 int rc;
884
885 rc = ata_pci_device_do_resume(pdev);
886 if (rc)
887 return rc;
888
889 sis_fixup(pdev, host->private_data);
890
891 ata_host_resume(host);
892 return 0;
893}
894#endif
895
879static const struct pci_device_id sis_pci_tbl[] = { 896static const struct pci_device_id sis_pci_tbl[] = {
880 { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ 897 { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */
881 { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ 898 { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */
@@ -891,7 +908,7 @@ static struct pci_driver sis_pci_driver = {
891 .remove = ata_pci_remove_one, 908 .remove = ata_pci_remove_one,
892#ifdef CONFIG_PM 909#ifdef CONFIG_PM
893 .suspend = ata_pci_device_suspend, 910 .suspend = ata_pci_device_suspend,
894 .resume = ata_pci_device_resume, 911 .resume = sis_reinit_one,
895#endif 912#endif
896}; 913};
897 914