libata: PCI device should be powered up before being accessed
[firefly-linux-kernel-4.4.55.git] / drivers / ata / pata_netcell.c
index b7c8b13ffda8572c9aebaf03115e45cac1f87e5f..0e4a08e15209e1b72eaa510dcf882709923d08fa 100644 (file)
@@ -40,8 +40,6 @@ static struct scsi_host_template netcell_sht = {
 };
 
 static const struct ata_port_operations netcell_ops = {
-       .port_disable           = ata_port_disable,
-
        /* Task file is PCI ATA format, use helpers */
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
@@ -68,10 +66,9 @@ static const struct ata_port_operations netcell_ops = {
        .irq_handler            = ata_interrupt,
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
-       .irq_ack                = ata_irq_ack,
 
        /* Generic PATA PCI ATA helpers */
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 
@@ -99,15 +96,20 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
                   firmware deals with it */
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x07, /* mwdma0-2 */
-               .udma_mask      = 0x3f, /* UDMA 133 */
+               .udma_mask      = ATA_UDMA5, /* UDMA 133 */
                .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);