megaraid_sas : Code optimization and refactoring
Subsystems (2)
PATCH 1/5 megaraid_sas : Code optimization and refactoring
This patch has code optimization and refactoring in below areas-
1) Created separate functions for sysPD IOs and non Read Write LDIOs.
2) Added function for refiring MFI commands in controller reset path.
3) Enabling interrupt immediately after adapter's initialization.
4) Added function for setting up IRQs.
5) Modified few prints for better logging.
6) Modified few macros not to pass unused parameters.
7) Move internal commands and SCSI commands reservation in adapter's sepcific functions.
--- drivers/scsi/megaraid/megaraid_sas.h | 10 +- drivers/scsi/megaraid/megaraid_sas_base.c | 292 ++++++++++++------------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 316 +++++++++++++++------------ 3 files changed, 321 insertions(+), 297 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +7 -3
@@ -1864,9 +1864,13 @@ struct megasas_instance_template {#define MEGASAS_IS_LOGICAL (scp) \ (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1 -#define MEGASAS_DEV_INDEX (inst, scp) \ - ((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \ - scp->device->id +#define MEGASAS_DEV_INDEX (scp) \ + (((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \ + scp->device->id) + +#define MEGASAS_PD_INDEX (scp) \ + ((scp->device->channel * MEGASAS_MAX_DEV_PER_CHANNEL) + \ + scp->device->id)struct megasas_cmd {
drivers/scsi/megaraid/megaraid_sas_base.c +137 -155
423 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.c +177 -139
423 lines not on this page · raw message
Signature · 1 line
1.7.1
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sumit" == <[email protected]> writes:
Sumit> This patch has code optimization and refactoring in below areas- Sumit> 1) Created separate functions for sysPD IOs and non Read Write Sumit> LDIOs. 2) Added function for refiring MFI commands in controller Sumit> reset path. 3) Enabling interrupt immediately after adapter's Sumit> initialization. 4) Added function for setting up IRQs. 5) Sumit> Modified few prints for better logging. 6) Modified few macros Sumit> not to pass unused parameters. 7) Move internal commands and Sumit> SCSI commands reservation in adapter's sepcific functions.
This needs to be 7 patches and not 1.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 20 lines
-----Original Message-----
From: Martin K. Petersen [mailto:[email protected]]
Sent: Wednesday, April 08, 2015 4:45 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/5]megaraid_sas: Code optimization and refactoringQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sumit" == <[email protected]> writes:
Sumit> This patch has code optimization and refactoring in below areas- Sumit> 1) Created separate functions for sysPD IOs and non Read Write Sumit> LDIOs. 2) Added function for refiring MFI commands in controller Sumit> reset path. 3) Enabling interrupt immediately after adapter's Sumit> initialization. 4) Added function for setting up IRQs. 5) Sumit> Modified few prints for better logging. 6) Modified few macros Sumit> not to pass unused parameters. 7) Move internal commands and Sumit> SCSI commands reservation in adapter's sepcific functions.
Quoted 1 line
This needs to be 7 patches and not 1.
Ok, I will spilt this patch in 7 patches. Do you have any feedback/comments for other patches of this series? IF you are ok with other patches, I will resend the series with patch#1 splitted in 7 patches and rest of the patches(2,3,4 and 5) will remain unchanged.
Quoted 3 lines
--
Martin K. Petersen Oracle Linux Engineering
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sumit" == Sumit Saxena <[email protected]> writes:
Sumit> Ok, I will spilt this patch in 7 patches. Do you have any Sumit> feedback/comments for other patches of this series? IF you are ok Sumit> with other patches, I will resend the series with patch#1 Sumit> splitted in 7 patches and rest of the patches(2,3,4 and 5) will Sumit> remain unchanged.
The other patches looked OK on their own. But it's probably best to repost the whole series since you'll need a review from at least one person other than me.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 11 lines · Martin K. Petersen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sumit" == Sumit Saxena <[email protected]> writes:
Sumit> Ok, I will spilt this patch in 7 patches. Do you have any Sumit> feedback/comments for other patches of this series? IF you are ok Sumit> with other patches, I will resend the series with patch#1 Sumit> splitted in 7 patches and rest of the
patches(2,3,4 and 5)will Sumit> remain unchanged.The other patches looked OK on their own. But it's probably best to repost the whole series since you'll need a review from at least one person other than me.
Please also include the sparse fixes I sent you a while ago in the repost.
Quoted 17 lines
-----Original Message-----
From: Christoph Hellwig [mailto:[email protected]]
Sent: Tuesday, April 14, 2015 11:27 AM
To: Martin K. Petersen
Cc: Sumit Saxena; [email protected]; [email protected]; [email protected]; [email protected]; Kashyap Desai
Subject: Re: [PATCH 1/5]megaraid_sas: Code optimization and refactoringQuoted 8 lines · Martin K. Petersen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sumit" == Sumit Saxena <[email protected]> writes:
Sumit> Ok, I will spilt this patch in 7 patches. Do you have any Sumit> feedback/comments for other patches of this series? IF you are Sumit> ok with other patches, I will resend the series with patch#1 Sumit> splitted in 7 patches and rest of the
patches(2,3,4 and 5)will Sumit> remain unchanged.
Quoted 5 lines
Quoted 3 lines
The other patches looked OK on their own. But it's probably best to repost the whole series since you'll need a review from at least one person other than me.
Please also include the sparse fixes I sent you a while ago in the
repost.
I have resent this patch series with sparse fixes sent by you.