]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ata: Use always-managed version of pci_intx()
authorPhilipp Stanner <pstanner@redhat.com>
Mon, 9 Dec 2024 13:06:30 +0000 (14:06 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 18 Jan 2025 20:38:49 +0000 (14:38 -0600)
pci_intx() is a hybrid function which can sometimes be managed through
devres. To remove this hybrid nature from pci_intx(), it is necessary to
port users to either an always-managed or a never-managed version.

All users in ata enable their PCI devices with pcim_enable_device(). Thus,
they need the always-managed version.

Replace pci_intx() with pcim_intx().

Link: https://lore.kernel.org/r/20241209130632.132074-10-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Acked-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/ahci.c
drivers/ata/ata_piix.c
drivers/ata/pata_rdc.c
drivers/ata/sata_sil24.c
drivers/ata/sata_sis.c
drivers/ata/sata_uli.c
drivers/ata/sata_vsc.c

index 8d27c567be1c15507e5649ae56bd76df89abafed..f813dbdc2346fb1ee88a720a633d47b359c36d99 100644 (file)
@@ -1987,7 +1987,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        if (ahci_init_msi(pdev, n_ports, hpriv) < 0) {
                /* legacy intx interrupts */
-               pci_intx(pdev, 1);
+               pcim_intx(pdev, 1);
        }
        hpriv->irq = pci_irq_vector(pdev, 0);
 
index 093b940bc953f0dc40b32822a2e94ac97aacd3c4..d441246fa357a162bf21604116b419c2791df55c 100644 (file)
@@ -1725,7 +1725,7 @@ static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
         * message-signalled interrupts currently).
         */
        if (port_flags & PIIX_FLAG_CHECKINTR)
-               pci_intx(pdev, 1);
+               pcim_intx(pdev, 1);
 
        if (piix_check_450nx_errata(pdev)) {
                /* This writes into the master table but it does not
index 0a9689862f7109e856e427112c8212ab95a3f77f..09792aac7f9d8c0e012c3d1a719eb3843f88592a 100644 (file)
@@ -340,7 +340,7 @@ static int rdc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                return rc;
        host->private_data = hpriv;
 
-       pci_intx(pdev, 1);
+       pcim_intx(pdev, 1);
 
        host->flags |= ATA_HOST_PARALLEL_SCAN;
 
index 72c03cbdaff43b02f1b21b7bdb4f3cf458bc0887..b771ebd412528fd1cfc44fd17ee5abfe6ccd8902 100644 (file)
@@ -1317,7 +1317,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        if (sata_sil24_msi && !pci_enable_msi(pdev)) {
                dev_info(&pdev->dev, "Using MSI\n");
-               pci_intx(pdev, 0);
+               pcim_intx(pdev, 0);
        }
 
        pci_set_master(pdev);
index ef8724986de31b5e8db52e3822ae2a8928f76049..b8b6d9eff3b81441accad071dd64e280a505fd62 100644 (file)
@@ -290,7 +290,7 @@ static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        pci_set_master(pdev);
-       pci_intx(pdev, 1);
+       pcim_intx(pdev, 1);
        return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
                                 IRQF_SHARED, &sis_sht);
 }
index 60ea45926cd1449cdf2ad46c7df7c6e49d507c66..52894ff49dcbaf3132723e12d4a28a07e6573623 100644 (file)
@@ -221,7 +221,7 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        pci_set_master(pdev);
-       pci_intx(pdev, 1);
+       pcim_intx(pdev, 1);
        return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
                                 IRQF_SHARED, &uli_sht);
 }
index d39b875371682b8c0733cb00942f751346678d1b..a53a2dfc1e174c148ac2ce7d1e6c6110cbab187a 100644 (file)
@@ -384,7 +384,7 @@ static int vsc_sata_init_one(struct pci_dev *pdev,
                pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x80);
 
        if (pci_enable_msi(pdev) == 0)
-               pci_intx(pdev, 0);
+               pcim_intx(pdev, 0);
 
        /*
         * Config offset 0x98 is "Extended Control and Status Register 0"