All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc
@ 2017-03-10 11:22 Shivasharan S
  2017-03-10 11:22 ` [PATCH 1/4] megaraid_sas: enable intx only if msix request fails Shivasharan S
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Shivasharan S @ 2017-03-10 11:22 UTC (permalink / raw)
  To: linux-scsi
  Cc: martin.petersen, thenzl, jejb, kashyap.desai, sumit.saxena, hare,
	Shivasharan S

This patchset fixes few issues introduced during previous set of
patch submissions for 4.11

Shivasharan S (4):
  megaraid_sas: enable intx only if msix request fails
  megaraid_sas: add correct return type check for ldio hint logic for
    raid1
  megaraid_sas: raid6 also require cpuSel check same as raid5
  megaraid_sas: Driver version upgrade

 drivers/scsi/megaraid/megaraid_sas.h        |  4 ++--
 drivers/scsi/megaraid/megaraid_sas_base.c   | 17 ++++++++++++-----
 drivers/scsi/megaraid/megaraid_sas_fusion.c |  4 ++--
 3 files changed, 16 insertions(+), 9 deletions(-)

-- 
2.8.3

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

* [PATCH 1/4] megaraid_sas: enable intx only if msix request fails
  2017-03-10 11:22 [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Shivasharan S
@ 2017-03-10 11:22 ` Shivasharan S
  2017-03-10 16:00   ` Tomas Henzl
  2017-03-10 11:22 ` [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1 Shivasharan S
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Shivasharan S @ 2017-03-10 11:22 UTC (permalink / raw)
  To: linux-scsi
  Cc: martin.petersen, thenzl, jejb, kashyap.desai, sumit.saxena, hare,
	Shivasharan S

Without this fix, driver will enable INTx Interrupt pin even though
MSI-x vectors are enabled. See below lspci output. DisINTx is unset
for MSIx setup.

lspci -s 85:00.0 -vvv |grep INT |grep Control
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-

After applying this fix, driver will enable INTx Interrupt pin only
if Legacy interrupt method is required.
See below lspci output. DisINTx is set for MSIx setup.
lspci -s 85:00.0 -vvv |grep INT |grep Control
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx+

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
---
V2 changes - As Christoph Hellwig suggested, use pci_alloc_irq_vectors
with PCI_IRQ_LEGACY flag in place of pci_intx().

 drivers/scsi/megaraid/megaraid_sas_base.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 7ac9a9e..016ffce 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5034,10 +5034,12 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe)
 					 &instance->irq_context[j]);
 			/* Retry irq register for IO_APIC*/
 			instance->msix_vectors = 0;
-			if (is_probe)
+			if (is_probe) {
+				pci_free_irq_vectors(instance->pdev);
 				return megasas_setup_irqs_ioapic(instance);
-			else
+			} else {
 				return -1;
+			}
 		}
 	}
 	return 0;
@@ -5277,9 +5279,11 @@ static int megasas_init_fw(struct megasas_instance *instance)
 			MPI2_REPLY_POST_HOST_INDEX_OFFSET);
 	}
 
-	i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY);
-	if (i < 0)
-		goto fail_setup_irqs;
+	if (!instance->msix_vectors) {
+		i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY);
+		if (i < 0)
+			goto fail_setup_irqs;
+	}
 
 	dev_info(&instance->pdev->dev,
 		"firmware supports msix\t: (%d)", fw_msix_count);
-- 
2.8.3

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

