linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()
@ 2014-08-18  6:01 Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 01/13] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
                   ` (13 more replies)
  0 siblings, 14 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Gordeev, Anil Ravindranath, James Smart,
	Naresh Kumar Inna, Arvind Bhushan, Jayamohan Kallickal,
	Chad Dupuis, Tomas Henzl, Nagalakshmi Nandigama, Sreekanth Reddy,
	Kashyap Desai, Neela Syam Kolli, Stephen M. Cameron,
	iss_storagedev, support, DL-MPTFusionLinux, qla2xxx-upstream,
	linux-scsi, linux-pci

Hello,

This series is against 3.17-rc1. Patches 0-7 have been acked.
Patches 8-13 still need reviews and are resent without changes
except 'lpfc' which concerns latest James comments.

Thanks!

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.

Cc: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: James Smart <james.smart@emulex.com>
Cc: Naresh Kumar Inna <naresh@chelsio.com>
Cc: Arvind Bhushan <arvindb@chelsio.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Cc: Chad Dupuis <chad.dupuis@qlogic.com>
Cc: Tomas Henzl <thenzl@redhat.com>
Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: Kashyap Desai <Kashyap.desai@avagotech.com>
Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: iss_storagedev@hp.com
Cc: support@lsi.com
Cc: DL-MPTFusionLinux@lsi.com
Cc: qla2xxx-upstream@qlogic.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-pci@vger.kernel.org

Alexander Gordeev (13):
  hpsa: Fallback to MSI rather than to INTx if MSI-X failed
  hpsa: Use pci_enable_msix_range() instead of pci_enable_msix()
  megaraid: Fail resume if MSI-X re-initialization failed
  megaraid: Use pci_enable_msix_range() instead of pci_enable_msix()
  mpt2sas: Use pci_enable_msix_exact() instead of pci_enable_msix()
  mpt3sas: Use pci_enable_msix_exact() instead of pci_enable_msix()
  qla2xxx: Use pci_enable_msix_range() instead of pci_enable_msix()
  be2iscsi: Use pci_enable_msix_range()
  csiostor: Remove superfluous call to pci_disable_msix()
  csiostor: Use pci_enable_msix_range() instead of pci_enable_msix()
  lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  pmcraid: Get rid of a redundant assignment
  pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix()

 drivers/scsi/be2iscsi/be_main.c           |  6 ++---
 drivers/scsi/csiostor/csio_hw.h           |  2 +-
 drivers/scsi/csiostor/csio_isr.c          | 24 +++++++------------
 drivers/scsi/hpsa.c                       | 28 ++++++++++------------
 drivers/scsi/lpfc/lpfc_init.c             | 39 ++++++++++++++-----------------
 drivers/scsi/megaraid/megaraid_sas_base.c | 24 ++++++++-----------
 drivers/scsi/mpt2sas/mpt2sas_base.c       |  6 ++---
 drivers/scsi/mpt3sas/mpt3sas_base.c       |  4 ++--
 drivers/scsi/pmcraid.c                    | 14 ++---------
 drivers/scsi/qla2xxx/qla_isr.c            | 27 +++++++++------------
 10 files changed, 70 insertions(+), 104 deletions(-)

-- 
1.9.3


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 01/13] hpsa: Fallback to MSI rather than to INTx if MSI-X failed
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 02/13] hpsa: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Gordeev, iss_storagedev, linux-scsi, linux-pci

Currently the driver falls back to INTx mode when MSI-X
initialization failed. This is a suboptimal behaviour
for chips that also support MSI. This update changes that
behaviour and falls back to MSI mode in case MSI-X mode
initialization failed.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: "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 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 6b35d0d..a9c4c9f 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6176,7 +6176,6 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
 			dev_warn(&h->pdev->dev, "MSI-X init failed %d\n",
 			       err);
 			h->msix_vector = 0;
-			goto default_int_mode;
 		}
 	}
 	if (pci_find_capability(h->pdev, PCI_CAP_ID_MSI)) {
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 02/13] hpsa: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 01/13] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 03/13] megaraid: Fail resume if MSI-X re-initialization failed Alexander Gordeev
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Gordeev, 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()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: "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 | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a9c4c9f..8c17c43 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6159,25 +6159,22 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
 		h->msix_vector = MAX_REPLY_QUEUES;
 		if (h->msix_vector > num_online_cpus())
 			h->msix_vector = num_online_cpus();
-		err = pci_enable_msix(h->pdev, hpsa_msix_entries,
-				      h->msix_vector);
-		if (err > 0) {
+		err = pci_enable_msix_range(h->pdev, hpsa_msix_entries,
+					    1, h->msix_vector);
+		if (err < 0) {
+			dev_warn(&h->pdev->dev, "MSI-X init failed %d\n", err);
+			h->msix_vector = 0;
+			goto single_msi_mode;
+		} else if (err < h->msix_vector) {
 			dev_warn(&h->pdev->dev, "only %d MSI-X vectors "
 			       "available\n", err);
-			h->msix_vector = err;
-			err = pci_enable_msix(h->pdev, hpsa_msix_entries,
-					      h->msix_vector);
-		}
-		if (!err) {
-			for (i = 0; i < h->msix_vector; i++)
-				h->intr[i] = hpsa_msix_entries[i].vector;
-			return;
-		} else {
-			dev_warn(&h->pdev->dev, "MSI-X init failed %d\n",
-			       err);
-			h->msix_vector = 0;
 		}
+		h->msix_vector = err;
+		for (i = 0; i < h->msix_vector; i++)
+			h->intr[i] = hpsa_msix_entries[i].vector;
+		return;
 	}
+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.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 03/13] megaraid: Fail resume if MSI-X re-initialization failed
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 01/13] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 02/13] hpsa: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 04/13] megaraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Gordeev, Neela Syam Kolli, linux-scsi, linux-pci

Currently the driver fails to analize MSI-X re-enablement
status on resuming and always assumes the success. This
update checks the MSI-X initialization result and fails
to resume if MSI-Xs re-enablement failed.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Kashyap Desai <Kashyap.desai@avagotech.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 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 22a04e3..e4ffae5 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5132,9 +5132,10 @@ 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(instance->pdev, instance->msixentry,
+			    instance->msix_vectors))
+		goto fail_reenable_msix;
 
 	switch (instance->pdev->device) {
 	case PCI_DEVICE_ID_LSI_FUSION:
@@ -5243,6 +5244,7 @@ fail_init_mfi:
 
 fail_set_dma_mask:
 fail_ready_state:
+fail_reenable_msix:
 
 	pci_disable_device(pdev);
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 04/13] megaraid: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (2 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 03/13] megaraid: Fail resume if MSI-X re-initialization failed Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 05/13] mpt2sas: Use pci_enable_msix_exact() " Alexander Gordeev
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Kashyap Desai <Kashyap.desai@avagotech.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 | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index e4ffae5..a2f4d4f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4103,17 +4103,11 @@ 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)
+			instance->msix_vectors = i;
+		else
 			instance->msix_vectors = 0;
 
 		dev_info(&instance->pdev->dev, "[scsi%d]: FW supports"
@@ -5133,8 +5127,8 @@ megasas_resume(struct pci_dev *pdev)
 
 	/* Now re-enable MSI-X */
 	if (instance->msix_vectors &&
-	    pci_enable_msix(instance->pdev, instance->msixentry,
-			    instance->msix_vectors))
+	    pci_enable_msix_exact(instance->pdev, instance->msixentry,
+				  instance->msix_vectors))
 		goto fail_reenable_msix;
 
 	switch (instance->pdev->device) {
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 05/13] mpt2sas: Use pci_enable_msix_exact() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (3 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 04/13] megaraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 06/13] mpt3sas: " Alexander Gordeev
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  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>
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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 2f262be..cf51b48 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1414,10 +1414,10 @@ _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);
+	r = pci_enable_msix_exact(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));
+		dfailprintk(ioc, printk(MPT2SAS_INFO_FMT
+		    "pci_enable_msix_exact failed (r=%d) !!!\n", ioc->name, r));
 		kfree(entries);
 		goto try_ioapic;
 	}
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 06/13] mpt3sas: Use pci_enable_msix_exact() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (4 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 05/13] mpt2sas: Use pci_enable_msix_exact() " Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 07/13] qla2xxx: Use pci_enable_msix_range() " Alexander Gordeev
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  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>
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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 93ce2b2..09e6b21 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1716,10 +1716,10 @@ _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);
+	r = pci_enable_msix_exact(ioc->pdev, entries, ioc->reply_queue_count);
 	if (r) {
 		dfailprintk(ioc, pr_info(MPT3SAS_FMT
-			"pci_enable_msix failed (r=%d) !!!\n",
+			"pci_enable_msix_exact failed (r=%d) !!!\n",
 			ioc->name, r));
 		kfree(entries);
 		goto try_ioapic;
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 07/13] qla2xxx: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (5 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 06/13] mpt3sas: " Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range() Alexander Gordeev
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
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>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.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 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 550a4a3..a485578 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2923,27 +2923,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.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (6 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 07/13] qla2xxx: Use pci_enable_msix_range() " Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-21 11:10   ` Tomas Henzl
  2014-08-18  6:01 ` [PATCH v3 09/13] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 915c26b..b422659 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -5276,9 +5276,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.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 09/13] csiostor: Remove superfluous call to pci_disable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (7 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-21 11:15   ` Tomas Henzl
  2014-08-18  6:01 ` [PATCH v3 10/13] csiostor: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Gordeev, Naresh Kumar Inna, Arvind Bhushan, linux-scsi,
	linux-pci

There is no need to call pci_disable_msix() in case
the previous call to pci_enable_msix() failed

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 file changed, 1 insertion(+), 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.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 10/13] csiostor: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (8 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 09/13] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-21 11:15   ` Tomas Henzl
  2014-08-18  6:01 ` [PATCH v3 11/13] lpfc: " Alexander Gordeev
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
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 | 22 +++++++++-------------
 2 files changed, 10 insertions(+), 14 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..a8c748a 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 */
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (9 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 10/13] csiostor: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-21 11:32   ` Tomas Henzl
  2014-09-04 13:29   ` Alexander Gordeev
  2014-08-18  6:01 ` [PATCH v3 12/13] pmcraid: Get rid of a redundant assignment Alexander Gordeev
                   ` (2 subsequent siblings)
  13 siblings, 2 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
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 | 39 +++++++++++++++++----------------------
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index a5769a9..37f2a20 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8211,9 +8211,9 @@ lpfc_sli4_pci_mem_unset(struct lpfc_hba *phba)
  * @phba: pointer to lpfc hba data structure.
  *
  * This routine is invoked to enable the MSI-X interrupt vectors to device
- * with SLI-3 interface specs. The kernel function pci_enable_msix() is
- * called to enable the MSI-X vectors. Note that pci_enable_msix(), once
- * invoked, enables either all or nothing, depending on the current
+ * with SLI-3 interface specs. The kernel function pci_enable_msix_exact()
+ * is called to enable the MSI-X vectors. Note that pci_enable_msix_exact(),
+ * once invoked, enables either all or nothing, depending on the current
  * availability of PCI vector resources. The device driver is responsible
  * for calling the individual request_irq() to register each MSI-X vector
  * with a interrupt handler, which is done in this function. Note that
@@ -8237,8 +8237,8 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
 		phba->msix_entries[i].entry = i;
 
 	/* Configure MSI-X capability structure */
-	rc = pci_enable_msix(phba->pcidev, phba->msix_entries,
-				ARRAY_SIZE(phba->msix_entries));
+	rc = pci_enable_msix_exact(phba->pcidev, phba->msix_entries,
+				   LPFC_MSIX_VECTORS);
 	if (rc) {
 		lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
 				"0420 PCI enable MSI-X failed (%d)\n", rc);
@@ -8775,16 +8775,14 @@ out:
  * @phba: pointer to lpfc hba data structure.
  *
  * This routine is invoked to enable the MSI-X interrupt vectors to device
- * with SLI-4 interface spec. The kernel function pci_enable_msix() is called
- * to enable the MSI-X vectors. Note that pci_enable_msix(), once invoked,
- * enables either all or nothing, depending on the current availability of
- * PCI vector resources. The device driver is responsible for calling the
- * individual request_irq() to register each MSI-X vector with a interrupt
- * handler, which is done in this function. Note that later when device is
- * unloading, the driver should always call free_irq() on all MSI-X vectors
- * it has done request_irq() on before calling pci_disable_msix(). Failure
- * to do so results in a BUG_ON() and a device will be left with MSI-X
- * enabled and leaks its vectors.
+ * with SLI-4 interface spec. The kernel function pci_enable_msix_range()
+ * is called to enable the MSI-X vectors. The device driver is responsible
+ * for calling the individual request_irq() to register each MSI-X vector
+ * with a interrupt handler, which is done in this function. Note that
+ * later when device is unloading, the driver should always call free_irq()
+ * on all MSI-X vectors it has done request_irq() on before calling
+ * pci_disable_msix(). Failure to do so results in a BUG_ON() and a device
+ * will be left with MSI-X enabled and leaks its vectors.
  *
  * Return codes
  * 0 - successful
@@ -8805,17 +8803,14 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
 		phba->sli4_hba.msix_entries[index].entry = index;
 		vectors++;
 	}
-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, vectors);
+	if (rc < 0) {
 		lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
 				"0484 PCI enable MSI-X failed (%d)\n", rc);
 		goto vec_fail_out;
 	}
+	vectors = rc;
 
 	/* Log MSI-X vector assignment */
 	for (index = 0; index < vectors; index++)
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 12/13] pmcraid: Get rid of a redundant assignment
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (10 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 11/13] lpfc: " Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-21 11:33   ` Tomas Henzl
  2014-08-18  6:01 ` [PATCH v3 13/13] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
  2014-08-19 17:00 ` [PATCH v3 00/13] scsi: " Christoph Hellwig
  13 siblings, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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 file changed, 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 6f3275d..6e575ed 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.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 13/13] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (11 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 12/13] pmcraid: Get rid of a redundant assignment Alexander Gordeev
