libata: PCI device should be powered up before being accessed
[firefly-linux-kernel-4.4.55.git] / drivers / ata / pata_artop.c
index d4218310327b2795c1b1337eb9383ae9e5866b55..2f8148016971faafa3227929eaf7c91560606028 100644 (file)
@@ -446,11 +446,16 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
                .port_ops       = &artop6260_ops,
        };
        const struct ata_port_info *ppi[] = { NULL, 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;
+
        if (id->driver_data == 0) {     /* 6210 variant */
                ppi[0] = &info_6210;
                ppi[1] = &ata_dummy_port_info;