* [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1
  2017-03-10 11:22 [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Shivasharan S
  2017-03-10 11:22 ` [PATCH 1/4] megaraid_sas: enable intx only if msix request fails Shivasharan S
@ 2017-03-10 11:22 ` Shivasharan S
  2017-03-10 16:00   ` Tomas Henzl
  2017-03-10 11:22 ` [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5 Shivasharan S
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Shivasharan S @ 2017-03-10 11:22 UTC (permalink / raw)
  To: linux-scsi
  Cc: martin.petersen, thenzl, jejb, kashyap.desai, sumit.saxena, hare,
	Shivasharan S

Return value check of atomic_dec_if_positive is required as it returns old value minus one.
Without this fix, driver will send small ios to firmware path and that will be a performance issue.

Not a critical, but good to have r1_ldio_hint as default value in sdev private.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c   | 3 +++
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 016ffce..0016f12 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1963,6 +1963,9 @@ static int megasas_slave_alloc(struct scsi_device *sdev)
 	if (!mr_device_priv_data)
 		return -ENOMEM;
 	sdev->hostdata = mr_device_priv_data;
+
+	atomic_set(&mr_device_priv_data->r1_ldio_hint,
+		   instance->r1_ldio_hint_default);
 	return 0;
 }
 
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 29650ba..ebd746e 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2338,7 +2338,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
 				fp_possible = false;
 				atomic_dec(&instance->fw_outstanding);
 			} else if ((scsi_buff_len > MR_LARGE_IO_MIN_SIZE) ||
-				   atomic_dec_if_positive(&mrdev_priv->r1_ldio_hint)) {
+				   (atomic_dec_if_positive(&mrdev_priv->r1_ldio_hint) > 0)) {
 				fp_possible = false;
 				atomic_dec(&instance->fw_outstanding);
 				if (scsi_buff_len > MR_LARGE_IO_MIN_SIZE)
-- 
2.8.3

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

* [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5
  2017-03-10 11:22 [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Shivasharan S
  2017-03-10 11:22 ` [PATCH 1/4] megaraid_sas: enable intx only if msix request fails Shivasharan S
  2017-03-10 11:22 ` [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1 Shivasharan S
@ 2017-03-10 11:22 ` Shivasharan S
  2017-03-10 16:00   ` Tomas Henzl
  2017-03-10 11:22 ` [PATCH 4/4] megaraid_sas: Driver version upgrade Shivasharan S
  2017-03-14  3:00 ` [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Martin K. Petersen
  4 siblings, 1 reply; 10+ messages in thread
From: Shivasharan S @ 2017-03-10 11:22 UTC (permalink / raw)
  To: linux-scsi
  Cc: martin.petersen, thenzl, jejb, kashyap.desai, sumit.saxena, hare,
	Shivasharan S

Without this fix, raid6 performance will not be an optimal.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index ebd746e..f990ab4d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2159,7 +2159,7 @@ megasas_set_raidflag_cpu_affinity(union RAID_CONTEXT_UNION *praid_context,
 				cpu_sel = MR_RAID_CTX_CPUSEL_1;
 
 			if (is_stream_detected(rctx_g35) &&
-			    (raid->level == 5) &&
+			    ((raid->level == 5) || (raid->level == 6)) &&
 			    (raid->writeMode == MR_RL_WRITE_THROUGH_MODE) &&
 			    (cpu_sel == MR_RAID_CTX_CPUSEL_FCFS))
 				cpu_sel = MR_RAID_CTX_CPUSEL_0;
-- 
2.8.3

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

* [PATCH 4/4] megaraid_sas: Driver version upgrade
  2017-03-10 11:22 [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Shivasharan S
                   ` (2 preceding siblings ...)
  2017-03-10 11:22 ` [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5 Shivasharan S
@ 2017-03-10 11:22 ` Shivasharan S
  2017-03-10 16:01   ` Tomas Henzl
  2017-03-14  3:00 ` [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Martin K. Petersen
  4 siblings, 1 reply; 10+ messages in thread
From: Shivasharan S @ 2017-03-10 11:22 UTC (permalink / raw)
  To: linux-scsi
  Cc: martin.petersen, thenzl, jejb, kashyap.desai, sumit.saxena, hare,
	Shivasharan S

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
---
 drivers/scsi/megaraid/megaraid_sas.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index e7e5974..2b209bb 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -35,8 +35,8 @@
 /*
  * MegaRAID SAS Driver meta data
  */
-#define MEGASAS_VERSION				"07.701.16.00-rc1"
-#define MEGASAS_RELDATE				"February 2, 2017"
+#define MEGASAS_VERSION				"07.701.17.00-rc1"
+#define MEGASAS_RELDATE				"March 2, 2017"
 
 /*
  * Device IDs
-- 
2.8.3

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

* Re: [PATCH 1/4] megaraid_sas: enable intx only if msix request fails
  2017-03-10 11:22 ` [PATCH 1/4] megaraid_sas: enable intx only if msix request fails Shivasharan S
@ 2017-03-10 16:00   ` Tomas Henzl
  0 siblings, 0 replies; 10+ messages in thread
From: Tomas Henzl @ 2017-03-10 16:00 UTC (permalink / raw)
  To: Shivasharan S, linux-scsi
  Cc: martin.petersen, jejb, kashyap.desai, sumit.saxena, hare

On 10.3.2017 12:22, Shivasharan S wrote:
> Without this fix, driver will enable INTx Interrupt pin even though
> MSI-x vectors are enabled. See below lspci output. DisINTx is unset
> for MSIx setup.
>
> lspci -s 85:00.0 -vvv |grep INT |grep Control
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
>
> After applying this fix, driver will enable INTx Interrupt pin only
> if Legacy interrupt method is required.
> See below lspci output. DisINTx is set for MSIx setup.
> lspci -s 85:00.0 -vvv |grep INT |grep Control
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx+
>
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

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

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

* Re: [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1
  2017-03-10 11:22 ` [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1 Shivasharan S
@ 2017-03-10 16:00   ` Tomas Henzl
  0 siblings, 0 replies; 10+ messages in thread
From: Tomas Henzl @ 2017-03-10 16:00 UTC (permalink / raw)
  To: Shivasharan S, linux-scsi
  Cc: martin.petersen, jejb, kashyap.desai, sumit.saxena, hare

On 10.3.2017 12:22, Shivasharan S wrote:
> Return value check of atomic_dec_if_positive is required as it returns old value minus one.
> Without this fix, driver will send small ios to firmware path and that will be a performance issue.
>
> Not a critical, but good to have r1_ldio_hint as default value in sdev private.
>
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>

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

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

* Re: [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5
  2017-03-10 11:22 ` [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5 Shivasharan S
@ 2017-03-10 16:00   ` Tomas Henzl
  0 siblings, 0 replies; 10+ messages in thread
From: Tomas Henzl @ 2017-03-10 16:00 UTC (permalink / raw)
  To: Shivasharan S, linux-scsi
  Cc: martin.petersen, jejb, kashyap.desai, sumit.saxena, hare

On 10.3.2017 12:22, Shivasharan S wrote:
> Without this fix, raid6 performance will not be an optimal.
>
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>

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

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

* Re: [PATCH 4/4] megaraid_sas: Driver version upgrade
  2017-03-10 11:22 ` [PATCH 4/4] megaraid_sas: Driver version upgrade Shivasharan S
@ 2017-03-10 16:01   ` Tomas Henzl
  0 siblings, 0 replies; 10+ messages in thread
From: Tomas Henzl @ 2017-03-10 16:01 UTC (permalink / raw)
  To: Shivasharan S, linux-scsi
  Cc: martin.petersen, jejb, kashyap.desai, sumit.saxena, hare

On 10.3.2017 12:22, Shivasharan S wrote:
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>

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

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

* Re: [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc
  2017-03-10 11:22 [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Shivasharan S
                   ` (3 preceding siblings ...)
  2017-03-10 11:22 ` [PATCH 4/4] megaraid_sas: Driver version upgrade Shivasharan S
@ 2017-03-14  3:00 ` Martin K. Petersen
  4 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2017-03-14  3:00 UTC (permalink / raw)
  To: Shivasharan S
  Cc: linux-scsi, martin.petersen, thenzl, jejb, kashyap.desai,
	sumit.saxena, hare

>>>>> "Shivasharan" == Shivasharan S <shivasharan.srikanteshwara@broadcom.com> writes:

Shivasharan> This patchset fixes few issues introduced during previous
Shivasharan> set of patch submissions for 4.11

Applied to 4.11/scsi-fixes.

Thank you!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2017-03-14  3:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 11:22 [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Shivasharan S
2017-03-10 11:22 ` [PATCH 1/4] megaraid_sas: enable intx only if msix request fails Shivasharan S
2017-03-10 16:00   ` Tomas Henzl
2017-03-10 11:22 ` [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1 Shivasharan S
2017-03-10 16:00   ` Tomas Henzl
2017-03-10 11:22 ` [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5 Shivasharan S
2017-03-10 16:00   ` Tomas Henzl
2017-03-10 11:22 ` [PATCH 4/4] megaraid_sas: Driver version upgrade Shivasharan S
2017-03-10 16:01   ` Tomas Henzl
2017-03-14  3:00 ` [PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.