@ 2014-08-18  6:01 ` Alexander Gordeev
  2014-08-21 11:35   ` Tomas Henzl
  2014-08-19 17:00 ` [PATCH v3 00/13] scsi: " Christoph Hellwig
  13 siblings, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-18  6:01 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()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
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 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 6e575ed..bcb64eb 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.9.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
                   ` (12 preceding siblings ...)
  2014-08-18  6:01 ` [PATCH v3 13/13] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-19 17:00 ` Christoph Hellwig
  2014-08-20 19:14   ` Alexander Gordeev
  13 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2014-08-19 17:00 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: linux-kernel, Anil Ravindranath, James Smart, Naresh Kumar Inna,
	Arvind Bhushan, Jayamohan Kallickal, Chad Dupuis, Tomas Henzl,
	Nagalakshmi Nandigama, Sreekanth Reddy, Kashyap Desai,
	Neela Syam Kolli, Stephen M. Cameron, iss_storagedev, support,
	DL-MPTFusionLinux, qla2xxx-upstream, linux-scsi, linux-pci

Thanks,

I've applied patches 1 to 7 to the drivers-for-3.18 branch.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-19 17:00 ` [PATCH v3 00/13] scsi: " Christoph Hellwig
@ 2014-08-20 19:14   ` Alexander Gordeev
  2014-08-20 19:22     ` Christoph Hellwig
  2014-08-24 17:31     ` Christoph Hellwig
  0 siblings, 2 replies; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-20 19:14 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, Naresh Kumar Inna, Arvind Bhushan,
	Jayamohan Kallickal, linux-scsi, linux-pci, James E.J. Bottomley

On Tue, Aug 19, 2014 at 10:00:47AM -0700, Christoph Hellwig wrote:
> Thanks,
> 
> I've applied patches 1 to 7 to the drivers-for-3.18 branch.

Thanks, Christoph!

Not sure how to handle the rest, though. Chelsio driver has no
maintainers and none of be2iscsi, pmcraid and csiostor has been
reviewed for several months.

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-20 19:14   ` Alexander Gordeev
@ 2014-08-20 19:22     ` Christoph Hellwig
  2014-08-24 17:31     ` Christoph Hellwig
  1 sibling, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2014-08-20 19:22 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Christoph Hellwig, linux-kernel, Naresh Kumar Inna,
	Arvind Bhushan, Jayamohan Kallickal, linux-scsi, linux-pci,
	James E.J. Bottomley, Tomas Henzl

