aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_cs5520.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 33d2b88f9c79..f839c0304b3a 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -41,7 +41,7 @@
41#include <linux/libata.h> 41#include <linux/libata.h>
42 42
43#define DRV_NAME "pata_cs5520" 43#define DRV_NAME "pata_cs5520"
44#define DRV_VERSION "0.6.2" 44#define DRV_VERSION "0.6.3"
45 45
46struct pio_clocks 46struct pio_clocks
47{ 47{
@@ -168,6 +168,8 @@ static struct scsi_host_template cs5520_sht = {
168 .slave_configure = ata_scsi_slave_config, 168 .slave_configure = ata_scsi_slave_config,
169 .slave_destroy = ata_scsi_slave_destroy, 169 .slave_destroy = ata_scsi_slave_destroy,
170 .bios_param = ata_std_bios_param, 170 .bios_param = ata_std_bios_param,
171 .resume = ata_scsi_device_resume,
172 .suspend = ata_scsi_device_suspend,
171}; 173};
172 174
173static struct ata_port_operations cs5520_port_ops = { 175static struct ata_port_operations cs5520_port_ops = {
@@ -297,6 +299,22 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)
297 dev_set_drvdata(dev, NULL); 299 dev_set_drvdata(dev, NULL);
298} 300}
299 301
302/**
303 * cs5520_reinit_one - device resume
304 * @pdev: PCI device
305 *
306 * Do any reconfiguration work needed by a resume from RAM. We need
307 * to restore DMA mode support on BIOSen which disabled it
308 */
309
310static int cs5520_reinit_one(struct pci_dev *pdev)
311{
312 u8 pcicfg;
313 pci_read_config_byte(pdev, 0x60, &pcicfg);
314 if ((pcicfg & 0x40) == 0)
315 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
316 return ata_pci_device_resume(pdev);
317}
300/* For now keep DMA off. We can set it for all but A rev CS5510 once the 318/* For now keep DMA off. We can set it for all but A rev CS5510 once the
301 core ATA code can handle it */ 319 core ATA code can handle it */
302 320
@@ -311,7 +329,9 @@ static struct pci_driver cs5520_pci_driver = {
311 .name = DRV_NAME, 329 .name = DRV_NAME,
312 .id_table = pata_cs5520, 330 .id_table = pata_cs5520,
313 .probe = cs5520_init_one, 331 .probe = cs5520_init_one,
314 .remove = cs5520_remove_one 332 .remove = cs5520_remove_one,
333 .suspend = ata_pci_device_suspend,
334 .resume = cs5520_reinit_one,
315}; 335};
316 336
317static int __init cs5520_init(void) 337static int __init cs5520_init(void)