aboutsummaryrefslogtreecommitdiffstats
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:35 -0500
commit0826ef5f6fa28c50b70cfae001fd31531a1656f8 (patch)
tree2b77461b45b47b57dba2c769df7520d515c87000
parentdd4a43c979d5da7f2cd20e2751dbbd841116cdfe (diff)
pata_rz1000: Power Management fix
Fix ->resume method to re-enable & re-init PCI device properly before doing chipset specific setup. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/ata/pata_rz1000.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index a5e4dfe60b41..2932998fc4c6 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -105,11 +105,20 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
105#ifdef CONFIG_PM 105#ifdef CONFIG_PM
106static int rz1000_reinit_one(struct pci_dev *pdev) 106static int rz1000_reinit_one(struct pci_dev *pdev)
107{ 107{
108 struct ata_host *host = dev_get_drvdata(&pdev->dev);
109 int rc;
110
111 rc = ata_pci_device_do_resume(pdev);
112 if (rc)
113 return rc;
114
108 /* If this fails on resume (which is a "cant happen" case), we 115 /* If this fails on resume (which is a "cant happen" case), we
109 must stop as any progress risks data loss */ 116 must stop as any progress risks data loss */
110 if (rz1000_fifo_disable(pdev)) 117 if (rz1000_fifo_disable(pdev))
111 panic("rz1000 fifo"); 118 panic("rz1000 fifo");
112 return ata_pci_device_resume(pdev); 119
120 ata_host_resume(host);
121 return 0;
113} 122}
114#endif 123#endif
115 124