On Wed, Aug 20, 2014 at 08:14:17PM +0100, Alexander Gordeev wrote:
> > I've applied patches 1 to 7 to the drivers-for-3.18 branch.
> 
> Thanks, Christoph!
> 
> Not sure how to handle the rest, though. Chelsio driver has no
> maintainers and none of be2iscsi, pmcraid and csiostor has been
> reviewed for several months.

I've added Tomas to the Cc list who has been very helpful with reviewing
drivers lately.  Tomas, can you take a quick look at these patches?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range()
  2014-08-18  6:01 ` [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range() Alexander Gordeev
@ 2014-08-21 11:10   ` Tomas Henzl
  2014-08-22 14:40     ` Jayamohan Kallickal
  0 siblings, 1 reply; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:10 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel
  Cc: Jayamohan Kallickal, linux-scsi, linux-pci

On 08/18/2014 08:01 AM, 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.

Patch looks good to me.

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> 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 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 915c26b..b422659 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -5276,9 +5276,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;


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 09/13] csiostor: Remove superfluous call to pci_disable_msix()
  2014-08-18  6:01 ` [PATCH v3 09/13] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
@ 2014-08-21 11:15   ` Tomas Henzl
  0 siblings, 0 replies; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:15 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel
  Cc: Naresh Kumar Inna, Arvind Bhushan, linux-scsi, linux-pci

On 08/18/2014 08:01 AM, Alexander Gordeev wrote:
> There is no need to call pci_disable_msix() in case
> the previous call to pci_enable_msix() failed

Patch looks good to me.

Reviewed-by: Tomas Henzl <thenzl@redhat.com>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 10/13] csiostor: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 ` [PATCH v3 10/13] csiostor: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-21 11:15   ` Tomas Henzl
  0 siblings, 0 replies; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:15 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel
  Cc: Naresh Kumar Inna, Arvind Bhushan, linux-scsi, linux-pci

On 08/18/2014 08:01 AM, 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()  or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> interfaces.

Patch looks good to me.

Reviewed-by: Tomas Henzl <thenzl@redhat.com>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 ` [PATCH v3 11/13] lpfc: " Alexander Gordeev
@ 2014-08-21 11:32   ` Tomas Henzl
  2014-08-21 11:58     ` Tomas Henzl
  2014-09-04 13:29   ` Alexander Gordeev
  1 sibling, 1 reply; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:32 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel; +Cc: James Smart, linux-scsi, linux-pci

On 08/18/2014 08:01 AM, 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()  or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> 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 | 39 +++++++++++++++++----------------------
>  1 file changed, 17 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index a5769a9..37f2a20 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -8211,9 +8211,9 @@ lpfc_sli4_pci_mem_unset(struct lpfc_hba *phba)
>   * @phba: pointer to lpfc hba data structure.
>   *
>   * This routine is invoked to enable the MSI-X interrupt vectors to device
> - * with SLI-3 interface specs. The kernel function pci_enable_msix() is
> - * called to enable the MSI-X vectors. Note that pci_enable_msix(), once
> - * invoked, enables either all or nothing, depending on the current
> + * with SLI-3 interface specs. The kernel function pci_enable_msix_exact()
> + * is called to enable the MSI-X vectors. Note that pci_enable_msix_exact(),
> + * once invoked, enables either all or nothing, depending on the current
>   * availability of PCI vector resources. The device driver is responsible
>   * for calling the individual request_irq() to register each MSI-X vector
>   * with a interrupt handler, which is done in this function. Note that
> @@ -8237,8 +8237,8 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
>  		phba->msix_entries[i].entry = i;
>  
>  	/* Configure MSI-X capability structure */
> -	rc = pci_enable_msix(phba->pcidev, phba->msix_entries,
> -				ARRAY_SIZE(phba->msix_entries));
> +	rc = pci_enable_msix_exact(phba->pcidev, phba->msix_entries,
> +				   LPFC_MSIX_VECTORS);
>  	if (rc) {
>  		lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
>  				"0420 PCI enable MSI-X failed (%d)\n", rc);

Hi Alexander 

the code continues with:
goto ->  pci_disable_msix(phba->pcidev);
that call to disable_msix is also superfluous I think
shouldn't that be fixed too?
the same is also in lpfc_sli4_enable_msix

Tomas

> @@ -8775,16 +8775,14 @@ out:
>   * @phba: pointer to lpfc hba data structure.
>   *
>   * This routine is invoked to enable the MSI-X interrupt vectors to device
> - * with SLI-4 interface spec. The kernel function pci_enable_msix() is called
> - * to enable the MSI-X vectors. Note that pci_enable_msix(), once invoked,
> - * enables either all or nothing, depending on the current availability of
> - * PCI vector resources. The device driver is responsible for calling the
> - * individual request_irq() to register each MSI-X vector with a interrupt
> - * handler, which is done in this function. Note that later when device is
> - * unloading, the driver should always call free_irq() on all MSI-X vectors
> - * it has done request_irq() on before calling pci_disable_msix(). Failure
> - * to do so results in a BUG_ON() and a device will be left with MSI-X
> - * enabled and leaks its vectors.
> + * with SLI-4 interface spec. The kernel function pci_enable_msix_range()
> + * is called to enable the MSI-X vectors. The device driver is responsible
> + * for calling the individual request_irq() to register each MSI-X vector
> + * with a interrupt handler, which is done in this function. Note that
> + * later when device is unloading, the driver should always call free_irq()
> + * on all MSI-X vectors it has done request_irq() on before calling
> + * pci_disable_msix(). Failure to do so results in a BUG_ON() and a device
> + * will be left with MSI-X enabled and leaks its vectors.
>   *
>   * Return codes
>   * 0 - successful
> @@ -8805,17 +8803,14 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
>  		phba->sli4_hba.msix_entries[index].entry = index;
>  		vectors++;
>  	}
> -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, vectors);
> +	if (rc < 0) {
>  		lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
>  				"0484 PCI enable MSI-X failed (%d)\n", rc);
>  		goto vec_fail_out;
>  	}
> +	vectors = rc;
>  
>  	/* Log MSI-X vector assignment */
>  	for (index = 0; index < vectors; index++)


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 12/13] pmcraid: Get rid of a redundant assignment
  2014-08-18  6:01 ` [PATCH v3 12/13] pmcraid: Get rid of a redundant assignment Alexander Gordeev
