: block: Use pci_enable_msix_exact()
Subsystems (2)
cover : block: Use pci_enable_msix_exact()
Hi Jens,
The series is against v3.15-rc1. The patches complete converison of block layer device drivers to the new MSI initialization API.
Thanks!
Alexander Gordeev (2):
skd: Use pci_enable_msix_exact() instead of pci_enable_msix_range()
cciss: Use pci_enable_msix_exact() instead of pci_enable_msix()
drivers/block/cciss.c | 6 +----- drivers/block/skd_main.c | 7 +++---- 2 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.7.6
PATCH RESEND 1/2 skd: Use pci_enable_msix_exact() instead of pci_enable_msix_range()
Function pci_enable_msix_exact() is a variation of pci_enable_msix_range() that allows a device driver to request a particular number of MSI-X interrupts, rather than any number within a specified range.
--- drivers/block/skd_main.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/block/skd_main.c +3 -4
@@ -3945,15 +3945,14 @@ static int skd_acquire_msix(struct skd_device *skdev)for (i =0 ; i <SKD_MAX_MSIX_COUNT ; i++) entries[i].entry = i; - rc =pci_enable_msix_range (pdev, entries, -SKD_MIN_MSIX_COUNT ,SKD_MAX_MSIX_COUNT ); -if (rc <0 ) { + rc =pci_enable_msix_exact (pdev, entries,SKD_MAX_MSIX_COUNT ); +if (rc) {pr_err ("(%s): failed to enable MSI-X %d\n" ,skd_name (skdev), rc); goto msix_out; } - skdev->msix_count = rc; + skdev->msix_count =SKD_MAX_MSIX_COUNT ; skdev->msix_entries =kzalloc (sizeof (struct skd_msix_entry ) * skdev->msix_count,GFP_KERNEL );if (!skdev->msix_entries) {
Signature · 1 line
1.7.7.6
PATCH RESEND 2/2 cciss: Use pci_enable_msix_exact() instead of pci_enable_msix()
In reply to Alexander GordeevAs 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.
--- drivers/block/cciss.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/block/cciss.c +1 -5
@@ -4080,7 +4080,7 @@ static void cciss_interrupt_mode(ctlr_info_t *h) goto default_int_mode;if (pci_find_capability (h->pdev,PCI_CAP_ID_MSIX )) { - err =pci_enable_msix (h->pdev, cciss_msix_entries,4 ); + err =pci_enable_msix_exact (h->pdev, cciss_msix_entries,4 );if (!err) { h->intr[0 ] = cciss_msix_entries[0 ].vector; h->intr[1 ] = cciss_msix_entries[1 ].vector;
@@ -4088,10 +4088,6 @@ static void cciss_interrupt_mode(ctlr_info_t *h) h->intr[3 ] = cciss_msix_entries[3 ].vector; h->msix_vector =1 ;return ; - } -if (err >0 ) { -dev_warn (&h->pdev->dev, -"only %d MSI-X vectors available\n" , err); }else {dev_warn (&h->pdev->dev,"MSI-X init failed %d\n" , err);
Signature · 1 line
1.7.7.6
Quoted 4 lines · Alexander Gordeev
Hi Jens,
The series is against v3.15-rc1. The patches complete converison of block layer device drivers to the new MSI initialization API.
Thanks, applied for 3.16.
Signature · 1 line
Jens Axboe