Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

csiostor: Use pci_enable_msix_range() 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: Alexander Gordeev <agordeev@redhat.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

Alexander Gordeev and committed by
Christoph Hellwig
6b733521 c6b9bad2

+10 -14
+1 -1
drivers/scsi/csiostor/csio_hw.h
··· 94 94 }; 95 95 96 96 struct csio_msix_entries { 97 - unsigned short vector; /* Vector assigned by pci_enable_msix */ 97 + unsigned short vector; /* Assigned MSI-X vector */ 98 98 void *dev_id; /* Priv object associated w/ this msix*/ 99 99 char desc[24]; /* Description of this vector */ 100 100 };
+9 -13
drivers/scsi/csiostor/csio_isr.c
··· 499 499 static int 500 500 csio_enable_msix(struct csio_hw *hw) 501 501 { 502 - int rv, i, j, k, n, min, cnt; 502 + int i, j, k, n, min, cnt; 503 503 struct csio_msix_entries *entryp; 504 504 struct msix_entry *entries; 505 505 int extra = CSIO_EXTRA_VECS; ··· 521 521 522 522 csio_dbg(hw, "FW supp #niq:%d, trying %d msix's\n", hw->cfg_niq, cnt); 523 523 524 - while ((rv = pci_enable_msix(hw->pdev, entries, cnt)) >= min) 525 - cnt = rv; 526 - if (!rv) { 527 - if (cnt < (hw->num_sqsets + extra)) { 528 - csio_dbg(hw, "Reducing sqsets to %d\n", cnt - extra); 529 - csio_reduce_sqsets(hw, cnt - extra); 530 - } 531 - } else { 532 - if (rv > 0) 533 - csio_info(hw, "Not using MSI-X, remainder:%d\n", rv); 534 - 524 + cnt = pci_enable_msix_range(hw->pdev, entries, min, cnt); 525 + if (cnt < 0) { 535 526 kfree(entries); 536 - return -ENOMEM; 527 + return cnt; 528 + } 529 + 530 + if (cnt < (hw->num_sqsets + extra)) { 531 + csio_dbg(hw, "Reducing sqsets to %d\n", cnt - extra); 532 + csio_reduce_sqsets(hw, cnt - extra); 537 533 } 538 534 539 535 /* Save off vectors */