@ 2014-08-21 11:33   ` Tomas Henzl
  0 siblings, 0 replies; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:33 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel; +Cc: Anil Ravindranath, linux-scsi, linux-pci

On 08/18/2014 08:01 AM, Alexander Gordeev wrote:
> 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 file changed, 1 deletion(-)
>
> diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
> index 6f3275d..6e575ed 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]);

Patch looks good to me.

Reviewed-by: Tomas Henzl <thenzl@redhat.com>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 13/13] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 ` [PATCH v3 13/13] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
@ 2014-08-21 11:35   ` Tomas Henzl
  0 siblings, 0 replies; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:35 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel; +Cc: Anil Ravindranath, linux-scsi, linux-pci

On 08/18/2014 08:01 AM, 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()  or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> interfaces.

Patch looks good.

Reviewed-by: Tomas Henzl <thenzl@redhat.com>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-21 11:32   ` Tomas Henzl
@ 2014-08-21 11:58     ` Tomas Henzl
  2014-08-21 16:58       ` Alexander Gordeev
  0 siblings, 1 reply; 30+ messages in thread
From: Tomas Henzl @ 2014-08-21 11:58 UTC (permalink / raw)
  To: Alexander Gordeev, linux-kernel; +Cc: James Smart, linux-scsi, linux-pci

