Commit 438ac6d5 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata: add missing CONFIG_PM in LLDs

Add missing #ifdef CONFIG_PM conditionals around all PM related parts
in libata LLDs.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent b23ff244
...@@ -219,10 +219,12 @@ static void ahci_thaw(struct ata_port *ap); ...@@ -219,10 +219,12 @@ static void ahci_thaw(struct ata_port *ap);
static void ahci_error_handler(struct ata_port *ap); static void ahci_error_handler(struct ata_port *ap);
static void ahci_vt8251_error_handler(struct ata_port *ap); static void ahci_vt8251_error_handler(struct ata_port *ap);
static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); static void ahci_post_internal_cmd(struct ata_queued_cmd *qc);
#ifdef CONFIG_PM
static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg); static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg);
static int ahci_port_resume(struct ata_port *ap); static int ahci_port_resume(struct ata_port *ap);
static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
static int ahci_pci_device_resume(struct pci_dev *pdev); static int ahci_pci_device_resume(struct pci_dev *pdev);
#endif
static struct scsi_host_template ahci_sht = { static struct scsi_host_template ahci_sht = {
.module = THIS_MODULE, .module = THIS_MODULE,
...@@ -241,8 +243,10 @@ static struct scsi_host_template ahci_sht = { ...@@ -241,8 +243,10 @@ static struct scsi_host_template ahci_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
#endif
}; };
static const struct ata_port_operations ahci_ops = { static const struct ata_port_operations ahci_ops = {
...@@ -271,8 +275,10 @@ static const struct ata_port_operations ahci_ops = { ...@@ -271,8 +275,10 @@ static const struct ata_port_operations ahci_ops = {
.error_handler = ahci_error_handler, .error_handler = ahci_error_handler,
.post_internal_cmd = ahci_post_internal_cmd, .post_internal_cmd = ahci_post_internal_cmd,
#ifdef CONFIG_PM
.port_suspend = ahci_port_suspend, .port_suspend = ahci_port_suspend,
.port_resume = ahci_port_resume, .port_resume = ahci_port_resume,
#endif
.port_start = ahci_port_start, .port_start = ahci_port_start,
.port_stop = ahci_port_stop, .port_stop = ahci_port_stop,
...@@ -304,8 +310,10 @@ static const struct ata_port_operations ahci_vt8251_ops = { ...@@ -304,8 +310,10 @@ static const struct ata_port_operations ahci_vt8251_ops = {
.error_handler = ahci_vt8251_error_handler, .error_handler = ahci_vt8251_error_handler,
.post_internal_cmd = ahci_post_internal_cmd, .post_internal_cmd = ahci_post_internal_cmd,
#ifdef CONFIG_PM
.port_suspend = ahci_port_suspend, .port_suspend = ahci_port_suspend,
.port_resume = ahci_port_resume, .port_resume = ahci_port_resume,
#endif
.port_start = ahci_port_start, .port_start = ahci_port_start,
.port_stop = ahci_port_stop, .port_stop = ahci_port_stop,
...@@ -436,8 +444,10 @@ static struct pci_driver ahci_pci_driver = { ...@@ -436,8 +444,10 @@ static struct pci_driver ahci_pci_driver = {
.id_table = ahci_pci_tbl, .id_table = ahci_pci_tbl,
.probe = ahci_init_one, .probe = ahci_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ahci_pci_device_suspend, .suspend = ahci_pci_device_suspend,
.resume = ahci_pci_device_resume, .resume = ahci_pci_device_resume,
#endif
}; };
...@@ -577,6 +587,7 @@ static void ahci_power_up(void __iomem *port_mmio, u32 cap) ...@@ -577,6 +587,7 @@ static void ahci_power_up(void __iomem *port_mmio, u32 cap)
writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD); writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD);
} }
#ifdef CONFIG_PM
static void ahci_power_down(void __iomem *port_mmio, u32 cap) static void ahci_power_down(void __iomem *port_mmio, u32 cap)
{ {
u32 cmd, scontrol; u32 cmd, scontrol;
...@@ -594,6 +605,7 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap) ...@@ -594,6 +605,7 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap)
cmd &= ~PORT_CMD_SPIN_UP; cmd &= ~PORT_CMD_SPIN_UP;
writel(cmd, port_mmio + PORT_CMD); writel(cmd, port_mmio + PORT_CMD);
} }
#endif
static void ahci_init_port(void __iomem *port_mmio, u32 cap, static void ahci_init_port(void __iomem *port_mmio, u32 cap,
dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma) dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma)
...@@ -1335,6 +1347,7 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) ...@@ -1335,6 +1347,7 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc)
} }
} }
#ifdef CONFIG_PM
static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg) static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg)
{ {
struct ahci_host_priv *hpriv = ap->host->private_data; struct ahci_host_priv *hpriv = ap->host->private_data;
...@@ -1413,6 +1426,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev) ...@@ -1413,6 +1426,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev)
return 0; return 0;
} }
#endif
static int ahci_port_start(struct ata_port *ap) static int ahci_port_start(struct ata_port *ap)
{ {
......
...@@ -119,8 +119,10 @@ static struct scsi_host_template generic_sht = { ...@@ -119,8 +119,10 @@ static struct scsi_host_template generic_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations generic_port_ops = { static struct ata_port_operations generic_port_ops = {
...@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci_driver = { ...@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci_driver = {
.id_table = ata_generic, .id_table = ata_generic,
.probe = ata_generic_init_one, .probe = ata_generic_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init ata_generic_init(void) static int __init ata_generic_init(void)
......
...@@ -253,8 +253,10 @@ static struct pci_driver piix_pci_driver = { ...@@ -253,8 +253,10 @@ static struct pci_driver piix_pci_driver = {
.id_table = piix_pci_tbl, .id_table = piix_pci_tbl,
.probe = piix_init_one, .probe = piix_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static struct scsi_host_template piix_sht = { static struct scsi_host_template piix_sht = {
...@@ -273,8 +275,10 @@ static struct scsi_host_template piix_sht = { ...@@ -273,8 +275,10 @@ static struct scsi_host_template piix_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations piix_pata_ops = { static const struct ata_port_operations piix_pata_ops = {
......
...@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht = { ...@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
/* /*
...@@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
static int ali_reinit_one(struct pci_dev *pdev) static int ali_reinit_one(struct pci_dev *pdev)
{ {
ali_init_chipset(pdev); ali_init_chipset(pdev);
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id ali[] = { static const struct pci_device_id ali[] = {
{ PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), }, { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), },
...@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver = { ...@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver = {
.id_table = ali, .id_table = ali,
.probe = ali_init_one, .probe = ali_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ali_reinit_one, .resume = ali_reinit_one,
#endif
}; };
static int __init ali_init(void) static int __init ali_init(void)
......
...@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht = { ...@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations amd33_port_ops = { static struct ata_port_operations amd33_port_ops = {
...@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
static int amd_reinit_one(struct pci_dev *pdev) static int amd_reinit_one(struct pci_dev *pdev)
{ {
if (pdev->vendor == PCI_VENDOR_ID_AMD) { if (pdev->vendor == PCI_VENDOR_ID_AMD) {
...@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev *pdev) ...@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev *pdev)
} }
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id amd[] = { static const struct pci_device_id amd[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401), 0 }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401), 0 },
...@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver = { ...@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver = {
.id_table = amd, .id_table = amd,
.probe = amd_init_one, .probe = amd_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = amd_reinit_one, .resume = amd_reinit_one,
#endif
}; };
static int __init amd_init(void) static int __init amd_init(void)
......
...@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_sht = { ...@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations atiixp_port_ops = { static struct ata_port_operations atiixp_port_ops = {
...@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driver = { ...@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driver = {
.id_table = atiixp, .id_table = atiixp,
.probe = atiixp_init_one, .probe = atiixp_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
#endif
}; };
static int __init atiixp_init(void) static int __init atiixp_init(void)
......
...@@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_sht = { ...@@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations cmd64x_port_ops = { static struct ata_port_operations cmd64x_port_ops = {
...@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
static int cmd64x_reinit_one(struct pci_dev *pdev) static int cmd64x_reinit_one(struct pci_dev *pdev)
{ {
u8 mrdmode; u8 mrdmode;
...@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct pci_dev *pdev) ...@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct pci_dev *pdev)
#endif #endif
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id cmd64x[] = { static const struct pci_device_id cmd64x[] = {
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 }, { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 },
...@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driver = { ...@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driver = {
.id_table = cmd64x, .id_table = cmd64x,
.probe = cmd64x_init_one, .probe = cmd64x_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = cmd64x_reinit_one, .resume = cmd64x_reinit_one,
#endif
}; };
static int __init cmd64x_init(void) static int __init cmd64x_init(void)
......
...@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_sht = { ...@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations cs5520_port_ops = { static struct ata_port_operations cs5520_port_ops = {
...@@ -308,6 +310,7 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev) ...@@ -308,6 +310,7 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)
ata_host_detach(host); ata_host_detach(host);
} }
#ifdef CONFIG_PM
/** /**
* cs5520_reinit_one - device resume * cs5520_reinit_one - device resume
* @pdev: PCI device * @pdev: PCI device
...@@ -347,6 +350,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) ...@@ -347,6 +350,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
pci_save_state(pdev); pci_save_state(pdev);
return 0; return 0;
} }
#endif /* CONFIG_PM */
/* For now keep DMA off. We can set it for all but A rev CS5510 once the /* For now keep DMA off. We can set it for all but A rev CS5510 once the
core ATA code can handle it */ core ATA code can handle it */
...@@ -363,8 +367,10 @@ static struct pci_driver cs5520_pci_driver = { ...@@ -363,8 +367,10 @@ static struct pci_driver cs5520_pci_driver = {
.id_table = pata_cs5520, .id_table = pata_cs5520,
.probe = cs5520_init_one, .probe = cs5520_init_one,
.remove = cs5520_remove_one, .remove = cs5520_remove_one,
#ifdef CONFIG_PM
.suspend = cs5520_pci_device_suspend, .suspend = cs5520_pci_device_suspend,
.resume = cs5520_reinit_one, .resume = cs5520_reinit_one,
#endif
}; };
static int __init cs5520_init(void) static int __init cs5520_init(void)
......
...@@ -188,8 +188,10 @@ static struct scsi_host_template cs5530_sht = { ...@@ -188,8 +188,10 @@ static struct scsi_host_template cs5530_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations cs5530_port_ops = { static struct ata_port_operations cs5530_port_ops = {
...@@ -376,6 +378,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -376,6 +378,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
static int cs5530_reinit_one(struct pci_dev *pdev) static int cs5530_reinit_one(struct pci_dev *pdev)
{ {
/* If we fail on resume we are doomed */ /* If we fail on resume we are doomed */
...@@ -383,6 +386,7 @@ static int cs5530_reinit_one(struct pci_dev *pdev) ...@@ -383,6 +386,7 @@ static int cs5530_reinit_one(struct pci_dev *pdev)
BUG(); BUG();
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif /* CONFIG_PM */
static const struct pci_device_id cs5530[] = { static const struct pci_device_id cs5530[] = {
{ PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), },
...@@ -395,8 +399,10 @@ static struct pci_driver cs5530_pci_driver = { ...@@ -395,8 +399,10 @@ static struct pci_driver cs5530_pci_driver = {
.id_table = cs5530, .id_table = cs5530,
.probe = cs5530_init_one, .probe = cs5530_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = cs5530_reinit_one, .resume = cs5530_reinit_one,
#endif
}; };
static int __init cs5530_init(void) static int __init cs5530_init(void)
......
...@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_sht = { ...@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations cs5535_port_ops = { static struct ata_port_operations cs5535_port_ops = {
...@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driver = { ...@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driver = {
.id_table = cs5535, .id_table = cs5535,
.probe = cs5535_init_one, .probe = cs5535_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init cs5535_init(void) static int __init cs5535_init(void)
......
...@@ -136,8 +136,10 @@ static struct scsi_host_template cy82c693_sht = { ...@@ -136,8 +136,10 @@ static struct scsi_host_template cy82c693_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations cy82c693_port_ops = { static struct ata_port_operations cy82c693_port_ops = {
...@@ -206,8 +208,10 @@ static struct pci_driver cy82c693_pci_driver = { ...@@ -206,8 +208,10 @@ static struct pci_driver cy82c693_pci_driver = {
.id_table = cy82c693, .id_table = cy82c693,
.probe = cy82c693_init_one, .probe = cy82c693_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init cy82c693_init(void) static int __init cy82c693_init(void)
......
...@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sht = { ...@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations efar_ops = { static const struct ata_port_operations efar_ops = {
...@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver = { ...@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver = {
.id_table = efar_pci_tbl, .id_table = efar_pci_tbl,
.probe = efar_init_one, .probe = efar_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init efar_init(void) static int __init efar_init(void)
......
...@@ -328,8 +328,10 @@ static struct scsi_host_template hpt36x_sht = { ...@@ -328,8 +328,10 @@ static struct scsi_host_template hpt36x_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
/* /*
...@@ -457,12 +459,13 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -457,12 +459,13 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return ata_pci_init_one(dev, port_info, 2); return ata_pci_init_one(dev, port_info, 2);
} }
#ifdef CONFIG_PM
static int hpt36x_reinit_one(struct pci_dev *dev) static int hpt36x_reinit_one(struct pci_dev *dev)
{ {
hpt36x_init_chipset(dev); hpt36x_init_chipset(dev);
return ata_pci_device_resume(dev); return ata_pci_device_resume(dev);
} }
#endif
static const struct pci_device_id hpt36x[] = { static const struct pci_device_id hpt36x[] = {
{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), }, { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), },
...@@ -474,8 +477,10 @@ static struct pci_driver hpt36x_pci_driver = { ...@@ -474,8 +477,10 @@ static struct pci_driver hpt36x_pci_driver = {
.id_table = hpt36x, .id_table = hpt36x,
.probe = hpt36x_init_one, .probe = hpt36x_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = hpt36x_reinit_one, .resume = hpt36x_reinit_one,
#endif
}; };
static int __init hpt36x_init(void) static int __init hpt36x_init(void)
......
...@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_sht = { ...@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations hpt3x3_port_ops = { static struct ata_port_operations hpt3x3_port_ops = {
...@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return ata_pci_init_one(dev, port_info, 2); return ata_pci_init_one(dev, port_info, 2);
} }
#ifdef CONFIG_PM
static int hpt3x3_reinit_one(struct pci_dev *dev) static int hpt3x3_reinit_one(struct pci_dev *dev)
{ {
hpt3x3_init_chipset(dev); hpt3x3_init_chipset(dev);
return ata_pci_device_resume(dev); return ata_pci_device_resume(dev);
} }
#endif
static const struct pci_device_id hpt3x3[] = { static const struct pci_device_id hpt3x3[] = {
{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), }, { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), },
...@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driver = { ...@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driver = {
.id_table = hpt3x3, .id_table = hpt3x3,
.probe = hpt3x3_init_one, .probe = hpt3x3_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = hpt3x3_reinit_one, .resume = hpt3x3_reinit_one,
#endif
}; };
static int __init hpt3x3_init(void) static int __init hpt3x3_init(void)
......
...@@ -246,8 +246,10 @@ static struct scsi_host_template it8213_sht = { ...@@ -246,8 +246,10 @@ static struct scsi_host_template it8213_sht = {
.dma_boundary = ATA_DMA_BOUNDARY, .dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations it8213_ops = { static const struct ata_port_operations it8213_ops = {
...@@ -330,8 +332,10 @@ static struct pci_driver it8213_pci_driver = { ...@@ -330,8 +332,10 @@ static struct pci_driver it8213_pci_driver = {
.id_table = it8213_pci_tbl, .id_table = it8213_pci_tbl,
.probe = it8213_init_one, .probe = it8213_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init it8213_init(void) static int __init it8213_init(void)
......
...@@ -646,8 +646,10 @@ static struct scsi_host_template it821x_sht = { ...@@ -646,8 +646,10 @@ static struct scsi_host_template it821x_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations it821x_smart_port_ops = { static struct ata_port_operations it821x_smart_port_ops = {
...@@ -780,6 +782,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -780,6 +782,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
static int it821x_reinit_one(struct pci_dev *pdev) static int it821x_reinit_one(struct pci_dev *pdev)
{ {
/* Resume - turn raid back off if need be */ /* Resume - turn raid back off if need be */
...@@ -787,6 +790,7 @@ static int it821x_reinit_one(struct pci_dev *pdev) ...@@ -787,6 +790,7 @@ static int it821x_reinit_one(struct pci_dev *pdev)
it821x_disable_raid(pdev); it821x_disable_raid(pdev);
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id it821x[] = { static const struct pci_device_id it821x[] = {
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), }, { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), },
...@@ -800,8 +804,10 @@ static struct pci_driver it821x_pci_driver = { ...@@ -800,8 +804,10 @@ static struct pci_driver it821x_pci_driver = {
.id_table = it821x, .id_table = it821x,
.probe = it821x_init_one, .probe = it821x_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = it821x_reinit_one, .resume = it821x_reinit_one,
#endif
}; };
static int __init it821x_init(void) static int __init it821x_init(void)
......
...@@ -229,8 +229,10 @@ static struct pci_driver jmicron_pci_driver = { ...@@ -229,8 +229,10 @@ static struct pci_driver jmicron_pci_driver = {
.id_table = jmicron_pci_tbl, .id_table = jmicron_pci_tbl,
.probe = jmicron_init_one, .probe = jmicron_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init jmicron_init(void) static int __init jmicron_init(void)
...@@ -242,6 +244,7 @@ static void __exit jmicron_exit(void) ...@@ -242,6 +244,7 @@ static void __exit jmicron_exit(void)
{ {
pci_unregister_driver(&jmicron_pci_driver); pci_unregister_driver(&jmicron_pci_driver);
} }
#endif
module_init(jmicron_init); module_init(jmicron_init);
module_exit(jmicron_exit); module_exit(jmicron_exit);
......
...@@ -103,8 +103,10 @@ static struct scsi_host_template marvell_sht = { ...@@ -103,8 +103,10 @@ static struct scsi_host_template marvell_sht = {
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
/* Use standard CHS mapping rules */ /* Use standard CHS mapping rules */
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations marvell_ops = { static const struct ata_port_operations marvell_ops = {
...@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_driver = { ...@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_driver = {
.id_table = marvell_pci_tbl, .id_table = marvell_pci_tbl,
.probe = marvell_init_one, .probe = marvell_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init marvell_init(void) static int __init marvell_init(void)
......
...@@ -165,8 +165,10 @@ static struct scsi_host_template mpiix_sht = { ...@@ -165,8 +165,10 @@ static struct scsi_host_template mpiix_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations mpiix_port_ops = { static struct ata_port_operations mpiix_port_ops = {
...@@ -270,8 +272,10 @@ static struct pci_driver mpiix_pci_driver = { ...@@ -270,8 +272,10 @@ static struct pci_driver mpiix_pci_driver = {
.id_table = mpiix, .id_table = mpiix,
.probe = mpiix_init_one, .probe = mpiix_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init mpiix_init(void) static int __init mpiix_init(void)
......
...@@ -63,8 +63,10 @@ static struct scsi_host_template netcell_sht = { ...@@ -63,8 +63,10 @@ static struct scsi_host_template netcell_sht = {
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
/* Use standard CHS mapping rules */ /* Use standard CHS mapping rules */
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations netcell_ops = { static const struct ata_port_operations netcell_ops = {
...@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_driver = { ...@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_driver = {
.id_table = netcell_pci_tbl, .id_table = netcell_pci_tbl,
.probe = netcell_init_one, .probe = netcell_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init netcell_init(void) static int __init netcell_init(void)
......
...@@ -157,8 +157,10 @@ static struct scsi_host_template ns87410_sht = { ...@@ -157,8 +157,10 @@ static struct scsi_host_template ns87410_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations ns87410_port_ops = { static struct ata_port_operations ns87410_port_ops = {
...@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_driver = { ...@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_driver = {
.id_table = ns87410, .id_table = ns87410,
.probe = ns87410_init_one, .probe = ns87410_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init ns87410_init(void) static int __init ns87410_init(void)
......
...@@ -233,8 +233,10 @@ static struct scsi_host_template oldpiix_sht = { ...@@ -233,8 +233,10 @@ static struct scsi_host_template oldpiix_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations oldpiix_pata_ops = { static const struct ata_port_operations oldpiix_pata_ops = {
...@@ -316,8 +318,10 @@ static struct pci_driver oldpiix_pci_driver = { ...@@ -316,8 +318,10 @@ static struct pci_driver oldpiix_pci_driver = {
.id_table = oldpiix_pci_tbl, .id_table = oldpiix_pci_tbl,
.probe = oldpiix_init_one, .probe = oldpiix_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init oldpiix_init(void) static int __init oldpiix_init(void)
......
...@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sht = { ...@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations opti_port_ops = { static struct ata_port_operations opti_port_ops = {
...@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver = { ...@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver = {
.id_table = opti, .id_table = opti,
.probe = opti_init_one, .probe = opti_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init opti_init(void) static int __init opti_init(void)
......
...@@ -360,8 +360,10 @@ static struct scsi_host_template optidma_sht = { ...@@ -360,8 +360,10 @@ static struct scsi_host_template optidma_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations optidma_port_ops = { static struct ata_port_operations optidma_port_ops = {
...@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_driver = { ...@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_driver = {
.id_table = optidma, .id_table = optidma,
.probe = optidma_init_one, .probe = optidma_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init optidma_init(void) static int __init optidma_init(void)
......
...@@ -267,8 +267,10 @@ static struct scsi_host_template pdc202xx_sht = { ...@@ -267,8 +267,10 @@ static struct scsi_host_template pdc202xx_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations pdc2024x_port_ops = { static struct ata_port_operations pdc2024x_port_ops = {
...@@ -399,8 +401,10 @@ static struct pci_driver pdc202xx_pci_driver = { ...@@ -399,8 +401,10 @@ static struct pci_driver pdc202xx_pci_driver = {
.id_table = pdc202xx, .id_table = pdc202xx,
.probe = pdc202xx_init_one, .probe = pdc202xx_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init pdc202xx_init(void) static int __init pdc202xx_init(void)
......
...@@ -228,8 +228,10 @@ static struct scsi_host_template radisys_sht = { ...@@ -228,8 +228,10 @@ static struct scsi_host_template radisys_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations radisys_pata_ops = { static const struct ata_port_operations radisys_pata_ops = {
...@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_driver = { ...@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_driver = {
.id_table = radisys_pci_tbl, .id_table = radisys_pci_tbl,
.probe = radisys_init_one, .probe = radisys_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init radisys_init(void) static int __init radisys_init(void)
......
...@@ -94,8 +94,10 @@ static struct scsi_host_template rz1000_sht = { ...@@ -94,8 +94,10 @@ static struct scsi_host_template rz1000_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations rz1000_port_ops = { static struct ata_port_operations rz1000_port_ops = {
...@@ -178,6 +180,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en ...@@ -178,6 +180,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
return -ENODEV; return -ENODEV;
} }
#ifdef CONFIG_PM
static int rz1000_reinit_one(struct pci_dev *pdev) static int rz1000_reinit_one(struct pci_dev *pdev)
{ {
/* If this fails on resume (which is a "cant happen" case), we /* If this fails on resume (which is a "cant happen" case), we
...@@ -186,6 +189,7 @@ static int rz1000_reinit_one(struct pci_dev *pdev) ...@@ -186,6 +189,7 @@ static int rz1000_reinit_one(struct pci_dev *pdev)
panic("rz1000 fifo"); panic("rz1000 fifo");
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id pata_rz1000[] = { static const struct pci_device_id pata_rz1000[] = {
{ PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), }, { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), },
...@@ -199,8 +203,10 @@ static struct pci_driver rz1000_pci_driver = { ...@@ -199,8 +203,10 @@ static struct pci_driver rz1000_pci_driver = {
.id_table = pata_rz1000, .id_table = pata_rz1000,
.probe = rz1000_init_one, .probe = rz1000_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = rz1000_reinit_one, .resume = rz1000_reinit_one,
#endif
}; };
static int __init rz1000_init(void) static int __init rz1000_init(void)
......
...@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_sht = { ...@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations sc1200_port_ops = { static struct ata_port_operations sc1200_port_ops = {
...@@ -269,8 +271,10 @@ static struct pci_driver sc1200_pci_driver = { ...@@ -269,8 +271,10 @@ static struct pci_driver sc1200_pci_driver = {
.id_table = sc1200, .id_table = sc1200,
.probe = sc1200_init_one, .probe = sc1200_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init sc1200_init(void) static int __init sc1200_init(void)
......
...@@ -984,8 +984,10 @@ static struct scsi_host_template scc_sht = { ...@@ -984,8 +984,10 @@ static struct scsi_host_template scc_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations scc_pata_ops = { static const struct ata_port_operations scc_pata_ops = {
......
...@@ -319,8 +319,10 @@ static struct scsi_host_template serverworks_sht = { ...@@ -319,8 +319,10 @@ static struct scsi_host_template serverworks_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations serverworks_osb4_port_ops = { static struct ata_port_operations serverworks_osb4_port_ops = {
...@@ -548,6 +550,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id ...@@ -548,6 +550,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
return ata_pci_init_one(pdev, port_info, ports); return ata_pci_init_one(pdev, port_info, ports);
} }
#ifdef CONFIG_PM
static int serverworks_reinit_one(struct pci_dev *pdev) static int serverworks_reinit_one(struct pci_dev *pdev)
{ {
/* Force master latency timer to 64 PCI clocks */ /* Force master latency timer to 64 PCI clocks */
...@@ -571,6 +574,7 @@ static int serverworks_reinit_one(struct pci_dev *pdev) ...@@ -571,6 +574,7 @@ static int serverworks_reinit_one(struct pci_dev *pdev)
} }
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id serverworks[] = { static const struct pci_device_id serverworks[] = {
{ PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},
...@@ -587,8 +591,10 @@ static struct pci_driver serverworks_pci_driver = { ...@@ -587,8 +591,10 @@ static struct pci_driver serverworks_pci_driver = {
.id_table = serverworks, .id_table = serverworks,
.probe = serverworks_init_one, .probe = serverworks_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = serverworks_reinit_one, .resume = serverworks_reinit_one,
#endif
}; };
static int __init serverworks_init(void) static int __init serverworks_init(void)
......
...@@ -381,11 +381,13 @@ static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -381,11 +381,13 @@ static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
static int sil680_reinit_one(struct pci_dev *pdev) static int sil680_reinit_one(struct pci_dev *pdev)
{ {
sil680_init_chip(pdev); sil680_init_chip(pdev);
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id sil680[] = { static const struct pci_device_id sil680[] = {
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), }, { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), },
...@@ -398,8 +400,10 @@ static struct pci_driver sil680_pci_driver = { ...@@ -398,8 +400,10 @@ static struct pci_driver sil680_pci_driver = {
.id_table = sil680, .id_table = sil680,
.probe = sil680_init_one, .probe = sil680_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = sil680_reinit_one, .resume = sil680_reinit_one,
#endif
}; };
static int __init sil680_init(void) static int __init sil680_init(void)
......
...@@ -575,8 +575,10 @@ static struct scsi_host_template sis_sht = { ...@@ -575,8 +575,10 @@ static struct scsi_host_template sis_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static const struct ata_port_operations sis_133_ops = { static const struct ata_port_operations sis_133_ops = {
...@@ -1032,8 +1034,10 @@ static struct pci_driver sis_pci_driver = { ...@@ -1032,8 +1034,10 @@ static struct pci_driver sis_pci_driver = {
.id_table = sis_pci_tbl, .id_table = sis_pci_tbl,
.probe = sis_init_one, .probe = sis_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init sis_init(void) static int __init sis_init(void)
......
...@@ -193,8 +193,10 @@ static struct scsi_host_template triflex_sht = { ...@@ -193,8 +193,10 @@ static struct scsi_host_template triflex_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations triflex_port_ops = { static struct ata_port_operations triflex_port_ops = {
...@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_driver = { ...@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_driver = {
.id_table = triflex, .id_table = triflex,
.probe = triflex_init_one, .probe = triflex_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = ata_pci_device_resume, .resume = ata_pci_device_resume,
#endif
}; };
static int __init triflex_init(void) static int __init triflex_init(void)
......
...@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht = { ...@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
#endif
}; };
static struct ata_port_operations via_port_ops = { static struct ata_port_operations via_port_ops = {
...@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return ata_pci_init_one(pdev, port_info, 2); return ata_pci_init_one(pdev, port_info, 2);
} }
#ifdef CONFIG_PM
/** /**
* via_reinit_one - reinit after resume * via_reinit_one - reinit after resume
* @pdev; PCI device * @pdev; PCI device
...@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev *pdev) ...@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev *pdev)
} }
return ata_pci_device_resume(pdev); return ata_pci_device_resume(pdev);
} }
#endif
static const struct pci_device_id via[] = { static const struct pci_device_id via[] = {
{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), }, { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), },
...@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver = { ...@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver = {
.id_table = via, .id_table = via,
.probe = via_init_one, .probe = via_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = via_reinit_one, .resume = via_reinit_one,
#endif
}; };
static int __init via_init(void) static int __init via_init(void)
......
...@@ -135,8 +135,10 @@ static struct scsi_host_template inic_sht = { ...@@ -135,8 +135,10 @@ static struct scsi_host_template inic_sht = {
.slave_configure = inic_slave_config, .slave_configure = inic_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
#endif
}; };
static const int scr_map[] = { static const int scr_map[] = {
...@@ -632,6 +634,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl) ...@@ -632,6 +634,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl)
return 0; return 0;
} }
#ifdef CONFIG_PM
static int inic_pci_device_resume(struct pci_dev *pdev) static int inic_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = dev_get_drvdata(&pdev->dev);
...@@ -642,7 +645,6 @@ static int inic_pci_device_resume(struct pci_dev *pdev) ...@@ -642,7 +645,6 @@ static int inic_pci_device_resume(struct pci_dev *pdev)
ata_pci_device_do_resume(pdev); ata_pci_device_do_resume(pdev);
if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
printk("XXX\n");
rc = init_controller(mmio_base, hpriv->cached_hctl); rc = init_controller(mmio_base, hpriv->cached_hctl);
if (rc) if (rc)
return rc; return rc;
...@@ -652,6 +654,7 @@ static int inic_pci_device_resume(struct pci_dev *pdev) ...@@ -652,6 +654,7 @@ static int inic_pci_device_resume(struct pci_dev *pdev)
return 0; return 0;
} }
#endif
static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
...@@ -755,8 +758,10 @@ static const struct pci_device_id inic_pci_tbl[] = { ...@@ -755,8 +758,10 @@ static const struct pci_device_id inic_pci_tbl[] = {
static struct pci_driver inic_pci_driver = { static struct pci_driver inic_pci_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = inic_pci_tbl, .id_table = inic_pci_tbl,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = inic_pci_device_resume, .resume = inic_pci_device_resume,
#endif
.probe = inic_init_one, .probe = inic_init_one,
.remove = ata_pci_remove_one, .remove = ata_pci_remove_one,
}; };
......
...@@ -230,7 +230,9 @@ struct nv_host_priv { ...@@ -230,7 +230,9 @@ struct nv_host_priv {
static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
static void nv_remove_one (struct pci_dev *pdev); static void nv_remove_one (struct pci_dev *pdev);
#ifdef CONFIG_PM
static int nv_pci_device_resume(struct pci_dev *pdev); static int nv_pci_device_resume(struct pci_dev *pdev);
#endif
static void nv_ck804_host_stop(struct ata_host *host); static void nv_ck804_host_stop(struct ata_host *host);
static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance); static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance);
static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance); static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance);
...@@ -251,8 +253,10 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance); ...@@ -251,8 +253,10 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance);
static void nv_adma_irq_clear(struct ata_port *ap); static void nv_adma_irq_clear(struct ata_port *ap);
static int nv_adma_port_start(struct ata_port *ap); static int nv_adma_port_start(struct ata_port *ap);
static void nv_adma_port_stop(struct ata_port *ap); static void nv_adma_port_stop(struct ata_port *ap);
#ifdef CONFIG_PM
static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg); static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg);
static int nv_adma_port_resume(struct ata_port *ap); static int nv_adma_port_resume(struct ata_port *ap);
#endif
static void nv_adma_error_handler(struct ata_port *ap); static void nv_adma_error_handler(struct ata_port *ap);
static void nv_adma_host_stop(struct ata_host *host); static void nv_adma_host_stop(struct ata_host *host);
static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc); static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc);
...@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = { ...@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = nv_pci_tbl, .id_table = nv_pci_tbl,
.probe = nv_init_one, .probe = nv_init_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend, .suspend = ata_pci_device_suspend,
.resume = nv_pci_device_resume, .resume = nv_pci_device_resume,
#endif
.remove = nv_remove_one, .remove = nv_remove_one,
}; };
...@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = { ...@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
#endif
}; };
static struct scsi_host_template nv_adma_sht = { static struct scsi_host_template nv_adma_sht = {
...@@ -336,8 +344,10 @@ static struct scsi_host_template nv_adma_sht = { ...@@ -336,8 +344,10 @@ static struct scsi_host_template nv_adma_sht = {
.slave_configure = nv_adma_slave_config, .slave_configure = nv_adma_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
#endif
}; };
static const struct ata_port_operations nv_generic_ops = { static const struct ata_port_operations nv_generic_ops = {
...@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = { ...@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = {
.scr_write = nv_scr_write, .scr_write = nv_scr_write,
.port_start = nv_adma_port_start, .port_start = nv_adma_port_start,
.port_stop = nv_adma_port_stop, .port_stop = nv_adma_port_stop,
#ifdef CONFIG_PM
.port_suspend = nv_adma_port_suspend, .port_suspend = nv_adma_port_suspend,
.port_resume = nv_adma_port_resume, .port_resume = nv_adma_port_resume,
#endif
.host_stop = nv_adma_host_stop, .host_stop = nv_adma_host_stop,
}; };
...@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap) ...@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap)
writew(0, mmio + NV_ADMA_CTL); writew(0, mmio + NV_ADMA_CTL);
} }
#ifdef CONFIG_PM
static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg) static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg)
{ {
struct nv_adma_port_priv *pp = ap->private_data; struct nv_adma_port_priv *pp = ap->private_data;
...@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap) ...@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap)
return 0; return 0;
} }
#endif
static void nv_adma_setup_port(struct ata_probe_ent *probe_ent, unsigned int port) static void nv_adma_setup_port(struct ata_probe_ent *probe_ent, unsigned int port)
{ {
...@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct pci_dev *pdev) ...@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct pci_dev *pdev)
kfree(hpriv); kfree(hpriv);
} }
#ifdef CONFIG_PM
static int nv_pci_device_resume(struct pci_dev *pdev) static int nv_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = dev_get_drvdata(&pdev->dev);
...@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev) ...@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev)
return 0; return 0;
} }
#endif
static void nv_ck804_host_stop(struct ata_host *host) static void nv_ck804_host_stop(struct ata_host *host)
{ {
......
...@@ -183,8 +183,10 @@ static struct scsi_host_template sil_sht = { ...@@ -183,8 +183,10 @@ static struct scsi_host_template sil_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
#endif
}; };
static const struct ata_port_operations sil_ops = { static const struct ata_port_operations sil_ops = {
......
...@@ -380,8 +380,10 @@ static struct scsi_host_template sil24_sht = { ...@@ -380,8 +380,10 @@ static struct scsi_host_template sil24_sht = {
.slave_configure = ata_scsi_slave_config, .slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy, .slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param, .bios_param = ata_std_bios_param,
#ifdef CONFIG_PM
.suspend = ata_scsi_device_suspend, .suspend = ata_scsi_device_suspend,
.resume = ata_scsi_device_resume, .resume = ata_scsi_device_resume,
#endif
}; };
static const struct ata_port_operations sil24_ops = { static const struct ata_port_operations sil24_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment