aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ata_generic.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-05-04 15:27:47 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-11 18:01:03 -0400
commit9666f4009c22f6520ac3fb8a19c9e32ab973e828 (patch)
treeeaac13cd5890af6298e5576a48c29891f0890bd1 /drivers/ata/ata_generic.c
parent0a3fd051c7036ef71b58863f8e5da7c3dabd9d3f (diff)
libata: reimplement suspend/resume support using sdev->manage_start_stop
Reimplement suspend/resume support using sdev->manage_start_stop. * Device suspend/resume is now SCSI layer's responsibility and the code is simplified a lot. * DPM is dropped. This also simplifies code a lot. Suspend/resume status is port-wide now. * ata_scsi_device_suspend/resume() and ata_dev_ready() removed. * Resume now has to wait for disk to spin up before proceeding. I couldn't find easy way out as libata is in EH waiting for the disk to be ready and sd is waiting for EH to complete to issue START_STOP. * sdev->manage_start_stop is set to 1 in ata_scsi_slave_config(). This fixes spindown on shutdown and suspend-to-disk. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/ata_generic.c')
-rw-r--r--drivers/ata/ata_generic.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 92a491ddd030..0f19e3223358 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -54,7 +54,7 @@ static int generic_set_mode(struct ata_port *ap, struct ata_device **unused)
54 54
55 for (i = 0; i < ATA_MAX_DEVICES; i++) { 55 for (i = 0; i < ATA_MAX_DEVICES; i++) {
56 struct ata_device *dev = &ap->device[i]; 56 struct ata_device *dev = &ap->device[i];
57 if (ata_dev_ready(dev)) { 57 if (ata_dev_enabled(dev)) {
58 /* We don't really care */ 58 /* We don't really care */
59 dev->pio_mode = XFER_PIO_0; 59 dev->pio_mode = XFER_PIO_0;
60 dev->dma_mode = XFER_MW_DMA_0; 60 dev->dma_mode = XFER_MW_DMA_0;
@@ -90,10 +90,6 @@ static struct scsi_host_template generic_sht = {
90 .slave_configure = ata_scsi_slave_config, 90 .slave_configure = ata_scsi_slave_config,
91 .slave_destroy = ata_scsi_slave_destroy, 91 .slave_destroy = ata_scsi_slave_destroy,
92 .bios_param = ata_std_bios_param, 92 .bios_param = ata_std_bios_param,
93#ifdef CONFIG_PM
94 .resume = ata_scsi_device_resume,
95 .suspend = ata_scsi_device_suspend,
96#endif
97}; 93};
98 94
99static struct ata_port_operations generic_port_ops = { 95static struct ata_port_operations generic_port_ops = {