On 08/21/2014 01:32 PM, Tomas Henzl wrote:
> On 08/18/2014 08:01 AM, 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()  or pci_enable_msi_exact()
>> and pci_enable_msix_range() or pci_enable_msix_exact()
>> 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 | 39 +++++++++++++++++----------------------
>>  1 file changed, 17 insertions(+), 22 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
>> index a5769a9..37f2a20 100644
>> --- a/drivers/scsi/lpfc/lpfc_init.c
>> +++ b/drivers/scsi/lpfc/lpfc_init.c
>> @@ -8211,9 +8211,9 @@ lpfc_sli4_pci_mem_unset(struct lpfc_hba *phba)
>>   * @phba: pointer to lpfc hba data structure.
>>   *
>>   * This routine is invoked to enable the MSI-X interrupt vectors to device
>> - * with SLI-3 interface specs. The kernel function pci_enable_msix() is
>> - * called to enable the MSI-X vectors. Note that pci_enable_msix(), once
>> - * invoked, enables either all or nothing, depending on the current
>> + * with SLI-3 interface specs. The kernel function pci_enable_msix_exact()
>> + * is called to enable the MSI-X vectors. Note that pci_enable_msix_exact(),
>> + * once invoked, enables either all or nothing, depending on the current
>>   * availability of PCI vector resources. The device driver is responsible
>>   * for calling the individual request_irq() to register each MSI-X vector
>>   * with a interrupt handler, which is done in this function. Note that
>> @@ -8237,8 +8237,8 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
>>  		phba->msix_entries[i].entry = i;
>>  
>>  	/* Configure MSI-X capability structure */
>> -	rc = pci_enable_msix(phba->pcidev, phba->msix_entries,
>> -				ARRAY_SIZE(phba->msix_entries));
>> +	rc = pci_enable_msix_exact(phba->pcidev, phba->msix_entries,
>> +				   LPFC_MSIX_VECTORS);
>>  	if (rc) {
>>  		lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
>>  				"0420 PCI enable MSI-X failed (%d)\n", rc);
> Hi Alexander 
>
> the code continues with:
> goto ->  pci_disable_msix(phba->pcidev);
> that call to disable_msix is also superfluous I think
> shouldn't that be fixed too?
> the same is also in lpfc_sli4_enable_msix
>
> Tomas

