diff options
author | Alan <alan@lxorguk.ukuu.org.uk> | 2006-11-27 11:14:36 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-01 22:46:55 -0500 |
commit | f535d53f3f8bc8243ad2167d7127f6efba9b46cb (patch) | |
tree | a7f5b44c680d7134367579eabc60b34900bfd9a3 /drivers | |
parent | 38e0d56e67849720d306e2d7cd1a2793deec9644 (diff) |
[PATCH] pata_it821x: Suspend/Resume support
If you are using the noraid option then after a suspend/resume sequence
we need to reset the card back out of raid mode again.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_it821x.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 7f68f14be6fd..d57ac741cc08 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
@@ -80,7 +80,7 @@ | |||
80 | 80 | ||
81 | 81 | ||
82 | #define DRV_NAME "pata_it821x" | 82 | #define DRV_NAME "pata_it821x" |
83 | #define DRV_VERSION "0.3.2" | 83 | #define DRV_VERSION "0.3.3" |
84 | 84 | ||
85 | struct it821x_dev | 85 | struct it821x_dev |
86 | { | 86 | { |
@@ -677,6 +677,8 @@ static struct scsi_host_template it821x_sht = { | |||
677 | .slave_configure = ata_scsi_slave_config, | 677 | .slave_configure = ata_scsi_slave_config, |
678 | .slave_destroy = ata_scsi_slave_destroy, | 678 | .slave_destroy = ata_scsi_slave_destroy, |
679 | .bios_param = ata_std_bios_param, | 679 | .bios_param = ata_std_bios_param, |
680 | .resume = ata_scsi_device_resume, | ||
681 | .suspend = ata_scsi_device_suspend, | ||
680 | }; | 682 | }; |
681 | 683 | ||
682 | static struct ata_port_operations it821x_smart_port_ops = { | 684 | static struct ata_port_operations it821x_smart_port_ops = { |
@@ -809,6 +811,14 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
809 | return ata_pci_init_one(pdev, port_info, 2); | 811 | return ata_pci_init_one(pdev, port_info, 2); |
810 | } | 812 | } |
811 | 813 | ||
814 | static int it821x_reinit_one(struct pci_dev *pdev) | ||
815 | { | ||
816 | /* Resume - turn raid back off if need be */ | ||
817 | if (it8212_noraid) | ||
818 | it821x_disable_raid(pdev); | ||
819 | return ata_pci_device_resume(pdev); | ||
820 | } | ||
821 | |||
812 | static const struct pci_device_id it821x[] = { | 822 | static const struct pci_device_id it821x[] = { |
813 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), }, | 823 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), }, |
814 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), }, | 824 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), }, |
@@ -820,7 +830,9 @@ static struct pci_driver it821x_pci_driver = { | |||
820 | .name = DRV_NAME, | 830 | .name = DRV_NAME, |
821 | .id_table = it821x, | 831 | .id_table = it821x, |
822 | .probe = it821x_init_one, | 832 | .probe = it821x_init_one, |
823 | .remove = ata_pci_remove_one | 833 | .remove = ata_pci_remove_one, |
834 | .suspend = ata_pci_device_suspend, | ||
835 | .resume = it821x_reinit_one, | ||
824 | }; | 836 | }; |
825 | 837 | ||
826 | static int __init it821x_init(void) | 838 | static int __init it821x_init(void) |