diff options
Diffstat (limited to 'drivers/ata/pata_via.c')
-rw-r--r-- | drivers/ata/pata_via.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index d119a68c388f..24430f70f00e 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -524,10 +524,15 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
524 | static int printed_version; | 524 | static int printed_version; |
525 | u8 enable; | 525 | u8 enable; |
526 | u32 timing; | 526 | u32 timing; |
527 | int rc; | ||
527 | 528 | ||
528 | if (!printed_version++) | 529 | if (!printed_version++) |
529 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); | 530 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
530 | 531 | ||
532 | rc = pcim_enable_device(pdev); | ||
533 | if (rc) | ||
534 | return rc; | ||
535 | |||
531 | /* To find out how the IDE will behave and what features we | 536 | /* To find out how the IDE will behave and what features we |
532 | actually have to look at the bridge not the IDE controller */ | 537 | actually have to look at the bridge not the IDE controller */ |
533 | for (config = via_isa_bridges; config->id; config++) | 538 | for (config = via_isa_bridges; config->id; config++) |
@@ -615,6 +620,11 @@ static int via_reinit_one(struct pci_dev *pdev) | |||
615 | u32 timing; | 620 | u32 timing; |
616 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 621 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
617 | const struct via_isa_bridge *config = host->private_data; | 622 | const struct via_isa_bridge *config = host->private_data; |
623 | int rc; | ||
624 | |||
625 | rc = ata_pci_device_do_resume(pdev); | ||
626 | if (rc) | ||
627 | return rc; | ||
618 | 628 | ||
619 | via_config_fifo(pdev, config->flags); | 629 | via_config_fifo(pdev, config->flags); |
620 | 630 | ||
@@ -630,7 +640,9 @@ static int via_reinit_one(struct pci_dev *pdev) | |||
630 | timing &= ~0x80008; | 640 | timing &= ~0x80008; |
631 | pci_write_config_dword(pdev, 0x50, timing); | 641 | pci_write_config_dword(pdev, 0x50, timing); |
632 | } | 642 | } |
633 | return ata_pci_device_resume(pdev); | 643 | |
644 | ata_host_resume(host); | ||
645 | return 0; | ||
634 | } | 646 | } |
635 | #endif | 647 | #endif |
636 | 648 | ||