my bad, this was already fixed in
commit 029165acfa611a3a8838723f6978586ae35ff53d lpfc: Remove superfluous call to pci_disable_msix()

so patch looks good to me now

Reviewed-by: Tomas Henzl

>
>> @@ -8775,16 +8775,14 @@ out:
>>   * @phba: pointer to lpfc hba data structure.
>>   *
>>   * This routine is invoked to enable the MSI-X interrupt vectors to device
>> - * with SLI-4 interface spec. The kernel function pci_enable_msix() is called
>> - * to enable the MSI-X vectors. Note that pci_enable_msix(), once invoked,
>> - * enables either all or nothing, depending on the current availability of
>> - * PCI vector resources. The device driver is responsible for calling the
>> - * individual request_irq() to register each MSI-X vector with a interrupt
>> - * handler, which is done in this function. Note that later when device is
>> - * unloading, the driver should always call free_irq() on all MSI-X vectors
>> - * it has done request_irq() on before calling pci_disable_msix(). Failure
>> - * to do so results in a BUG_ON() and a device will be left with MSI-X
>> - * enabled and leaks its vectors.
>> + * with SLI-4 interface spec. The kernel function pci_enable_msix_range()
>> + * is called to enable the MSI-X vectors. The device driver is responsible
>> + * for calling the individual request_irq() to register each MSI-X vector
>> + * with a interrupt handler, which is done in this function. Note that
>> + * later when device is unloading, the driver should always call free_irq()
>> + * on all MSI-X vectors it has done request_irq() on before calling
>> + * pci_disable_msix(). Failure to do so results in a BUG_ON() and a device
>> + * will be left with MSI-X enabled and leaks its vectors.
>>   *
>>   * Return codes
>>   * 0 - successful
>> @@ -8805,17 +8803,14 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
>>  		phba->sli4_hba.msix_entries[index].entry = index;
>>  		vectors++;
>>  	}
>> -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, vectors);
>> +	if (rc < 0) {
>>  		lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
>>  				"0484 PCI enable MSI-X failed (%d)\n", rc);
>>  		goto vec_fail_out;
>>  	}
>> +	vectors = rc;
>>  
>>  	/* Log MSI-X vector assignment */
>>  	for (index = 0; index < vectors; index++)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-21 11:58     ` Tomas Henzl
@ 2014-08-21 16:58       ` Alexander Gordeev
  2014-08-21 17:02         ` Christoph Hellwig
  0 siblings, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-08-21 16:58 UTC (permalink / raw)
  To: Tomas Henzl, Christoph Hellwig, James Smart
  Cc: linux-kernel, linux-scsi, linux-pci

On Thu, Aug 21, 2014 at 01:58:39PM +0200, Tomas Henzl wrote:
> my bad, this was already fixed in
> commit 029165acfa611a3a8838723f6978586ae35ff53d lpfc: Remove superfluous call to pci_disable_msix()
> 
> so patch looks good to me now

Many thanks for your reviews, Tomas!

> Reviewed-by: Tomas Henzl

Christoph, this patch was declined by James few times.
I think it needs his approval as well.

James?

Thanks!

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-21 16:58       ` Alexander Gordeev
@ 2014-08-21 17:02         ` Christoph Hellwig
  0 siblings, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2014-08-21 17:02 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Tomas Henzl, Christoph Hellwig, James Smart, linux-kernel,
	linux-scsi, linux-pci

On Thu, Aug 21, 2014 at 05:58:34PM +0100, Alexander Gordeev wrote:
> > Reviewed-by: Tomas Henzl
> 
> Christoph, this patch was declined by James few times.
> I think it needs his approval as well.

You're referring to James Smart here, right?  For an actively maintained
driver like lpfc I'd like it be acked by the maintainer indeed.  In fact
for lpfc I have an agreement with James that he'll pick up lpfc patches 
and sent the colleted patches on to me.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* RE: [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range()
  2014-08-21 11:10   ` Tomas Henzl
