diff options
Diffstat (limited to 'drivers/ata/pata_cs5520.c')
-rw-r--r-- | drivers/ata/pata_cs5520.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 1ce8fcfd7826..c1334c6c4156 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.3" | 44 | #define DRV_VERSION "0.6.4" |
45 | 45 | ||
46 | struct pio_clocks | 46 | struct pio_clocks |
47 | { | 47 | { |
@@ -325,6 +325,30 @@ static int cs5520_reinit_one(struct pci_dev *pdev) | |||
325 | pci_write_config_byte(pdev, 0x60, pcicfg | 0x40); | 325 | pci_write_config_byte(pdev, 0x60, pcicfg | 0x40); |
326 | return ata_pci_device_resume(pdev); | 326 | return ata_pci_device_resume(pdev); |
327 | } | 327 | } |
328 | |||
329 | /** | ||
330 | * cs5520_pci_device_suspend - device suspend | ||
331 | * @pdev: PCI device | ||
332 | * | ||
333 | * We have to cut and waste bits from the standard method because | ||
334 | * the 5520 is a bit odd and not just a pure ATA device. As a result | ||
335 | * we must not disable it. The needed code is short and this avoids | ||
336 | * chip specific mess in the core code. | ||
337 | */ | ||
338 | |||
339 | static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | ||
340 | { | ||
341 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | ||
342 | int rc = 0; | ||
343 | |||
344 | rc = ata_host_suspend(host, mesg); | ||
345 | if (rc) | ||
346 | return rc; | ||
347 | |||
348 | pci_save_state(pdev); | ||
349 | return 0; | ||
350 | } | ||
351 | |||
328 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the | 352 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the |
329 | core ATA code can handle it */ | 353 | core ATA code can handle it */ |
330 | 354 | ||
@@ -340,7 +364,7 @@ static struct pci_driver cs5520_pci_driver = { | |||
340 | .id_table = pata_cs5520, | 364 | .id_table = pata_cs5520, |
341 | .probe = cs5520_init_one, | 365 | .probe = cs5520_init_one, |
342 | .remove = cs5520_remove_one, | 366 | .remove = cs5520_remove_one, |
343 | .suspend = ata_pci_device_suspend, | 367 | .suspend = cs5520_pci_device_suspend, |
344 | .resume = cs5520_reinit_one, | 368 | .resume = cs5520_reinit_one, |
345 | }; | 369 | }; |
346 | 370 | ||