megaraid_sas: driver updates for 07.714.04.00-rc1
Subsystems (2)
Chandrakanth Patil
maintainercover megaraid_sas: driver updates for 07.714.04.00-rc1
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(-)
Signature · 1 line
2.9.5
Chandrakanth Patil
maintainerPATCH 1/5 megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd
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.
--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +2 -3
@@ -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 )
Signature · 1 line
2.9.5
Re: [PATCH 1/5] megaraid_sas: Limit device qd to controller qd when device qd is greater than controller qd
Quoted 18 lines · 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 <[email protected]>Signed-off-by Chandrakanth Patil <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/scsi/megaraid/megaraid_sas_base.c +0
-0@@ -1982,9 +1982,8 @@ static void megasas_set_fw_assisted_qd(struct scsi_device *sdev,
drivers/scsi/megaraid/megaraid_sas_base.c static void megasas_set_fw_assisted_qd(struct scsi_device *sdev, · line 1989
Quoted 10 lines
drivers/scsi/megaraid/megaraid_sas_base.c +2
-3if (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 )
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Teamlead Storage & Networking [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Chandrakanth Patil
maintainerPATCH 2/5 megaraid_sas: Remove IO buffer hole detection logic
In reply to Chandrakanth PatilAs 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.
--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 58 ----------------------------- 1 file changed, 58 deletions(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +0 -58
@@ -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; }
Signature · 1 line
2.9.5
Re: [PATCH 2/5] megaraid_sas: Remove IO buffer hole detection logic
Quoted 10 lines · Chandrakanth Patil
As
blk_queue_virt_boundary()API inslave_configureensures 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 <[email protected]>Signed-off-by Chandrakanth Patil <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 58 ----------------------------- 1 file changed, 58 deletions(-)
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Teamlead Storage & Networking [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Hi Chandrakanth!
Quoted 10 lines
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 undefinedMFI_BIG_ENDIANmacro with
__BIG_ENDIAN_BITFIELDmacro
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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Chandrakanth Patil
maintainerHi Martin,
Sorry for the inconvenience. I will make sure this doesn't happen again.
-Chandrakanth Patil
-----Original Message-----
From: Martin K. Petersen [mailto:[email protected]]
Sent: Tuesday, May 12, 2020 9:19 AM
To: Chandrakanth Patil <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 0/5] megaraid_sas: driver updates for 07.714.04.00-rc1
Hi Chandrakanth!
Quoted 10 lines
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 undefinedMFI_BIG_ENDIANmacro with
__BIG_ENDIAN_BITFIELDmacro
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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering