aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_nv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r--drivers/ata/sata_nv.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 30eed12b3631..388d07fab5f7 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -230,7 +230,9 @@ struct nv_host_priv {
230 230
231static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); 231static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
232static void nv_remove_one (struct pci_dev *pdev); 232static void nv_remove_one (struct pci_dev *pdev);
233#ifdef CONFIG_PM
233static int nv_pci_device_resume(struct pci_dev *pdev); 234static int nv_pci_device_resume(struct pci_dev *pdev);
235#endif
234static void nv_ck804_host_stop(struct ata_host *host); 236static void nv_ck804_host_stop(struct ata_host *host);
235static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance); 237static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance);
236static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance); 238static 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);
251static void nv_adma_irq_clear(struct ata_port *ap); 253static void nv_adma_irq_clear(struct ata_port *ap);
252static int nv_adma_port_start(struct ata_port *ap); 254static int nv_adma_port_start(struct ata_port *ap);
253static void nv_adma_port_stop(struct ata_port *ap); 255static void nv_adma_port_stop(struct ata_port *ap);
256#ifdef CONFIG_PM
254static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg); 257static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg);
255static int nv_adma_port_resume(struct ata_port *ap); 258static int nv_adma_port_resume(struct ata_port *ap);
259#endif
256static void nv_adma_error_handler(struct ata_port *ap); 260static void nv_adma_error_handler(struct ata_port *ap);
257static void nv_adma_host_stop(struct ata_host *host); 261static void nv_adma_host_stop(struct ata_host *host);
258static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc); 262static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc);
@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = {
295 .name = DRV_NAME, 299 .name = DRV_NAME,
296 .id_table = nv_pci_tbl, 300 .id_table = nv_pci_tbl,
297 .probe = nv_init_one, 301 .probe = nv_init_one,
302#ifdef CONFIG_PM
298 .suspend = ata_pci_device_suspend, 303 .suspend = ata_pci_device_suspend,
299 .resume = nv_pci_device_resume, 304 .resume = nv_pci_device_resume,
305#endif
300 .remove = nv_remove_one, 306 .remove = nv_remove_one,
301}; 307};
302 308
@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = {
316 .slave_configure = ata_scsi_slave_config, 322 .slave_configure = ata_scsi_slave_config,
317 .slave_destroy = ata_scsi_slave_destroy, 323 .slave_destroy = ata_scsi_slave_destroy,
318 .bios_param = ata_std_bios_param, 324 .bios_param = ata_std_bios_param,
325#ifdef CONFIG_PM
319 .suspend = ata_scsi_device_suspend, 326 .suspend = ata_scsi_device_suspend,
320 .resume = ata_scsi_device_resume, 327 .resume = ata_scsi_device_resume,
328#endif
321}; 329};
322 330
323static struct scsi_host_template nv_adma_sht = { 331static struct scsi_host_template nv_adma_sht = {
@@ -336,8 +344,10 @@ static struct scsi_host_template nv_adma_sht = {
336 .slave_configure = nv_adma_slave_config, 344 .slave_configure = nv_adma_slave_config,
337 .slave_destroy = ata_scsi_slave_destroy, 345 .slave_destroy = ata_scsi_slave_destroy,
338 .bios_param = ata_std_bios_param, 346 .bios_param = ata_std_bios_param,
347#ifdef CONFIG_PM
339 .suspend = ata_scsi_device_suspend, 348 .suspend = ata_scsi_device_suspend,
340 .resume = ata_scsi_device_resume, 349 .resume = ata_scsi_device_resume,
350#endif
341}; 351};
342 352
343static const struct ata_port_operations nv_generic_ops = { 353static const struct ata_port_operations nv_generic_ops = {
@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = {
449 .scr_write = nv_scr_write, 459 .scr_write = nv_scr_write,
450 .port_start = nv_adma_port_start, 460 .port_start = nv_adma_port_start,
451 .port_stop = nv_adma_port_stop, 461 .port_stop = nv_adma_port_stop,
462#ifdef CONFIG_PM
452 .port_suspend = nv_adma_port_suspend, 463 .port_suspend = nv_adma_port_suspend,
453 .port_resume = nv_adma_port_resume, 464 .port_resume = nv_adma_port_resume,
465#endif
454 .host_stop = nv_adma_host_stop, 466 .host_stop = nv_adma_host_stop,
455}; 467};
456 468
@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap)
1003 writew(0, mmio + NV_ADMA_CTL); 1015 writew(0, mmio + NV_ADMA_CTL);
1004} 1016}
1005 1017
1018#ifdef CONFIG_PM
1006static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg) 1019static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg)
1007{ 1020{
1008 struct nv_adma_port_priv *pp = ap->private_data; 1021 struct nv_adma_port_priv *pp = ap->private_data;
@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap)
1053 1066
1054 return 0; 1067 return 0;
1055} 1068}
1069#endif
1056 1070
1057static void nv_adma_setup_port(struct ata_probe_ent *probe_ent, unsigned int port) 1071static void nv_adma_setup_port(struct ata_probe_ent *probe_ent, unsigned int port)
1058{ 1072{
@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct pci_dev *pdev)
1555 kfree(hpriv); 1569 kfree(hpriv);
1556} 1570}
1557 1571
1572#ifdef CONFIG_PM
1558static int nv_pci_device_resume(struct pci_dev *pdev) 1573static int nv_pci_device_resume(struct pci_dev *pdev)
1559{ 1574{
1560 struct ata_host *host = dev_get_drvdata(&pdev->dev); 1575 struct ata_host *host = dev_get_drvdata(&pdev->dev);
@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev)
1602 1617
1603 return 0; 1618 return 0;
1604} 1619}
1620#endif
1605 1621
1606static void nv_ck804_host_stop(struct ata_host *host) 1622static void nv_ck804_host_stop(struct ata_host *host)
1607{ 1623{