@ 2014-08-22 14:40     ` Jayamohan Kallickal
  0 siblings, 0 replies; 30+ messages in thread
From: Jayamohan Kallickal @ 2014-08-22 14:40 UTC (permalink / raw)
  To: Tomas Henzl, Alexander Gordeev, linux-kernel; +Cc: linux-scsi, linux-pci



-----Original Message-----
From: Tomas Henzl [mailto:thenzl@redhat.com] 
Sent: Thursday, August 21, 2014 4:10 AM
To: Alexander Gordeev; linux-kernel@vger.kernel.org
Cc: Jayamohan Kallickal; linux-scsi@vger.kernel.org; linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range()

On 08/18/2014 08:01 AM, 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.

Patch looks good to me.

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> 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 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c 
> b/drivers/scsi/be2iscsi/be_main.c index 915c26b..b422659 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -5276,9 +5276,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 Good.

Acked-by:  Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
--

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-20 19:14   ` Alexander Gordeev
  2014-08-20 19:22     ` Christoph Hellwig
@ 2014-08-24 17:31     ` Christoph Hellwig
  1 sibling, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2014-08-24 17:31 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Christoph Hellwig, linux-kernel, Naresh Kumar Inna,
	Arvind Bhushan, Jayamohan Kallickal, linux-scsi, linux-pci,
	James E.J. Bottomley

