All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1
@ 2020-05-08  8:38 Chandrakanth Patil
  2020-05-08  8:38 ` [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd Chandrakanth Patil
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chandrakanth Patil @ 2020-05-08  8:38 UTC (permalink / raw)
  To: linux-scsi
  Cc: kashyap.desai, sumit.saxena, kiran-kumar.kasturi, sankar.patra,
	sasikumar.pc, shivasharan.srikanteshwara, anand.lodnoor,
	Chandrakanth Patil

This patchset contains few critical driver fixes.

Chandrakanth Patil (5):
  megaraid_sas: Limit device qd to controller qd when device qd is
    greater than controller qd
  megaraid_sas: Remove IO buffer hole detection logic
  megaraid_sas: Replace undefined MFI_BIG_ENDIAN macro with
    __BIG_ENDIAN_BITFIELD macro
  megaraid_sas: TM command refire leads to controller firmware crash
  megaraid_sas: Update driver version to 07.714.04.00-rc1

 drivers/scsi/megaraid/megaraid_sas.h        |  8 ++--
 drivers/scsi/megaraid/megaraid_sas_base.c   |  5 +--
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 65 +++--------------------------
 drivers/scsi/megaraid/megaraid_sas_fusion.h |  6 +--
 4 files changed, 15 insertions(+), 69 deletions(-)

-- 
2.9.5


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

* [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd
  2020-05-08  8:38 [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Chandrakanth Patil
@ 2020-05-08  8:38 ` Chandrakanth Patil
  2020-05-13  6:20   ` Hannes Reinecke
  2020-05-08  8:38 ` [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic Chandrakanth Patil
  2020-05-12  3:48 ` [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Martin K. Petersen
  2 siblings, 1 reply; 7+ messages in thread
From: Chandrakanth Patil @ 2020-05-08  8:38 UTC (permalink / raw)
  To: linux-scsi
  Cc: kashyap.desai, sumit.saxena, kiran-kumar.kasturi, sankar.patra,
	sasikumar.pc, shivasharan.srikanteshwara, anand.lodnoor,
	Chandrakanth Patil

Currently, driver assigns pre-defined qd when firmware provided
device qd is greater than the controller queue depth.
This change assigns controller queue depth instead of pre-defined
qd when firmware provided qd is greater than controller queue depth.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index fb9c3ce..aeb5952 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1982,9 +1982,8 @@ static void megasas_set_fw_assisted_qd(struct scsi_device *sdev,
 
 	if (is_target_prop) {
 		tgt_device_qd = le32_to_cpu(instance->tgt_prop->device_qdepth);
-		if (tgt_device_qd &&
-		    (tgt_device_qd <= instance->host->can_queue))
-			device_qd = tgt_device_qd;
+		if (tgt_device_qd)
+			device_qd = min(instance->host->can_queue, (int)tgt_device_qd);
 	}
 
 	if (instance->enable_sdev_max_qd && interface_type != UNKNOWN_DRIVE)
-- 
2.9.5


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

* [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic
  2020-05-08  8:38 [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Chandrakanth Patil
  2020-05-08  8:38 ` [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd Chandrakanth Patil
@ 2020-05-08  8:38 ` Chandrakanth Patil
  2020-05-13  6:21   ` Hannes Reinecke
  2020-05-12  3:48 ` [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Martin K. Petersen
  2 siblings, 1 reply; 7+ messages in thread
From: Chandrakanth Patil @ 2020-05-08  8:38 UTC (permalink / raw)
  To: linux-scsi
  Cc: kashyap.desai, sumit.saxena, kiran-kumar.kasturi, sankar.patra,
	sasikumar.pc, shivasharan.srikanteshwara, anand.lodnoor,
	Chandrakanth Patil

As blk_queue_virt_boundary() API in slave_configure ensures that no IOs
will come with holes/gaps. Hence, code logic to detect the holes/gaps in
IO buffer is not required.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 58 -----------------------------
 1 file changed, 58 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index e0f923b..87f91a38 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2070,7 +2070,6 @@ static bool
 megasas_is_prp_possible(struct megasas_instance *instance,
 			struct scsi_cmnd *scmd, int sge_count)
 {
-	int i;
 	u32 data_length = 0;
 	struct scatterlist *sg_scmd;
 	bool build_prp = false;
@@ -2099,63 +2098,6 @@ megasas_is_prp_possible(struct megasas_instance *instance,
 			build_prp = true;
 	}
 
-/*
- * Below code detects gaps/holes in IO data buffers.
- * What does holes/gaps mean?
- * Any SGE except first one in a SGL starts at non NVME page size
- * aligned address OR Any SGE except last one in a SGL ends at
- * non NVME page size boundary.
- *
- * Driver has already informed block layer by setting boundary rules for
- * bio merging done at NVME page size boundary calling kernel API
- * blk_queue_virt_boundary inside slave_config.
- * Still there is possibility of IO coming with holes to driver because of
- * IO merging done by IO scheduler.
- *
- * With SCSI BLK MQ enabled, there will be no IO with holes as there is no
- * IO scheduling so no IO merging.
- *
- * With SCSI BLK MQ disabled, IO scheduler may attempt to merge IOs and
- * then sending IOs with holes.
- *
- * Though driver can request block layer to disable IO merging by calling-
- * blk_queue_flag_set(QUEUE_FLAG_NOMERGES, sdev->request_queue) but
- * user may tune sysfs parameter- nomerges again to 0 or 1.
- *
- * If in future IO scheduling is enabled with SCSI BLK MQ,
- * this algorithm to detect holes will be required in driver
- * for SCSI BLK MQ enabled case as well.
- *
- *
- */
-	scsi_for_each_sg(scmd, sg_scmd, sge_count, i) {
-		if ((i != 0) && (i != (sge_count - 1))) {
-			if (mega_mod64(sg_dma_len(sg_scmd), mr_nvme_pg_size) ||
-			    mega_mod64(sg_dma_address(sg_scmd),
-				       mr_nvme_pg_size)) {
-				build_prp = false;
-				break;
-			}
-		}
-
-		if ((sge_count > 1) && (i == 0)) {
-			if ((mega_mod64((sg_dma_address(sg_scmd) +
-					sg_dma_len(sg_scmd)),
-					mr_nvme_pg_size))) {
-				build_prp = false;
-				break;
-			}
-		}
-
-		if ((sge_count > 1) && (i == (sge_count - 1))) {
-			if (mega_mod64(sg_dma_address(sg_scmd),
-				       mr_nvme_pg_size)) {
-				build_prp = false;
-				break;
-			}
-		}
-	}
-
 	return build_prp;
 }
 
-- 
2.9.5


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

* Re: [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1
  2020-05-08  8:38 [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Chandrakanth Patil
  2020-05-08  8:38 ` [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd Chandrakanth Patil
  2020-05-08  8:38 ` [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic Chandrakanth Patil
@ 2020-05-12  3:48 ` Martin K. Petersen
  2020-05-13 21:38   ` Chandrakanth Patil
  2 siblings, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2020-05-12  3:48 UTC (permalink / raw)
  To: Chandrakanth Patil
  Cc: linux-scsi, kashyap.desai, sumit.saxena, kiran-kumar.kasturi,
	sankar.patra, sasikumar.pc, shivasharan.srikanteshwara,
	anand.lodnoor


Hi Chandrakanth!

> This patchset contains few critical driver fixes.
>
> Chandrakanth Patil (5):
>   megaraid_sas: Limit device qd to controller qd when device qd is
>     greater than controller qd
>   megaraid_sas: Remove IO buffer hole detection logic
>   megaraid_sas: Replace undefined MFI_BIG_ENDIAN macro with
>     __BIG_ENDIAN_BITFIELD macro
>   megaraid_sas: TM command refire leads to controller firmware crash
>   megaraid_sas: Update driver version to 07.714.04.00-rc1

The threading was messed up in this series and both patchwork and b4
failed to grok it as a single patch set. It looks like your mail system
somehow broke it up into multiple submissions, each with their own
threading and cover letter.

Also, several patches had incorrect attribution. If a patch was not
authored by you it needs to have a From: identifying the original author
(Sumit, Kashyap, etc.) as identified in the first Signed-off-by: tag.

I fixed things up and applied to 5.8/scsi-queue. But please look into
what went wrong when mailing this series. While I can edit my way out of
incorrectly threaded submissions, the build robots and code checkers can
get stumped when something is broken up. And therefore there is a chance
that the patches didn't get full build and code analysis coverage.

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd
  2020-05-08  8:38 ` [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd Chandrakanth Patil
@ 2020-05-13  6:20   ` Hannes Reinecke
  0 siblings, 0 replies; 7+ messages in thread
From: Hannes Reinecke @ 2020-05-13  6:20 UTC (permalink / raw)
  To: Chandrakanth Patil, linux-scsi
  Cc: kashyap.desai, sumit.saxena, kiran-kumar.kasturi, sankar.patra,
	sasikumar.pc, shivasharan.srikanteshwara, anand.lodnoor

On 5/8/20 10:38 AM, Chandrakanth Patil wrote:
> Currently, driver assigns pre-defined qd when firmware provided
> device qd is greater than the controller queue depth.
> This change assigns controller queue depth instead of pre-defined
> qd when firmware provided qd is greater than controller queue depth.
> 
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
> ---
>   drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index fb9c3ce..aeb5952 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1982,9 +1982,8 @@ static void megasas_set_fw_assisted_qd(struct scsi_device *sdev,
>   
>   	if (is_target_prop) {
>   		tgt_device_qd = le32_to_cpu(instance->tgt_prop->device_qdepth);
> -		if (tgt_device_qd &&
> -		    (tgt_device_qd <= instance->host->can_queue))
> -			device_qd = tgt_device_qd;
> +		if (tgt_device_qd)
> +			device_qd = min(instance->host->can_queue, (int)tgt_device_qd);
>   	}
>   
>   	if (instance->enable_sdev_max_qd && interface_type != UNKNOWN_DRIVE)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@suse.de                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

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

* Re: [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic
  2020-05-08  8:38 ` [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic Chandrakanth Patil
@ 2020-05-13  6:21   ` Hannes Reinecke
  0 siblings, 0 replies; 7+ messages in thread
From: Hannes Reinecke @ 2020-05-13  6:21 UTC (permalink / raw)
  To: Chandrakanth Patil, linux-scsi
  Cc: kashyap.desai, sumit.saxena, kiran-kumar.kasturi, sankar.patra,
	sasikumar.pc, shivasharan.srikanteshwara, anand.lodnoor

On 5/8/20 10:38 AM, Chandrakanth Patil wrote:
> As blk_queue_virt_boundary() API in slave_configure ensures that no IOs
> will come with holes/gaps. Hence, code logic to detect the holes/gaps in
> IO buffer is not required.
> 
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
> ---
>   drivers/scsi/megaraid/megaraid_sas_fusion.c | 58 -----------------------------
>   1 file changed, 58 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@suse.de                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

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

* RE: [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1
  2020-05-12  3:48 ` [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Martin K. Petersen
@ 2020-05-13 21:38   ` Chandrakanth Patil
  0 siblings, 0 replies; 7+ messages in thread
From: Chandrakanth Patil @ 2020-05-13 21:38 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: linux-scsi, Kashyap Desai, Sumit Saxena, Kiran Kumar Kasturi,
	Sankar Patra, Sasikumar PC, Shivasharan Srikanteshwara,
	Anand Lodnoor

Hi Martin,

Sorry for the inconvenience. I will make sure this doesn't happen again.

-Chandrakanth Patil

-----Original Message-----
From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
Sent: Tuesday, May 12, 2020 9:19 AM
To: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Cc: linux-scsi@vger.kernel.org; kashyap.desai@broadcom.com;
sumit.saxena@broadcom.com; kiran-kumar.kasturi@broadcom.com;
sankar.patra@broadcom.com; sasikumar.pc@broadcom.com;
shivasharan.srikanteshwara@broadcom.com; anand.lodnoor@broadcom.com
Subject: Re: [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1


Hi Chandrakanth!

> This patchset contains few critical driver fixes.
>
> Chandrakanth Patil (5):
>   megaraid_sas: Limit device qd to controller qd when device qd is
>     greater than controller qd
>   megaraid_sas: Remove IO buffer hole detection logic
>   megaraid_sas: Replace undefined MFI_BIG_ENDIAN macro with
>     __BIG_ENDIAN_BITFIELD macro
>   megaraid_sas: TM command refire leads to controller firmware crash
>   megaraid_sas: Update driver version to 07.714.04.00-rc1

The threading was messed up in this series and both patchwork and b4
failed to grok it as a single patch set. It looks like your mail system
somehow broke it up into multiple submissions, each with their own
threading and cover letter.

Also, several patches had incorrect attribution. If a patch was not
authored by you it needs to have a From: identifying the original author
(Sumit, Kashyap, etc.) as identified in the first Signed-off-by: tag.

I fixed things up and applied to 5.8/scsi-queue. But please look into what
went wrong when mailing this series. While I can edit my way out of
incorrectly threaded submissions, the build robots and code checkers can
get stumped when something is broken up. And therefore there is a chance
that the patches didn't get full build and code analysis coverage.

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-05-13 21:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  8:38 [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Chandrakanth Patil
2020-05-08  8:38 ` [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd Chandrakanth Patil
2020-05-13  6:20   ` Hannes Reinecke
2020-05-08  8:38 ` [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic Chandrakanth Patil
2020-05-13  6:21   ` Hannes Reinecke
2020-05-12  3:48 ` [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1 Martin K. Petersen
2020-05-13 21:38   ` Chandrakanth Patil

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.