]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/ata/pata_it821x.c
PCI: Change all drivers to use pci_device->revision
[mirror_ubuntu-bionic-kernel.git] / drivers / ata / pata_it821x.c
index dab4e7cf8cda0d7a9df9922aea68c5072a608561..430673be1df7560aea3d4be5c9f85e1c53fb0ceb 100644 (file)
@@ -587,8 +587,7 @@ static int it821x_port_start(struct ata_port *ap)
        itdev->want[1][1] = ATA_ANY;
        itdev->last_device = -1;
 
-       pci_read_config_byte(pdev, PCI_REVISION_ID, &conf);
-       if (conf == 0x10) {
+       if (pdev->revision == 0x11) {
                itdev->timing10 = 1;
                /* Need to disable ATAPI DMA for this case */
                if (!itdev->smart)
@@ -690,7 +689,7 @@ static struct ata_port_operations it821x_passthru_port_ops = {
        .port_start     = it821x_port_start,
 };
 
-static void __devinit it821x_disable_raid(struct pci_dev *pdev)
+static void it821x_disable_raid(struct pci_dev *pdev)
 {
        /* Reset local CPU, and set BIOS not ready */
        pci_write_config_byte(pdev, 0x5E, 0x01);
@@ -714,17 +713,17 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
        static const struct ata_port_info info_smart = {
                .sht = &it821x_sht,
-               .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags = ATA_FLAG_SLAVE_POSS,
                .pio_mask = 0x1f,
                .mwdma_mask = 0x07,
                .port_ops = &it821x_smart_port_ops
        };
        static const struct ata_port_info info_passthru = {
                .sht = &it821x_sht,
-               .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags = ATA_FLAG_SLAVE_POSS,
                .pio_mask = 0x1f,
                .mwdma_mask = 0x07,
-               .udma_mask = 0x7f,
+               .udma_mask = ATA_UDMA6,
                .port_ops = &it821x_passthru_port_ops
        };