* [PATCH 00/22] scsi: Use pci_enable_msix_range()
@ 2014-02-04 11:16 Alexander Gordeev
2014-02-04 11:16 ` [PATCH 01/22] be2iscsi: " Alexander Gordeev
` (22 more replies)
0 siblings, 23 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, pv-drivers, iscsi-driver, qla2xxx-upstream,
support, DL-MPTFusionLinux, intel-linux-scu, iss_storagedev,
linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Cc: pv-drivers@vmware.com
Cc: iscsi-driver@qlogic.com
Cc: qla2xxx-upstream@qlogic.com
Cc: support@lsi.com
Cc: DL-MPTFusionLinux@lsi.com
Cc: intel-linux-scu@intel.com
Cc: iss_storagedev@hp.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Alexander Gordeev (22):
be2iscsi: Use pci_enable_msix_range()
bfa: Do not call pci_enable_msix() once it failed
bfa: Cleanup bfad_setup_intr()
bfa: Use pci_enable_msix_range()
csiostor: Remove superfluous call to pci_disable_msix()
csiostor: Use pci_enable_msix_range()
fnic: Use pci_enable_msix_range()
hpsa: Fallback to MSI rather than to INTx if MSI-X failed
hpsa: Use pci_enable_msix_range()
isci: Use pci_enable_msix_range()
lpfc: Remove superfluous call to pci_disable_msix()
lpfc: Use pci_enable_msix_range()
megaraid: Use pci_enable_msix_range()
mpt2sas: Use pci_enable_msix_range()
mpt3sas: Use pci_enable_msix_range()
pm8001: Fix invalid success return when request_irq() failed
pm8001: Use pci_enable_msix_range()
pmcraid: Get rid of a redundant assignment
pmcraid: Use pci_enable_msix_range()
qla2xxx: Use pci_enable_msix_range()
qla4xxx: Use pci_enable_msix_range()
vmw_pvscsi: Use pci_enable_msix_range()
drivers/scsi/be2iscsi/be_main.c | 6 +-
drivers/scsi/bfa/bfad.c | 62 ++++++++++++-----------------
drivers/scsi/csiostor/csio_hw.h | 2 +-
drivers/scsi/csiostor/csio_isr.c | 26 +++++-------
drivers/scsi/fnic/fnic_isr.c | 4 +-
drivers/scsi/hpsa.c | 23 ++++------
drivers/scsi/isci/init.c | 5 +-
drivers/scsi/lpfc/lpfc_init.c | 30 +++++++-------
drivers/scsi/megaraid/megaraid_sas_base.c | 25 +++++------
drivers/scsi/mpt2sas/mpt2sas_base.c | 11 +++--
drivers/scsi/mpt3sas/mpt3sas_base.c | 9 +++-
drivers/scsi/pm8001/pm8001_init.c | 46 +++++++++++----------
drivers/scsi/pmcraid.c | 14 +------
drivers/scsi/qla2xxx/qla_isr.c | 27 +++++-------
drivers/scsi/qla4xxx/ql4_nx.c | 5 +-
drivers/scsi/vmw_pvscsi.c | 4 +-
16 files changed, 134 insertions(+), 165 deletions(-)
--
1.7.7.6
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 01/22] be2iscsi: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-05 4:58 ` Jayamohan Kallickal
2014-02-04 11:16 ` [PATCH 02/22] bfa: Do not call pci_enable_msix() once it failed Alexander Gordeev
` (21 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Jayamohan Kallickal, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/be2iscsi/be_main.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 1f37505..5878f3e 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -5284,9 +5284,9 @@ static void beiscsi_msix_enable(struct beiscsi_hba *phba)
for (i = 0; i <= phba->num_cpus; i++)
phba->msix_entries[i].entry = i;
- status = pci_enable_msix(phba->pcidev, phba->msix_entries,
- (phba->num_cpus + 1));
- if (!status)
+ status = pci_enable_msix_range(phba->pcidev, phba->msix_entries,
+ phba->num_cpus + 1, phba->num_cpus + 1);
+ if (status > 0)
phba->msix_enabled = true;
return;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 02/22] bfa: Do not call pci_enable_msix() once it failed
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 01/22] be2iscsi: " Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-13 17:39 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 03/22] bfa: Cleanup bfad_setup_intr() Alexander Gordeev
` (20 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Anil Gurumurthy, Vijaya Mohan Guvva,
linux-scsi, linux-pci
Function pci_enable_msix() should not be called again in
case it threw a negative errno.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Anil Gurumurthy <agurumur@brocade.com>
Cc: Vijaya Mohan Guvva <vmohan@brocade.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/bfa/bfad.c | 48 ++++++++++++++++++++++------------------------
1 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 85ee9c0..9b3e407 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1235,33 +1235,31 @@ bfad_setup_intr(struct bfad_s *bfad)
(bfa_asic_id_cb(pdev->device) && !msix_disable_cb)) {
error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec);
- if (error) {
- /* In CT1 & CT2, try to allocate just one vector */
- if (bfa_asic_id_ctc(pdev->device)) {
- printk(KERN_WARNING "bfa %s: trying one msix "
- "vector failed to allocate %d[%d]\n",
- bfad->pci_name, bfad->nvec, error);
- bfad->nvec = 1;
- error = pci_enable_msix(bfad->pcidev,
+ /* In CT1 & CT2, try to allocate just one vector */
+ if (error > 0 && bfa_asic_id_ctc(pdev->device)) {
+ printk(KERN_WARNING "bfa %s: trying one msix "
+ "vector failed to allocate %d[%d]\n",
+ bfad->pci_name, bfad->nvec, error);
+ bfad->nvec = 1;
+ error = pci_enable_msix(bfad->pcidev,
msix_entries, bfad->nvec);
- }
+ }
- /*
- * Only error number of vector is available.
- * We don't have a mechanism to map multiple
- * interrupts into one vector, so even if we
- * can try to request less vectors, we don't
- * know how to associate interrupt events to
- * vectors. Linux doesn't duplicate vectors
- * in the MSIX table for this case.
- */
- if (error) {
- printk(KERN_WARNING "bfad%d: "
- "pci_enable_msix failed (%d), "
- "use line based.\n",
- bfad->inst_no, error);
- goto line_based;
- }
+ /*
+ * Only error number of vector is available.
+ * We don't have a mechanism to map multiple
+ * interrupts into one vector, so even if we
+ * can try to request less vectors, we don't
+ * know how to associate interrupt events to
+ * vectors. Linux doesn't duplicate vectors
+ * in the MSIX table for this case.
+ */
+ if (error) {
+ printk(KERN_WARNING "bfad%d: "
+ "pci_enable_msix failed (%d), "
+ "use line based.\n",
+ bfad->inst_no, error);
+ goto line_based;
}
/* Disable INTX in MSI-X mode */
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 03/22] bfa: Cleanup bfad_setup_intr()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 01/22] be2iscsi: " Alexander Gordeev
2014-02-04 11:16 ` [PATCH 02/22] bfa: Do not call pci_enable_msix() once it failed Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 04/22] bfa: Use pci_enable_msix_range() Alexander Gordeev
` (19 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Anil Gurumurthy, Vijaya Mohan Guvva,
linux-scsi, linux-pci
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Anil Gurumurthy <agurumur@brocade.com>
Cc: Vijaya Mohan Guvva <vmohan@brocade.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/bfa/bfad.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 9b3e407..cd318f1 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1219,7 +1219,7 @@ bfad_install_msix_handler(struct bfad_s *bfad)
int
bfad_setup_intr(struct bfad_s *bfad)
{
- int error = 0;
+ int error;
u32 mask = 0, i, num_bit = 0, max_bit = 0;
struct msix_entry msix_entries[MAX_MSIX_ENTRY];
struct pci_dev *pdev = bfad->pcidev;
@@ -1279,20 +1279,18 @@ bfad_setup_intr(struct bfad_s *bfad)
bfad->bfad_flags |= BFAD_MSIX_ON;
- return error;
+ return 0;
}
line_based:
- error = 0;
- if (request_irq
- (bfad->pcidev->irq, (irq_handler_t) bfad_intx, BFAD_IRQ_FLAGS,
- BFAD_DRIVER_NAME, bfad) != 0) {
- /* Enable interrupt handler failed */
- return 1;
- }
+ error = request_irq(bfad->pcidev->irq, (irq_handler_t)bfad_intx,
+ BFAD_IRQ_FLAGS, BFAD_DRIVER_NAME, bfad);
+ if (error)
+ return error;
+
bfad->bfad_flags |= BFAD_INTX_ON;
- return error;
+ return 0;
}
void
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 04/22] bfa: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (2 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 03/22] bfa: Cleanup bfad_setup_intr() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 05/22] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
` (18 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Anil Gurumurthy, Vijaya Mohan Guvva,
linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Anil Gurumurthy <agurumur@brocade.com>
Cc: Vijaya Mohan Guvva <vmohan@brocade.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/bfa/bfad.c | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index cd318f1..ee7442e 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1234,27 +1234,19 @@ bfad_setup_intr(struct bfad_s *bfad)
if ((bfa_asic_id_ctc(pdev->device) && !msix_disable_ct) ||
(bfa_asic_id_cb(pdev->device) && !msix_disable_cb)) {
- error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec);
+ error = pci_enable_msix_range(bfad->pcidev, msix_entries,
+ bfad->nvec, bfad->nvec);
/* In CT1 & CT2, try to allocate just one vector */
- if (error > 0 && bfa_asic_id_ctc(pdev->device)) {
+ if (error == -ENOSPC && bfa_asic_id_ctc(pdev->device)) {
printk(KERN_WARNING "bfa %s: trying one msix "
"vector failed to allocate %d[%d]\n",
bfad->pci_name, bfad->nvec, error);
bfad->nvec = 1;
- error = pci_enable_msix(bfad->pcidev,
- msix_entries, bfad->nvec);
+ error = pci_enable_msix_range(bfad->pcidev,
+ msix_entries, 1, 1);
}
- /*
- * Only error number of vector is available.
- * We don't have a mechanism to map multiple
- * interrupts into one vector, so even if we
- * can try to request less vectors, we don't
- * know how to associate interrupt events to
- * vectors. Linux doesn't duplicate vectors
- * in the MSIX table for this case.
- */
- if (error) {
+ if (error < 0) {
printk(KERN_WARNING "bfad%d: "
"pci_enable_msix failed (%d), "
"use line based.\n",
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 05/22] csiostor: Remove superfluous call to pci_disable_msix()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (3 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 04/22] bfa: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 06/22] csiostor: Use pci_enable_msix_range() Alexander Gordeev
` (17 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Naresh Kumar Inna, Arvind Bhushan, linux-scsi,
linux-pci
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Naresh Kumar Inna <naresh@chelsio.com>
Cc: Arvind Bhushan <arvindb@chelsio.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/csiostor/csio_isr.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_isr.c b/drivers/scsi/csiostor/csio_isr.c
index 7ee9777..91ba91d 100644
--- a/drivers/scsi/csiostor/csio_isr.c
+++ b/drivers/scsi/csiostor/csio_isr.c
@@ -529,10 +529,8 @@ csio_enable_msix(struct csio_hw *hw)
csio_reduce_sqsets(hw, cnt - extra);
}
} else {
- if (rv > 0) {
- pci_disable_msix(hw->pdev);
+ if (rv > 0)
csio_info(hw, "Not using MSI-X, remainder:%d\n", rv);
- }
kfree(entries);
return -ENOMEM;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 06/22] csiostor: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (4 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 05/22] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 07/22] fnic: " Alexander Gordeev
` (16 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Naresh Kumar Inna, Arvind Bhushan, linux-scsi,
linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Naresh Kumar Inna <naresh@chelsio.com>
Cc: Arvind Bhushan <arvindb@chelsio.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/csiostor/csio_hw.h | 2 +-
drivers/scsi/csiostor/csio_isr.c | 24 ++++++++++--------------
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_hw.h b/drivers/scsi/csiostor/csio_hw.h
index 49b1daa..5db2d85 100644
--- a/drivers/scsi/csiostor/csio_hw.h
+++ b/drivers/scsi/csiostor/csio_hw.h
@@ -94,7 +94,7 @@ enum {
};
struct csio_msix_entries {
- unsigned short vector; /* Vector assigned by pci_enable_msix */
+ unsigned short vector; /* Assigned MSI-X vector */
void *dev_id; /* Priv object associated w/ this msix*/
char desc[24]; /* Description of this vector */
};
diff --git a/drivers/scsi/csiostor/csio_isr.c b/drivers/scsi/csiostor/csio_isr.c
index 91ba91d..06f283f 100644
--- a/drivers/scsi/csiostor/csio_isr.c
+++ b/drivers/scsi/csiostor/csio_isr.c
@@ -499,7 +499,7 @@ csio_reduce_sqsets(struct csio_hw *hw, int cnt)
static int
csio_enable_msix(struct csio_hw *hw)
{
- int rv, i, j, k, n, min, cnt;
+ int i, j, k, n, min, cnt;
struct csio_msix_entries *entryp;
struct msix_entry *entries;
int extra = CSIO_EXTRA_VECS;
@@ -521,19 +521,15 @@ csio_enable_msix(struct csio_hw *hw)
csio_dbg(hw, "FW supp #niq:%d, trying %d msix's\n", hw->cfg_niq, cnt);
- while ((rv = pci_enable_msix(hw->pdev, entries, cnt)) >= min)
- cnt = rv;
- if (!rv) {
- if (cnt < (hw->num_sqsets + extra)) {
- csio_dbg(hw, "Reducing sqsets to %d\n", cnt - extra);
- csio_reduce_sqsets(hw, cnt - extra);
- }
- } else {
- if (rv > 0)
- csio_info(hw, "Not using MSI-X, remainder:%d\n", rv);
-
+ cnt = pci_enable_msix_range(hw->pdev, entries, min, cnt);
+ if (cnt < 0) {
kfree(entries);
- return -ENOMEM;
+ return cnt;
+ }
+
+ if (cnt < (hw->num_sqsets + extra)) {
+ csio_dbg(hw, "Reducing sqsets to %d\n", cnt - extra);
+ csio_reduce_sqsets(hw, cnt - extra);
}
/* Save off vectors */
@@ -585,7 +581,7 @@ csio_intr_enable(struct csio_hw *hw)
}
}
- if ((csio_msi == 1) && !pci_enable_msi(hw->pdev))
+ if ((csio_msi == 1) && pci_enable_msi_range(hw->pdev, 1, 1) > 0)
hw->intr_mode = CSIO_IM_MSI;
else
hw->intr_mode = CSIO_IM_INTX;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 07/22] fnic: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (5 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 06/22] csiostor: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-11 5:00 ` Suma Ramars (sramars)
2014-02-04 11:16 ` [PATCH 08/22] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
` (15 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Hiral Patel, Suma Ramars, Brian Uchino,
linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Hiral Patel <hiralpat@cisco.com>
Cc: Suma Ramars <sramars@cisco.com>
Cc: Brian Uchino <buchino@cisco.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/fnic/fnic_isr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_isr.c b/drivers/scsi/fnic/fnic_isr.c
index 7d9b54a..0031c3e 100644
--- a/drivers/scsi/fnic/fnic_isr.c
+++ b/drivers/scsi/fnic/fnic_isr.c
@@ -257,8 +257,8 @@ int fnic_set_intr_mode(struct fnic *fnic)
fnic->raw_wq_count >= m &&
fnic->wq_copy_count >= o &&
fnic->cq_count >= n + m + o) {
- if (!pci_enable_msix(fnic->pdev, fnic->msix_entry,
- n + m + o + 1)) {
+ if (pci_enable_msix_range(fnic->pdev, fnic->msix_entry,
+ n + m + o + 1, n + m + o + 1) > 0) {
fnic->rq_count = n;
fnic->raw_wq_count = m;
fnic->wq_copy_count = o;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 08/22] hpsa: Fallback to MSI rather than to INTx if MSI-X failed
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (6 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 07/22] fnic: " Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 09/22] hpsa: Use pci_enable_msix_range() Alexander Gordeev
` (14 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Stephen M. Cameron, iss_storagedev,
linux-scsi, linux-pci
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: iss_storagedev@hp.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/hpsa.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 868318a..68eec7a 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4180,13 +4180,14 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
if (err > 0) {
dev_warn(&h->pdev->dev, "only %d MSI-X vectors "
"available\n", err);
- goto default_int_mode;
+ goto single_msi_mode;
} else {
dev_warn(&h->pdev->dev, "MSI-X init failed %d\n",
err);
- goto default_int_mode;
+ goto single_msi_mode;
}
}
+single_msi_mode:
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSI)) {
dev_info(&h->pdev->dev, "MSI\n");
if (!pci_enable_msi(h->pdev))
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 09/22] hpsa: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (7 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 08/22] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 10/22] isci: " Alexander Gordeev
` (13 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Stephen M. Cameron, iss_storagedev,
linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: iss_storagedev@hp.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/hpsa.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 68eec7a..3323628 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4169,23 +4169,17 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
goto default_int_mode;
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSIX)) {
dev_info(&h->pdev->dev, "MSIX\n");
- err = pci_enable_msix(h->pdev, hpsa_msix_entries,
- MAX_REPLY_QUEUES);
- if (!err) {
- for (i = 0; i < MAX_REPLY_QUEUES; i++)
- h->intr[i] = hpsa_msix_entries[i].vector;
- h->msix_vector = 1;
- return;
- }
- if (err > 0) {
- dev_warn(&h->pdev->dev, "only %d MSI-X vectors "
- "available\n", err);
- goto single_msi_mode;
- } else {
+ err = pci_enable_msix_range(h->pdev, hpsa_msix_entries,
+ MAX_REPLY_QUEUES, MAX_REPLY_QUEUES);
+ if (err < 0) {
dev_warn(&h->pdev->dev, "MSI-X init failed %d\n",
err);
goto single_msi_mode;
}
+ for (i = 0; i < MAX_REPLY_QUEUES; i++)
+ h->intr[i] = hpsa_msix_entries[i].vector;
+ h->msix_vector = 1;
+ return;
}
single_msi_mode:
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSI)) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 10/22] isci: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (8 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 09/22] hpsa: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-06 14:25 ` Dorau, Lukasz
2014-02-04 11:16 ` [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix() Alexander Gordeev
` (12 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Lukasz Dorau, Maciej Patelczyk, Dave Jiang,
intel-linux-scu, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Lukasz Dorau <lukasz.dorau@intel.com>
Cc: Maciej Patelczyk <maciej.patelczyk@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: intel-linux-scu@intel.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/isci/init.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index d25d0d8..b99f307 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -356,8 +356,9 @@ static int isci_setup_interrupts(struct pci_dev *pdev)
for (i = 0; i < num_msix; i++)
pci_info->msix_entries[i].entry = i;
- err = pci_enable_msix(pdev, pci_info->msix_entries, num_msix);
- if (err)
+ err = pci_enable_msix_range(pdev,
+ pci_info->msix_entries, num_msix, num_msix);
+ if (err < 0)
goto intx;
for (i = 0; i < num_msix; i++) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (9 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 10/22] isci: " Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-13 17:46 ` Alexander Gordeev
2014-02-20 15:16 ` James Smart
2014-02-04 11:16 ` [PATCH 12/22] lpfc: Use pci_enable_msix_range() Alexander Gordeev
` (11 subsequent siblings)
22 siblings, 2 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Gordeev, James Smart, linux-scsi, linux-pci
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: James Smart <james.smart@emulex.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/lpfc/lpfc_init.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 68c94cc..a9df97a 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8078,7 +8078,7 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
if (rc) {
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0420 PCI enable MSI-X failed (%d)\n", rc);
- goto msi_fail_out;
+ goto vec_fail_out;
}
for (i = 0; i < LPFC_MSIX_VECTORS; i++)
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
@@ -8156,6 +8156,8 @@ irq_fail_out:
msi_fail_out:
/* Unconfigure MSI-X capability structure */
pci_disable_msix(phba->pcidev);
+
+vec_fail_out:
return rc;
}
@@ -8644,7 +8646,7 @@ enable_msix_vectors:
} else if (rc) {
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0484 PCI enable MSI-X failed (%d)\n", rc);
- goto msi_fail_out;
+ goto vec_fail_out;
}
/* Log MSI-X vector assignment */
@@ -8696,9 +8698,10 @@ cfg_fail_out:
&phba->sli4_hba.fcp_eq_hdl[index]);
}
-msi_fail_out:
/* Unconfigure MSI-X capability structure */
pci_disable_msix(phba->pcidev);
+
+vec_fail_out:
return rc;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 12/22] lpfc: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (10 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 13/22] megaraid: " Alexander Gordeev
` (10 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Gordeev, James Smart, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: James Smart <james.smart@emulex.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/lpfc/lpfc_init.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index a9df97a..5bb40ca 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8187,8 +8187,8 @@ lpfc_sli_disable_msix(struct lpfc_hba *phba)
* @phba: pointer to lpfc hba data structure.
*
* This routine is invoked to enable the MSI interrupt mode to device with
- * SLI-3 interface spec. The kernel function pci_enable_msi() is called to
- * enable the MSI vector. The device driver is responsible for calling the
+ * SLI-3 interface spec. The kernel function pci_enable_msi_range() is called
+ * to enable the MSI vector. The device driver is responsible for calling the
* request_irq() to register MSI vector with a interrupt the handler, which
* is done in this function.
*
@@ -8201,8 +8201,8 @@ lpfc_sli_enable_msi(struct lpfc_hba *phba)
{
int rc;
- rc = pci_enable_msi(phba->pcidev);
- if (!rc)
+ rc = pci_enable_msi_range(phba->pcidev, 1, 1);
+ if (rc > 0)
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0462 PCI enable MSI mode success.\n");
else {
@@ -8636,17 +8636,14 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
phba->sli4_hba.msix_entries[index].entry = index;
/* Configure MSI-X capability structure */
- vectors = phba->cfg_fcp_io_channel;
-enable_msix_vectors:
- rc = pci_enable_msix(phba->pcidev, phba->sli4_hba.msix_entries,
- vectors);
- if (rc > 1) {
- vectors = rc;
- goto enable_msix_vectors;
- } else if (rc) {
+ rc = pci_enable_msix_range(phba->pcidev, phba->sli4_hba.msix_entries,
+ 2, phba->cfg_fcp_io_channel);
+ if (rc < 0) {
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0484 PCI enable MSI-X failed (%d)\n", rc);
goto vec_fail_out;
+ } else {
+ vectors = rc;
}
/* Log MSI-X vector assignment */
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 13/22] megaraid: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (11 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 12/22] lpfc: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:16 ` Alexander Gordeev
2014-02-07 11:17 ` Saxena, Sumit
2014-02-04 11:17 ` [PATCH 14/22] mpt2sas: " Alexander Gordeev
` (9 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Gordeev, Neela Syam Kolli, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/megaraid/megaraid_sas_base.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3b7ad10..90944f1 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3731,18 +3731,12 @@ static int megasas_init_fw(struct megasas_instance *instance)
(unsigned int)num_online_cpus());
for (i = 0; i < instance->msix_vectors; i++)
instance->msixentry[i].entry = i;
- i = pci_enable_msix(instance->pdev, instance->msixentry,
- instance->msix_vectors);
- if (i >= 0) {
- if (i) {
- if (!pci_enable_msix(instance->pdev,
- instance->msixentry, i))
- instance->msix_vectors = i;
- else
- instance->msix_vectors = 0;
- }
- } else
+ i = pci_enable_msix_range(instance->pdev, instance->msixentry,
+ 1, instance->msix_vectors);
+ if (i < 0)
instance->msix_vectors = 0;
+ else
+ instance->msix_vectors = i;
dev_info(&instance->pdev->dev, "[scsi%d]: FW supports"
"<%d> MSIX vector,Online CPUs: <%d>,"
@@ -4667,9 +4661,11 @@ megasas_resume(struct pci_dev *pdev)
goto fail_ready_state;
/* Now re-enable MSI-X */
- if (instance->msix_vectors)
- pci_enable_msix(instance->pdev, instance->msixentry,
- instance->msix_vectors);
+ if (instance->msix_vectors &&
+ pci_enable_msix_range(instance->pdev, instance->msixentry,
+ instance->msix_vectors,
+ instance->msix_vectors) < 0)
+ goto fail_reenable_msix;
switch (instance->pdev->device) {
case PCI_DEVICE_ID_LSI_FUSION:
@@ -4756,6 +4752,7 @@ fail_init_mfi:
fail_set_dma_mask:
fail_ready_state:
+fail_reenable_msix:
pci_disable_device(pdev);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 14/22] mpt2sas: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (12 preceding siblings ...)
2014-02-04 11:16 ` [PATCH 13/22] megaraid: " Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-13 17:47 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 15/22] mpt3sas: " Alexander Gordeev
` (8 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Nagalakshmi Nandigama, Sreekanth Reddy,
support, DL-MPTFusionLinux, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: support@lsi.com
Cc: DL-MPTFusionLinux@lsi.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/mpt2sas/mpt2sas_base.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 3901edc..a0662cb 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1432,10 +1432,13 @@ _base_enable_msix(struct MPT2SAS_ADAPTER *ioc)
for (i = 0, a = entries; i < ioc->reply_queue_count; i++, a++)
a->entry = i;
- r = pci_enable_msix(ioc->pdev, entries, ioc->reply_queue_count);
- if (r) {
- dfailprintk(ioc, printk(MPT2SAS_INFO_FMT "pci_enable_msix "
- "failed (r=%d) !!!\n", ioc->name, r));
+ r = pci_enable_msix_range(ioc->pdev,
+ entries,
+ ioc->reply_queue_count,
+ ioc->reply_queue_count);
+ if (r < 0) {
+ dfailprintk(ioc, printk(MPT2SAS_INFO_FMT
+ "pci_enable_msix_range failed (r=%d) !!!\n", ioc->name, r));
kfree(entries);
goto try_ioapic;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 15/22] mpt3sas: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (13 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 14/22] mpt2sas: " Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 16/22] pm8001: Fix invalid success return when request_irq() failed Alexander Gordeev
` (7 subsequent siblings)
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Nagalakshmi Nandigama, Sreekanth Reddy,
support, DL-MPTFusionLinux, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: support@lsi.com
Cc: DL-MPTFusionLinux@lsi.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index fa78506..46f1fba 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1747,10 +1747,13 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
for (i = 0, a = entries; i < ioc->reply_queue_count; i++, a++)
a->entry = i;
- r = pci_enable_msix(ioc->pdev, entries, ioc->reply_queue_count);
- if (r) {
+ r = pci_enable_msix_range(ioc->pdev,
+ entries,
+ ioc->reply_queue_count,
+ ioc->reply_queue_count);
+ if (r < 0) {
dfailprintk(ioc, pr_info(MPT3SAS_FMT
- "pci_enable_msix failed (r=%d) !!!\n",
+ "pci_enable_msix_range failed (r=%d) !!!\n",
ioc->name, r));
kfree(entries);
goto try_ioapic;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 16/22] pm8001: Fix invalid success return when request_irq() failed
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (14 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 15/22] mpt3sas: " Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-04 12:01 ` Jack Wang
2014-02-04 11:17 ` [PATCH 17/22] pm8001: Use pci_enable_msix_range() Alexander Gordeev
` (6 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, xjtuwjp, lindar_liu, linux-scsi, linux-pci
When enabling MSI-X if a call to request_irq() failed
pm8001_setup_msix() still returns success. This udate
fixes the described misbehaviour.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: xjtuwjp@gmail.com
Cc: lindar_liu@usish.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/pm8001/pm8001_init.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 73a120d..efffbb9 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -739,9 +739,10 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
pm8001_ha->irq_vector[i].irq_id = i;
pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
- if (request_irq(pm8001_ha->msix_entries[i].vector,
+ rc = request_irq(pm8001_ha->msix_entries[i].vector,
pm8001_interrupt_handler_msix, flag,
- intr_drvname[i], &(pm8001_ha->irq_vector[i]))) {
+ intr_drvname[i], &(pm8001_ha->irq_vector[i]));
+ if (rc) {
for (j = 0; j < i; j++)
free_irq(
pm8001_ha->msix_entries[j].vector,
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 17/22] pm8001: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (15 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 16/22] pm8001: Fix invalid success return when request_irq() failed Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-04 12:04 ` Jack Wang
2014-02-04 11:17 ` [PATCH 18/22] pmcraid: Get rid of a redundant assignment Alexander Gordeev
` (5 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, xjtuwjp, lindar_liu, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: xjtuwjp@gmail.com
Cc: lindar_liu@usish.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/pm8001/pm8001_init.c | 47 +++++++++++++++++++------------------
1 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index efffbb9..2d4b06e 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -724,34 +724,35 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
sizeof(pm8001_ha->msix_entries[0]);
for (i = 0; i < max_entry ; i++)
pm8001_ha->msix_entries[i].entry = i;
- rc = pci_enable_msix(pm8001_ha->pdev, pm8001_ha->msix_entries,
- number_of_intr);
+ rc = pci_enable_msix_range(pm8001_ha->pdev, pm8001_ha->msix_entries,
+ number_of_intr, number_of_intr);
pm8001_ha->number_of_intr = number_of_intr;
- if (!rc) {
- PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
- "pci_enable_msix request ret:%d no of intr %d\n",
- rc, pm8001_ha->number_of_intr));
-
-
- for (i = 0; i < number_of_intr; i++) {
- snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
- DRV_NAME"%d", i);
- pm8001_ha->irq_vector[i].irq_id = i;
- pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
-
- rc = request_irq(pm8001_ha->msix_entries[i].vector,
- pm8001_interrupt_handler_msix, flag,
- intr_drvname[i], &(pm8001_ha->irq_vector[i]));
- if (rc) {
- for (j = 0; j < i; j++)
- free_irq(
- pm8001_ha->msix_entries[j].vector,
+ if (rc < 0)
+ return rc;
+
+ PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
+ "pci_enable_msix request ret:%d no of intr %d\n",
+ rc, pm8001_ha->number_of_intr));
+
+ for (i = 0; i < number_of_intr; i++) {
+ snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
+ DRV_NAME"%d", i);
+ pm8001_ha->irq_vector[i].irq_id = i;
+ pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
+
+ rc = request_irq(pm8001_ha->msix_entries[i].vector,
+ pm8001_interrupt_handler_msix, flag,
+ intr_drvname[i], &(pm8001_ha->irq_vector[i]));
+ if (rc) {
+ for (j = 0; j < i; j++) {
+ free_irq(pm8001_ha->msix_entries[j].vector,
&(pm8001_ha->irq_vector[i]));
- pci_disable_msix(pm8001_ha->pdev);
- break;
}
+ pci_disable_msix(pm8001_ha->pdev);
+ break;
}
}
+
return rc;
}
#endif
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 18/22] pmcraid: Get rid of a redundant assignment
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (16 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 17/22] pm8001: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-13 17:49 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 19/22] pmcraid: Use pci_enable_msix_range() Alexander Gordeev
` (4 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Gordeev, Anil Ravindranath, linux-scsi, linux-pci
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/pmcraid.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index be8ce54..c06af7f 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4746,7 +4746,6 @@ pmcraid_isr_legacy:
pinstance->hrrq_vector[0].drv_inst = pinstance;
pinstance->hrrq_vector[0].vector = pdev->irq;
pinstance->num_hrrq = 1;
- rc = 0;
rc = request_irq(pdev->irq, pmcraid_isr, IRQF_SHARED,
PMCRAID_DRIVER_NAME, &pinstance->hrrq_vector[0]);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 19/22] pmcraid: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (17 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 18/22] pmcraid: Get rid of a redundant assignment Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-13 17:55 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 20/22] qla2xxx: " Alexander Gordeev
` (3 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Gordeev, Anil Ravindranath, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/pmcraid.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index c06af7f..6d0f208 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4698,19 +4698,10 @@ pmcraid_register_interrupt_handler(struct pmcraid_instance *pinstance)
for (i = 0; i < PMCRAID_NUM_MSIX_VECTORS; i++)
entries[i].entry = i;
- rc = pci_enable_msix(pdev, entries, num_hrrq);
- if (rc < 0)
+ num_hrrq = pci_enable_msix_range(pdev, entries, 1, num_hrrq);
+ if (num_hrrq < 0)
goto pmcraid_isr_legacy;
- /* Check how many MSIX vectors are allocated and register
- * msi-x handlers for each of them giving appropriate buffer
- */
- if (rc > 0) {
- num_hrrq = rc;
- if (pci_enable_msix(pdev, entries, num_hrrq))
- goto pmcraid_isr_legacy;
- }
-
for (i = 0; i < num_hrrq; i++) {
pinstance->hrrq_vector[i].hrrq_id = i;
pinstance->hrrq_vector[i].drv_inst = pinstance;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 20/22] qla2xxx: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (18 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 19/22] pmcraid: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-25 9:52 ` Saurav Kashyap
2014-02-04 11:17 ` [PATCH 21/22] qla4xxx: " Alexander Gordeev
` (2 subsequent siblings)
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Gordeev, qla2xxx-upstream, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Log message code 0x00c6 preserved, although it is reported
after successful call to pci_enable_msix_range(), not before
possibly unsuccessful call to pci_enable_msix(). Consumers
of the error code should not notice the difference.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: qla2xxx-upstream@qlogic.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/qla2xxx/qla_isr.c | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 9bc86b9..b2dcfa4 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2896,27 +2896,22 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
for (i = 0; i < ha->msix_count; i++)
entries[i].entry = i;
- ret = pci_enable_msix(ha->pdev, entries, ha->msix_count);
- if (ret) {
- if (ret < MIN_MSIX_COUNT)
- goto msix_failed;
-
+ ret = pci_enable_msix_range(ha->pdev,
+ entries, MIN_MSIX_COUNT, ha->msix_count);
+ if (ret < 0) {
+ ql_log(ql_log_fatal, vha, 0x00c7,
+ "MSI-X: Failed to enable support, "
+ "giving up -- %d/%d.\n",
+ ha->msix_count, ret);
+ goto msix_out;
+ } else if (ret < ha->msix_count) {
ql_log(ql_log_warn, vha, 0x00c6,
"MSI-X: Failed to enable support "
"-- %d/%d\n Retry with %d vectors.\n",
ha->msix_count, ret, ret);
- ha->msix_count = ret;
- ret = pci_enable_msix(ha->pdev, entries, ha->msix_count);
- if (ret) {
-msix_failed:
- ql_log(ql_log_fatal, vha, 0x00c7,
- "MSI-X: Failed to enable support, "
- "giving up -- %d/%d.\n",
- ha->msix_count, ret);
- goto msix_out;
- }
- ha->max_rsp_queues = ha->msix_count - 1;
}
+ ha->msix_count = ret;
+ ha->max_rsp_queues = ha->msix_count - 1;
ha->msix_entries = kzalloc(sizeof(struct qla_msix_entry) *
ha->msix_count, GFP_KERNEL);
if (!ha->msix_entries) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 21/22] qla4xxx: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (19 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 20/22] qla2xxx: " Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-13 17:54 ` Alexander Gordeev
2014-02-18 8:37 ` Vikas Chaudhary
2014-02-04 11:17 ` [PATCH 22/22] vmw_pvscsi: " Alexander Gordeev
2014-02-19 8:15 ` [PATCH 00/22] scsi: " Alexander Gordeev
22 siblings, 2 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Vikas Chaudhary, iscsi-driver, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Cc: iscsi-driver@qlogic.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/qla4xxx/ql4_nx.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index d001202..7f5412d 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -3805,8 +3805,9 @@ qla4_8xxx_enable_msix(struct scsi_qla_host *ha)
for (i = 0; i < QLA_MSIX_ENTRIES; i++)
entries[i].entry = qla4_8xxx_msix_entries[i].entry;
- ret = pci_enable_msix(ha->pdev, entries, ARRAY_SIZE(entries));
- if (ret) {
+ ret = pci_enable_msix_range(ha->pdev, entries,
+ ARRAY_SIZE(entries), ARRAY_SIZE(entries));
+ if (ret < 0) {
ql4_printk(KERN_WARNING, ha,
"MSI-X: Failed to enable support -- %d/%d\n",
QLA_MSIX_ENTRIES, ret);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 22/22] vmw_pvscsi: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (20 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 21/22] qla4xxx: " Alexander Gordeev
@ 2014-02-04 11:17 ` Alexander Gordeev
2014-02-04 21:47 ` Arvind Kumar
2014-02-19 8:15 ` [PATCH 00/22] scsi: " Alexander Gordeev
22 siblings, 1 reply; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-04 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Arvind Kumar, pv-drivers, linux-scsi, linux-pci
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Arvind Kumar <arvindkumar@vmware.com>
Cc: pv-drivers@vmware.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/vmw_pvscsi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index b9755ec..c521f8e 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -1078,8 +1078,8 @@ static int pvscsi_setup_msix(const struct pvscsi_adapter *adapter,
struct msix_entry entry = { 0, PVSCSI_VECTOR_COMPLETION };
int ret;
- ret = pci_enable_msix(adapter->dev, &entry, 1);
- if (ret)
+ ret = pci_enable_msix_range(adapter->dev, &entry, 1, 1);
+ if (ret < 0)
return ret;
*irq = entry.vector;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH 16/22] pm8001: Fix invalid success return when request_irq() failed
2014-02-04 11:17 ` [PATCH 16/22] pm8001: Fix invalid success return when request_irq() failed Alexander Gordeev
@ 2014-02-04 12:01 ` Jack Wang
0 siblings, 0 replies; 40+ messages in thread
From: Jack Wang @ 2014-02-04 12:01 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: linux-kernel, lindar_liu, linux-scsi, linux-pci
On 02/04/2014 12:17 PM, Alexander Gordeev wrote:
> When enabling MSI-X if a call to request_irq() failed
> pm8001_setup_msix() still returns success. This udate
> fixes the described misbehaviour.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Cc: xjtuwjp@gmail.com
> Cc: lindar_liu@usish.com
> Cc: linux-scsi@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> ---
> drivers/scsi/pm8001/pm8001_init.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
> index 73a120d..efffbb9 100644
> --- a/drivers/scsi/pm8001/pm8001_init.c
> +++ b/drivers/scsi/pm8001/pm8001_init.c
> @@ -739,9 +739,10 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
> pm8001_ha->irq_vector[i].irq_id = i;
> pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
>
> - if (request_irq(pm8001_ha->msix_entries[i].vector,
> + rc = request_irq(pm8001_ha->msix_entries[i].vector,
> pm8001_interrupt_handler_msix, flag,
> - intr_drvname[i], &(pm8001_ha->irq_vector[i]))) {
> + intr_drvname[i], &(pm8001_ha->irq_vector[i]));
> + if (rc) {
> for (j = 0; j < i; j++)
> free_irq(
> pm8001_ha->msix_entries[j].vector,
>
Thanks, looks fine.
Acked-by: Jack Wang <xjtuwjp@gmail.com>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 17/22] pm8001: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 17/22] pm8001: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-04 12:04 ` Jack Wang
0 siblings, 0 replies; 40+ messages in thread
From: Jack Wang @ 2014-02-04 12:04 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: linux-kernel, lindar_liu, linux-scsi, linux-pci
On 02/04/2014 12:17 PM, Alexander Gordeev wrote:
> 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() and pci_enable_msix_range()
> interfaces.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Cc: xjtuwjp@gmail.com
> Cc: lindar_liu@usish.com
> Cc: linux-scsi@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> ---
> drivers/scsi/pm8001/pm8001_init.c | 47 +++++++++++++++++++------------------
> 1 files changed, 24 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
> index efffbb9..2d4b06e 100644
> --- a/drivers/scsi/pm8001/pm8001_init.c
> +++ b/drivers/scsi/pm8001/pm8001_init.c
> @@ -724,34 +724,35 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
> sizeof(pm8001_ha->msix_entries[0]);
> for (i = 0; i < max_entry ; i++)
> pm8001_ha->msix_entries[i].entry = i;
> - rc = pci_enable_msix(pm8001_ha->pdev, pm8001_ha->msix_entries,
> - number_of_intr);
> + rc = pci_enable_msix_range(pm8001_ha->pdev, pm8001_ha->msix_entries,
> + number_of_intr, number_of_intr);
> pm8001_ha->number_of_intr = number_of_intr;
> - if (!rc) {
> - PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
> - "pci_enable_msix request ret:%d no of intr %d\n",
> - rc, pm8001_ha->number_of_intr));
> -
> -
> - for (i = 0; i < number_of_intr; i++) {
> - snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
> - DRV_NAME"%d", i);
> - pm8001_ha->irq_vector[i].irq_id = i;
> - pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
> -
> - rc = request_irq(pm8001_ha->msix_entries[i].vector,
> - pm8001_interrupt_handler_msix, flag,
> - intr_drvname[i], &(pm8001_ha->irq_vector[i]));
> - if (rc) {
> - for (j = 0; j < i; j++)
> - free_irq(
> - pm8001_ha->msix_entries[j].vector,
> + if (rc < 0)
> + return rc;
> +
> + PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
> + "pci_enable_msix request ret:%d no of intr %d\n",
> + rc, pm8001_ha->number_of_intr));
> +
> + for (i = 0; i < number_of_intr; i++) {
> + snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
> + DRV_NAME"%d", i);
> + pm8001_ha->irq_vector[i].irq_id = i;
> + pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
> +
> + rc = request_irq(pm8001_ha->msix_entries[i].vector,
> + pm8001_interrupt_handler_msix, flag,
> + intr_drvname[i], &(pm8001_ha->irq_vector[i]));
> + if (rc) {
> + for (j = 0; j < i; j++) {
> + free_irq(pm8001_ha->msix_entries[j].vector,
> &(pm8001_ha->irq_vector[i]));
> - pci_disable_msix(pm8001_ha->pdev);
> - break;
> }
> + pci_disable_msix(pm8001_ha->pdev);
> + break;
> }
> }
> +
> return rc;
> }
> #endif
>
Thanks, looks fine.
Acked-by: Jack Wang <xjtuwjp@gmail.com>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] vmw_pvscsi: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 22/22] vmw_pvscsi: " Alexander Gordeev
@ 2014-02-04 21:47 ` Arvind Kumar
0 siblings, 0 replies; 40+ messages in thread
From: Arvind Kumar @ 2014-02-04 21:47 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: linux-kernel, pv-drivers, linux-scsi, linux-pci
Looks fine to me.
Acked-by: Arvind Kumar <arvindkumar@vmware.com>
Thanks!
Arvind
----- Original Message -----
From: "Alexander Gordeev" <agordeev@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Alexander Gordeev" <agordeev@redhat.com>, "Arvind Kumar" <arvindkumar@vmware.com>, pv-drivers@vmware.com, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org
Sent: Tuesday, February 4, 2014 3:17:08 AM
Subject: [PATCH 22/22] vmw_pvscsi: Use pci_enable_msix_range()
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() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Arvind Kumar <arvindkumar@vmware.com>
Cc: pv-drivers@vmware.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/vmw_pvscsi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index b9755ec..c521f8e 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -1078,8 +1078,8 @@ static int pvscsi_setup_msix(const struct pvscsi_adapter *adapter,
struct msix_entry entry = { 0, PVSCSI_VECTOR_COMPLETION };
int ret;
- ret = pci_enable_msix(adapter->dev, &entry, 1);
- if (ret)
+ ret = pci_enable_msix_range(adapter->dev, &entry, 1, 1);
+ if (ret < 0)
return ret;
*irq = entry.vector;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 40+ messages in thread
* RE: [PATCH 01/22] be2iscsi: Use pci_enable_msix_range()
2014-02-04 11:16 ` [PATCH 01/22] be2iscsi: " Alexander Gordeev
@ 2014-02-05 4:58 ` Jayamohan Kallickal
0 siblings, 0 replies; 40+ messages in thread
From: Jayamohan Kallickal @ 2014-02-05 4:58 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel; +Cc: linux-scsi, linux-pci
-----Original Message-----
From: Alexander Gordeev [mailto:agordeev@redhat.com]
Sent: Tuesday, February 04, 2014 3:17 AM
To: linux-kernel@vger.kernel.org
Cc: Alexander Gordeev; Jayamohan Kallickal; linux-scsi@vger.kernel.org; linux-pci@vger.kernel.org
Subject: [PATCH 01/22] be2iscsi: Use pci_enable_msix_range()
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() and pci_enable_msix_range() interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/scsi/be2iscsi/be_main.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 1f37505..5878f3e 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -5284,9 +5284,9 @@ static void beiscsi_msix_enable(struct beiscsi_hba *phba)
for (i = 0; i <= phba->num_cpus; i++)
phba->msix_entries[i].entry = i;
- status = pci_enable_msix(phba->pcidev, phba->msix_entries,
- (phba->num_cpus + 1));
- if (!status)
+ status = pci_enable_msix_range(phba->pcidev, phba->msix_entries,
+ phba->num_cpus + 1, phba->num_cpus + 1);
+ if (status > 0)
phba->msix_enabled = true;
return;
Looks OK to me
Acked-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
--
^ permalink raw reply [flat|nested] 40+ messages in thread
* RE: [PATCH 10/22] isci: Use pci_enable_msix_range()
2014-02-04 11:16 ` [PATCH 10/22] isci: " Alexander Gordeev
@ 2014-02-06 14:25 ` Dorau, Lukasz
0 siblings, 0 replies; 40+ messages in thread
From: Dorau, Lukasz @ 2014-02-06 14:25 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel
Cc: Patelczyk, Maciej, Jiang, Dave, intel-linux-scu, linux-scsi,
linux-pci, Paszkiewicz, Artur
On Tuesday, February 04, 2014 12:17 PM Alexander Gordeev <agordeev@redhat.com> wrote:
> 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() and pci_enable_msix_range()
> interfaces.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Cc: Lukasz Dorau <lukasz.dorau@intel.com>
> Cc: Maciej Patelczyk <maciej.patelczyk@intel.com>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: intel-linux-scu@intel.com
> Cc: linux-scsi@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> ---
> drivers/scsi/isci/init.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
> index d25d0d8..b99f307 100644
> --- a/drivers/scsi/isci/init.c
> +++ b/drivers/scsi/isci/init.c
> @@ -356,8 +356,9 @@ static int isci_setup_interrupts(struct pci_dev *pdev)
> for (i = 0; i < num_msix; i++)
> pci_info->msix_entries[i].entry = i;
>
> - err = pci_enable_msix(pdev, pci_info->msix_entries, num_msix);
> - if (err)
> + err = pci_enable_msix_range(pdev,
> + pci_info->msix_entries, num_msix, num_msix);
> + if (err < 0)
> goto intx;
>
> for (i = 0; i < num_msix; i++) {
> --
> 1.7.7.6
Looks fine.
Acked-by: Lukasz Dorau <lukasz.dorau@intel.com>
Thanks,
Lukasz
^ permalink raw reply [flat|nested] 40+ messages in thread
* RE: [PATCH 13/22] megaraid: Use pci_enable_msix_range()
2014-02-04 11:16 ` [PATCH 13/22] megaraid: " Alexander Gordeev
@ 2014-02-07 11:17 ` Saxena, Sumit
0 siblings, 0 replies; 40+ messages in thread
From: Saxena, Sumit @ 2014-02-07 11:17 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel; +Cc: DL-MegaRAID Linux, linux-scsi, linux-pci
>-----Original Message-----
>From: Alexander Gordeev [mailto:agordeev@redhat.com]
>Sent: Tuesday, February 04, 2014 4:47 PM
>To: linux-kernel@vger.kernel.org
>Cc: Alexander Gordeev; DL-MegaRAID Linux; linux-scsi@vger.kernel.org;
>linux-pci@vger.kernel.org
>Subject: [PATCH 13/22] megaraid: Use pci_enable_msix_range()
>
>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() and
>pci_enable_msix_range() interfaces.
>
>Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
>Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
>Cc: linux-scsi@vger.kernel.org
>Cc: linux-pci@vger.kernel.org
>---
> drivers/scsi/megaraid/megaraid_sas_base.c | 25 +++++++++++--------------
> 1 files changed, 11 insertions(+), 14 deletions(-)
>
>diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
>b/drivers/scsi/megaraid/megaraid_sas_base.c
>index 3b7ad10..90944f1 100644
>--- a/drivers/scsi/megaraid/megaraid_sas_base.c
>+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
>@@ -3731,18 +3731,12 @@ static int megasas_init_fw(struct
>megasas_instance *instance)
> (unsigned int)num_online_cpus());
> for (i = 0; i < instance->msix_vectors; i++)
> instance->msixentry[i].entry = i;
>- i = pci_enable_msix(instance->pdev, instance->msixentry,
>- instance->msix_vectors);
>- if (i >= 0) {
>- if (i) {
>- if (!pci_enable_msix(instance->pdev,
>- instance->msixentry, i))
>- instance->msix_vectors = i;
>- else
>- instance->msix_vectors = 0;
>- }
>- } else
>+ i = pci_enable_msix_range(instance->pdev, instance-
>>msixentry,
>+ 1, instance->msix_vectors);
>+ if (i < 0)
> instance->msix_vectors = 0;
>+ else
>+ instance->msix_vectors = i;
>
> dev_info(&instance->pdev->dev, "[scsi%d]: FW supports"
> "<%d> MSIX vector,Online CPUs: <%d>,"
>@@ -4667,9 +4661,11 @@ megasas_resume(struct pci_dev *pdev)
> goto fail_ready_state;
>
> /* Now re-enable MSI-X */
>- if (instance->msix_vectors)
>- pci_enable_msix(instance->pdev, instance->msixentry,
>- instance->msix_vectors);
>+ if (instance->msix_vectors &&
>+ pci_enable_msix_range(instance->pdev, instance->msixentry,
>+ instance->msix_vectors,
>+ instance->msix_vectors) < 0)
>+ goto fail_reenable_msix;
>
> switch (instance->pdev->device) {
> case PCI_DEVICE_ID_LSI_FUSION:
>@@ -4756,6 +4752,7 @@ fail_init_mfi:
>
> fail_set_dma_mask:
> fail_ready_state:
>+fail_reenable_msix:
>
> pci_disable_device(pdev);
Acked-by: Sumit Saxena <sumit.saxena@lsi.com>
Sumit
>
>--
>1.7.7.6
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/22] fnic: Use pci_enable_msix_range()
2014-02-04 11:16 ` [PATCH 07/22] fnic: " Alexander Gordeev
@ 2014-02-11 5:00 ` Suma Ramars (sramars)
0 siblings, 0 replies; 40+ messages in thread
From: Suma Ramars (sramars) @ 2014-02-11 5:00 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel
Cc: Brian Uchino (buchino), linux-scsi, linux-pci
Hi Alexander
The changes look good to me. Thanks for taking care of this
-Suma
On 04/02/14 4:46 PM, "Alexander Gordeev" <agordeev@redhat.com> wrote:
>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() and pci_enable_msix_range()
>interfaces.
>
>Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
>Cc: Hiral Patel <hiralpat@cisco.com>
>Cc: Suma Ramars <sramars@cisco.com>
>Cc: Brian Uchino <buchino@cisco.com>
>Cc: linux-scsi@vger.kernel.org
>Cc: linux-pci@vger.kernel.org
>---
> drivers/scsi/fnic/fnic_isr.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/scsi/fnic/fnic_isr.c b/drivers/scsi/fnic/fnic_isr.c
>index 7d9b54a..0031c3e 100644
>--- a/drivers/scsi/fnic/fnic_isr.c
>+++ b/drivers/scsi/fnic/fnic_isr.c
>@@ -257,8 +257,8 @@ int fnic_set_intr_mode(struct fnic *fnic)
> fnic->raw_wq_count >= m &&
> fnic->wq_copy_count >= o &&
> fnic->cq_count >= n + m + o) {
>- if (!pci_enable_msix(fnic->pdev, fnic->msix_entry,
>- n + m + o + 1)) {
>+ if (pci_enable_msix_range(fnic->pdev, fnic->msix_entry,
>+ n + m + o + 1, n + m + o + 1) > 0) {
> fnic->rq_count = n;
> fnic->raw_wq_count = m;
> fnic->wq_copy_count = o;
>--
>1.7.7.6
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 02/22] bfa: Do not call pci_enable_msix() once it failed
2014-02-04 11:16 ` [PATCH 02/22] bfa: Do not call pci_enable_msix() once it failed Alexander Gordeev
@ 2014-02-13 17:39 ` Alexander Gordeev
0 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-13 17:39 UTC (permalink / raw)
To: linux-kernel; +Cc: Anil Gurumurthy, Vijaya Mohan Guvva, linux-scsi, linux-pci
On Tue, Feb 04, 2014 at 12:16:48PM +0100, Alexander Gordeev wrote:
> Function pci_enable_msix() should not be called again in
> case it threw a negative errno.
Anil, Vijaya,
Any feedback on bfa patches?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix()
2014-02-04 11:16 ` [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix() Alexander Gordeev
@ 2014-02-13 17:46 ` Alexander Gordeev
2014-02-20 15:16 ` James Smart
1 sibling, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-13 17:46 UTC (permalink / raw)
To: James Smart; +Cc: linux-scsi, linux-pci, linux-kernel
On Tue, Feb 04, 2014 at 12:16:57PM +0100, Alexander Gordeev wrote:
Hi James,
Any feedback?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 14/22] mpt2sas: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 14/22] mpt2sas: " Alexander Gordeev
@ 2014-02-13 17:47 ` Alexander Gordeev
0 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-13 17:47 UTC (permalink / raw)
To: linux-kernel
Cc: Nagalakshmi Nandigama, Sreekanth Reddy, support,
DL-MPTFusionLinux, linux-scsi, linux-pci
On Tue, Feb 04, 2014 at 12:17:00PM +0100, Alexander Gordeev wrote:
> 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() and pci_enable_msix_range()
> interfaces.
Nagalakshmi, Sreekanth,
Any feedback?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 18/22] pmcraid: Get rid of a redundant assignment
2014-02-04 11:17 ` [PATCH 18/22] pmcraid: Get rid of a redundant assignment Alexander Gordeev
@ 2014-02-13 17:49 ` Alexander Gordeev
0 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-13 17:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Anil Ravindranath, linux-scsi, linux-pci
On Tue, Feb 04, 2014 at 12:17:04PM +0100, Alexander Gordeev wrote:
Anil,
Any feedback?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 21/22] qla4xxx: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 21/22] qla4xxx: " Alexander Gordeev
@ 2014-02-13 17:54 ` Alexander Gordeev
2014-02-18 8:37 ` Vikas Chaudhary
1 sibling, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-13 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Vikas Chaudhary, iscsi-driver, linux-scsi, linux-pci
On Tue, Feb 04, 2014 at 12:17:07PM +0100, Alexander Gordeev wrote:
> 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() and pci_enable_msix_range()
> interfaces.
Hi Vikas,
Any feedback on this?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 19/22] pmcraid: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 19/22] pmcraid: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-02-13 17:55 ` Alexander Gordeev
0 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-13 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Anil Ravindranath, linux-scsi, linux-pci
On Tue, Feb 04, 2014 at 12:17:05PM +0100, Alexander Gordeev wrote:
> 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() and pci_enable_msix_range()
> interfaces.
Hi Anil,
Any feedback?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 21/22] qla4xxx: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 21/22] qla4xxx: " Alexander Gordeev
2014-02-13 17:54 ` Alexander Gordeev
@ 2014-02-18 8:37 ` Vikas Chaudhary
1 sibling, 0 replies; 40+ messages in thread
From: Vikas Chaudhary @ 2014-02-18 8:37 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel
Cc: Dept-Eng iSCSI Driver, linux-scsi, linux-pci
On 04/02/14 3:17 AM, "Alexander Gordeev" <agordeev@redhat.com> wrote:
>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() and pci_enable_msix_range()
>interfaces.
>
>Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
>Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
>Cc: iscsi-driver@qlogic.com
>Cc: linux-scsi@vger.kernel.org
>Cc: linux-pci@vger.kernel.org
>---
> drivers/scsi/qla4xxx/ql4_nx.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
>index d001202..7f5412d 100644
>--- a/drivers/scsi/qla4xxx/ql4_nx.c
>+++ b/drivers/scsi/qla4xxx/ql4_nx.c
>@@ -3805,8 +3805,9 @@ qla4_8xxx_enable_msix(struct scsi_qla_host *ha)
> for (i = 0; i < QLA_MSIX_ENTRIES; i++)
> entries[i].entry = qla4_8xxx_msix_entries[i].entry;
>
>- ret = pci_enable_msix(ha->pdev, entries, ARRAY_SIZE(entries));
>- if (ret) {
>+ ret = pci_enable_msix_range(ha->pdev, entries,
>+ ARRAY_SIZE(entries), ARRAY_SIZE(entries));
>+ if (ret < 0) {
> ql4_printk(KERN_WARNING, ha,
> "MSI-X: Failed to enable support -- %d/%d\n",
> QLA_MSIX_ENTRIES, ret);
Looks good to me.
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 00/22] scsi: Use pci_enable_msix_range()
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
` (21 preceding siblings ...)
2014-02-04 11:17 ` [PATCH 22/22] vmw_pvscsi: " Alexander Gordeev
@ 2014-02-19 8:15 ` Alexander Gordeev
22 siblings, 0 replies; 40+ messages in thread
From: Alexander Gordeev @ 2014-02-19 8:15 UTC (permalink / raw)
To: linux-kernel, James Bottomley
Cc: pv-drivers, iscsi-driver, qla2xxx-upstream, support,
DL-MPTFusionLinux, intel-linux-scu, iss_storagedev, linux-scsi,
linux-pci
On Tue, Feb 04, 2014 at 12:16:46PM +0100, Alexander Gordeev wrote:
> 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() and pci_enable_msix_range()
> interfaces.
Hi James,
What is the process to get these patches accepted to scsi.git tree?
Should I make some extra effort besides just posting the series this way?
Thanks!
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix()
2014-02-04 11:16 ` [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix() Alexander Gordeev
2014-02-13 17:46 ` Alexander Gordeev
@ 2014-02-20 15:16 ` James Smart
1 sibling, 0 replies; 40+ messages in thread
From: James Smart @ 2014-02-20 15:16 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: linux-kernel, linux-scsi, linux-pci
Hi Alexander,
The change is fine - but not really necessary. The pci_disable_msix()
call explicitly checks for enablement so it's safe.
It really is a superfluous change - but if James wants to take it:
Acked-by: James Smart <james.smart@emulex.com>
-- james s
On 2/4/2014 6:16 AM, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Cc: James Smart <james.smart@emulex.com>
> Cc: linux-scsi@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> ---
> drivers/scsi/lpfc/lpfc_init.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index 68c94cc..a9df97a 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -8078,7 +8078,7 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
> if (rc) {
> lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
> "0420 PCI enable MSI-X failed (%d)\n", rc);
> - goto msi_fail_out;
> + goto vec_fail_out;
> }
> for (i = 0; i < LPFC_MSIX_VECTORS; i++)
> lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
> @@ -8156,6 +8156,8 @@ irq_fail_out:
> msi_fail_out:
> /* Unconfigure MSI-X capability structure */
> pci_disable_msix(phba->pcidev);
> +
> +vec_fail_out:
> return rc;
> }
>
> @@ -8644,7 +8646,7 @@ enable_msix_vectors:
> } else if (rc) {
> lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
> "0484 PCI enable MSI-X failed (%d)\n", rc);
> - goto msi_fail_out;
> + goto vec_fail_out;
> }
>
> /* Log MSI-X vector assignment */
> @@ -8696,9 +8698,10 @@ cfg_fail_out:
> &phba->sli4_hba.fcp_eq_hdl[index]);
> }
>
> -msi_fail_out:
> /* Unconfigure MSI-X capability structure */
> pci_disable_msix(phba->pcidev);
> +
> +vec_fail_out:
> return rc;
> }
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 20/22] qla2xxx: Use pci_enable_msix_range()
2014-02-04 11:17 ` [PATCH 20/22] qla2xxx: " Alexander Gordeev
@ 2014-02-25 9:52 ` Saurav Kashyap
0 siblings, 0 replies; 40+ messages in thread
From: Saurav Kashyap @ 2014-02-25 9:52 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel
Cc: Dept-Eng QLA2xxx Upstream, linux-scsi, linux-pci
Looks good to me.
Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
>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() and pci_enable_msix_range()
>interfaces.
>
>Log message code 0x00c6 preserved, although it is reported
>after successful call to pci_enable_msix_range(), not before
>possibly unsuccessful call to pci_enable_msix(). Consumers
>of the error code should not notice the difference.
>
>Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
>Cc: qla2xxx-upstream@qlogic.com
>Cc: linux-scsi@vger.kernel.org
>Cc: linux-pci@vger.kernel.org
>---
> drivers/scsi/qla2xxx/qla_isr.c | 27 +++++++++++----------------
> 1 files changed, 11 insertions(+), 16 deletions(-)
>
>diff --git a/drivers/scsi/qla2xxx/qla_isr.c
>b/drivers/scsi/qla2xxx/qla_isr.c
>index 9bc86b9..b2dcfa4 100644
>--- a/drivers/scsi/qla2xxx/qla_isr.c
>+++ b/drivers/scsi/qla2xxx/qla_isr.c
>@@ -2896,27 +2896,22 @@ qla24xx_enable_msix(struct qla_hw_data *ha,
>struct rsp_que *rsp)
> for (i = 0; i < ha->msix_count; i++)
> entries[i].entry = i;
>
>- ret = pci_enable_msix(ha->pdev, entries, ha->msix_count);
>- if (ret) {
>- if (ret < MIN_MSIX_COUNT)
>- goto msix_failed;
>-
>+ ret = pci_enable_msix_range(ha->pdev,
>+ entries, MIN_MSIX_COUNT, ha->msix_count);
>+ if (ret < 0) {
>+ ql_log(ql_log_fatal, vha, 0x00c7,
>+ "MSI-X: Failed to enable support, "
>+ "giving up -- %d/%d.\n",
>+ ha->msix_count, ret);
>+ goto msix_out;
>+ } else if (ret < ha->msix_count) {
> ql_log(ql_log_warn, vha, 0x00c6,
> "MSI-X: Failed to enable support "
> "-- %d/%d\n Retry with %d vectors.\n",
> ha->msix_count, ret, ret);
>- ha->msix_count = ret;
>- ret = pci_enable_msix(ha->pdev, entries, ha->msix_count);
>- if (ret) {
>-msix_failed:
>- ql_log(ql_log_fatal, vha, 0x00c7,
>- "MSI-X: Failed to enable support, "
>- "giving up -- %d/%d.\n",
>- ha->msix_count, ret);
>- goto msix_out;
>- }
>- ha->max_rsp_queues = ha->msix_count - 1;
> }
>+ ha->msix_count = ret;
>+ ha->max_rsp_queues = ha->msix_count - 1;
> ha->msix_entries = kzalloc(sizeof(struct qla_msix_entry) *
> ha->msix_count, GFP_KERNEL);
> if (!ha->msix_entries) {
>--
>1.7.7.6
>
^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2014-02-25 9:52 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 11:16 [PATCH 00/22] scsi: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 01/22] be2iscsi: " Alexander Gordeev
2014-02-05 4:58 ` Jayamohan Kallickal
2014-02-04 11:16 ` [PATCH 02/22] bfa: Do not call pci_enable_msix() once it failed Alexander Gordeev
2014-02-13 17:39 ` Alexander Gordeev
2014-02-04 11:16 ` [PATCH 03/22] bfa: Cleanup bfad_setup_intr() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 04/22] bfa: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 05/22] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 06/22] csiostor: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 07/22] fnic: " Alexander Gordeev
2014-02-11 5:00 ` Suma Ramars (sramars)
2014-02-04 11:16 ` [PATCH 08/22] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
2014-02-04 11:16 ` [PATCH 09/22] hpsa: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 10/22] isci: " Alexander Gordeev
2014-02-06 14:25 ` Dorau, Lukasz
2014-02-04 11:16 ` [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix() Alexander Gordeev
2014-02-13 17:46 ` Alexander Gordeev
2014-02-20 15:16 ` James Smart
2014-02-04 11:16 ` [PATCH 12/22] lpfc: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 11:16 ` [PATCH 13/22] megaraid: " Alexander Gordeev
2014-02-07 11:17 ` Saxena, Sumit
2014-02-04 11:17 ` [PATCH 14/22] mpt2sas: " Alexander Gordeev
2014-02-13 17:47 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 15/22] mpt3sas: " Alexander Gordeev
2014-02-04 11:17 ` [PATCH 16/22] pm8001: Fix invalid success return when request_irq() failed Alexander Gordeev
2014-02-04 12:01 ` Jack Wang
2014-02-04 11:17 ` [PATCH 17/22] pm8001: Use pci_enable_msix_range() Alexander Gordeev
2014-02-04 12:04 ` Jack Wang
2014-02-04 11:17 ` [PATCH 18/22] pmcraid: Get rid of a redundant assignment Alexander Gordeev
2014-02-13 17:49 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 19/22] pmcraid: Use pci_enable_msix_range() Alexander Gordeev
2014-02-13 17:55 ` Alexander Gordeev
2014-02-04 11:17 ` [PATCH 20/22] qla2xxx: " Alexander Gordeev
2014-02-25 9:52 ` Saurav Kashyap
2014-02-04 11:17 ` [PATCH 21/22] qla4xxx: " Alexander Gordeev
2014-02-13 17:54 ` Alexander Gordeev
2014-02-18 8:37 ` Vikas Chaudhary
2014-02-04 11:17 ` [PATCH 22/22] vmw_pvscsi: " Alexander Gordeev
2014-02-04 21:47 ` Arvind Kumar
2014-02-19 8:15 ` [PATCH 00/22] scsi: " Alexander Gordeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).