Commit b4d511e5 authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Christoph Hellwig

pm8001: Use pci_enable_msix_exact() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.
Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Reviewed-by: default avatarJack Wang <xjtuwjp@gmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent db1924d0
...@@ -748,15 +748,16 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha) ...@@ -748,15 +748,16 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
sizeof(pm8001_ha->msix_entries[0]); sizeof(pm8001_ha->msix_entries[0]);
for (i = 0; i < max_entry ; i++) for (i = 0; i < max_entry ; i++)
pm8001_ha->msix_entries[i].entry = i; pm8001_ha->msix_entries[i].entry = i;
rc = pci_enable_msix(pm8001_ha->pdev, pm8001_ha->msix_entries, rc = pci_enable_msix_exact(pm8001_ha->pdev, pm8001_ha->msix_entries,
number_of_intr); number_of_intr);
pm8001_ha->number_of_intr = number_of_intr; pm8001_ha->number_of_intr = number_of_intr;
if (!rc) { if (rc)
return rc;
PM8001_INIT_DBG(pm8001_ha, pm8001_printk( PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
"pci_enable_msix request ret:%d no of intr %d\n", "pci_enable_msix_exact request ret:%d no of intr %d\n",
rc, pm8001_ha->number_of_intr)); rc, pm8001_ha->number_of_intr));
for (i = 0; i < number_of_intr; i++) { for (i = 0; i < number_of_intr; i++) {
snprintf(intr_drvname[i], sizeof(intr_drvname[0]), snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
DRV_NAME"%d", i); DRV_NAME"%d", i);
...@@ -767,15 +768,15 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha) ...@@ -767,15 +768,15 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
pm8001_interrupt_handler_msix, flag, pm8001_interrupt_handler_msix, flag,
intr_drvname[i], &(pm8001_ha->irq_vector[i])); intr_drvname[i], &(pm8001_ha->irq_vector[i]));
if (rc) { if (rc) {
for (j = 0; j < i; j++) for (j = 0; j < i; j++) {
free_irq( free_irq(pm8001_ha->msix_entries[j].vector,
pm8001_ha->msix_entries[j].vector,
&(pm8001_ha->irq_vector[i])); &(pm8001_ha->irq_vector[i]));
}
pci_disable_msix(pm8001_ha->pdev); pci_disable_msix(pm8001_ha->pdev);
break; break;
} }
} }
}
return rc; return rc;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment