diff options
Diffstat (limited to 'drivers/scsi/sata_sil.c')
-rw-r--r-- | drivers/scsi/sata_sil.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 6033f796397f..d0a85073ebf7 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -109,6 +109,7 @@ enum { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); | 111 | static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); |
112 | static int sil_pci_device_resume(struct pci_dev *pdev); | ||
112 | static void sil_dev_config(struct ata_port *ap, struct ata_device *dev); | 113 | static void sil_dev_config(struct ata_port *ap, struct ata_device *dev); |
113 | static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg); | 114 | static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg); |
114 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | 115 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); |
@@ -160,6 +161,8 @@ static struct pci_driver sil_pci_driver = { | |||
160 | .id_table = sil_pci_tbl, | 161 | .id_table = sil_pci_tbl, |
161 | .probe = sil_init_one, | 162 | .probe = sil_init_one, |
162 | .remove = ata_pci_remove_one, | 163 | .remove = ata_pci_remove_one, |
164 | .suspend = ata_pci_device_suspend, | ||
165 | .resume = sil_pci_device_resume, | ||
163 | }; | 166 | }; |
164 | 167 | ||
165 | static struct scsi_host_template sil_sht = { | 168 | static struct scsi_host_template sil_sht = { |
@@ -178,6 +181,8 @@ static struct scsi_host_template sil_sht = { | |||
178 | .slave_configure = ata_scsi_slave_config, | 181 | .slave_configure = ata_scsi_slave_config, |
179 | .slave_destroy = ata_scsi_slave_destroy, | 182 | .slave_destroy = ata_scsi_slave_destroy, |
180 | .bios_param = ata_std_bios_param, | 183 | .bios_param = ata_std_bios_param, |
184 | .suspend = ata_scsi_device_suspend, | ||
185 | .resume = ata_scsi_device_resume, | ||
181 | }; | 186 | }; |
182 | 187 | ||
183 | static const struct ata_port_operations sil_ops = { | 188 | static const struct ata_port_operations sil_ops = { |
@@ -695,6 +700,18 @@ err_out: | |||
695 | return rc; | 700 | return rc; |
696 | } | 701 | } |
697 | 702 | ||
703 | static int sil_pci_device_resume(struct pci_dev *pdev) | ||
704 | { | ||
705 | struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); | ||
706 | |||
707 | ata_pci_device_do_resume(pdev); | ||
708 | sil_init_controller(pdev, host_set->n_ports, host_set->ports[0]->flags, | ||
709 | host_set->mmio_base); | ||
710 | ata_host_set_resume(host_set); | ||
711 | |||
712 | return 0; | ||
713 | } | ||
714 | |||
698 | static int __init sil_init(void) | 715 | static int __init sil_init(void) |
699 | { | 716 | { |
700 | return pci_module_init(&sil_pci_driver); | 717 | return pci_module_init(&sil_pci_driver); |