I've applied all other patches except for the lpfc one now.

Thanks again!

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-08-18  6:01 ` [PATCH v3 11/13] lpfc: " Alexander Gordeev
  2014-08-21 11:32   ` Tomas Henzl
@ 2014-09-04 13:29   ` Alexander Gordeev
  2014-09-04 15:11     ` Christoph Hellwig
  1 sibling, 1 reply; 30+ messages in thread
From: Alexander Gordeev @ 2014-09-04 13:29 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi, linux-pci, linux-kernel

On Mon, Aug 18, 2014 at 08:01:51AM +0200, 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()  or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> interfaces.

James?

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 11/13] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
  2014-09-04 13:29   ` Alexander Gordeev
@ 2014-09-04 15:11     ` Christoph Hellwig
  0 siblings, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2014-09-04 15:11 UTC (permalink / raw)
  To: Alexander Gordeev; +Cc: James Smart, linux-scsi, linux-pci, linux-kernel

On Thu, Sep 04, 2014 at 02:29:39PM +0100, Alexander Gordeev wrote:
> On Mon, Aug 18, 2014 at 08:01:51AM +0200, 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()  or pci_enable_msi_exact()
> > and pci_enable_msix_range() or pci_enable_msix_exact()
> > interfaces.
> 
> James?

It's part of the lpfc update he recently sent out.  It's high up on my
list of things to review.

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-09-04 15:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-18  6:01 [PATCH v3 00/13] scsi: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 01/13] hpsa: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 02/13] hpsa: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 03/13] megaraid: Fail resume if MSI-X re-initialization failed Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 04/13] megaraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 05/13] mpt2sas: Use pci_enable_msix_exact() " Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 06/13] mpt3sas: " Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 07/13] qla2xxx: Use pci_enable_msix_range() " Alexander Gordeev
2014-08-18  6:01 ` [PATCH v3 08/13] be2iscsi: Use pci_enable_msix_range() Alexander Gordeev
2014-08-21 11:10   ` Tomas Henzl
2014-08-22 14:40     ` Jayamohan Kallickal
2014-08-18  6:01 ` [PATCH v3 09/13] csiostor: Remove superfluous call to pci_disable_msix() Alexander Gordeev
2014-08-21 11:15   ` Tomas Henzl
2014-08-18  6:01 ` [PATCH v3 10/13] csiostor: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-08-21 11:15   ` Tomas Henzl
2014-08-18  6:01 ` [PATCH v3 11/13] lpfc: " Alexander Gordeev
2014-08-21 11:32   ` Tomas Henzl
2014-08-21 11:58     ` Tomas Henzl
2014-08-21 16:58       ` Alexander Gordeev
2014-08-21 17:02         ` Christoph Hellwig
2014-09-04 13:29   ` Alexander Gordeev
2014-09-04 15:11     ` Christoph Hellwig
2014-08-18  6:01 ` [PATCH v3 12/13] pmcraid: Get rid of a redundant assignment Alexander Gordeev
2014-08-21 11:33   ` Tomas Henzl
2014-08-18  6:01 ` [PATCH v3 13/13] pmcraid: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-08-21 11:35   ` Tomas Henzl
2014-08-19 17:00 ` [PATCH v3 00/13] scsi: " Christoph Hellwig
2014-08-20 19:14   ` Alexander Gordeev
2014-08-20 19:22     ` Christoph Hellwig
2014-08-24 17:31     ` Christoph Hellwig

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).