libata: PCI device should be powered up before being accessed
[firefly-linux-kernel-4.4.55.git] / drivers / ata / pata_netcell.c
index b2c3d0767547750eb972123f31740d86743277f7..0e4a08e15209e1b72eaa510dcf882709923d08fa 100644 (file)
@@ -68,7 +68,7 @@ static const struct ata_port_operations netcell_ops = {
        .irq_on                 = ata_irq_on,
 
        /* Generic PATA PCI ATA helpers */
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 
@@ -100,11 +100,16 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
                .port_ops       = &netcell_ops,
        };
        const struct ata_port_info *port_info[] = { &info, NULL };
+       int rc;
 
        if (!printed_version++)
                dev_printk(KERN_DEBUG, &pdev->dev,
                           "version " DRV_VERSION "\n");
 
+       rc = pcim_enable_device(pdev);
+       if (rc)
+               return rc;
+
        /* Any chip specific setup/optimisation/messages here */
        ata_pci_clear_simplex(pdev);