megaraid_sas : swap whole register in megasas_register_aen
Subsystems (2)
PATCH RESEND 18/18 megaraid_sas : swap whole register in megasas_register_aen
Swap the whole 32 bits we read from the hardware instead of swapping just the 16bits we care about in place later.
--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +3 -2
@@ -4923,8 +4923,9 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num,if (instance->aen_cmd) { - prev_aen.word = instance->aen_cmd->frame->dcmd.mbox.w[1 ]; - prev_aen.members.locale =le16_to_cpu (prev_aen.members.locale); + prev_aen.word = +le32_to_cpu (instance->aen_cmd->frame->dcmd.mbox.w[1 ]); + prev_aen.members.locale = prev_aen.members.locale;/* * A class whose enum value is smaller is inclusive of all
Signature · 1 line
1.7.1
Quoted 15 lines · On 04/20/2015 02:35 PM, [email protected] wrote:
Swap the whole 32 bits we read from the hardware instead of swapping just the 16bits we care about in place later.
Signed-off-by Christoph Hellwig <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/scsi/megaraid/megaraid_sas_base.c +0
-0@@ -4923,8 +4923,9 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num,
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance *instance, u32 seq_num, · line 4931
Quoted 10 lines
drivers/scsi/megaraid/megaraid_sas_base.c +3
-2if (instance->aen_cmd) { - prev_aen.word = instance->aen_cmd->frame->dcmd.mbox.w[1 ]; - prev_aen.members.locale =le16_to_cpu (prev_aen.members.locale); + prev_aen.word = +le32_to_cpu (instance->aen_cmd->frame->dcmd.mbox.w[1 ]); + prev_aen.members.locale = prev_aen.members.locale;/* * A class whose enum value is smaller is inclusive of all
Cheers,
Hannes
Signature · 8 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 13 lines · On 04/20/2015 02:35 PM, [email protected] wrote:
Swap the whole 32 bits we read from the hardware instead of swapping just the 16bits we care about in place later.
Signed-off-by Christoph Hellwig <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/scsi/megaraid/megaraid_sas_base.c +0
-0
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance *instance, u32 seq_num, · line 4928
Quoted 8 lines
drivers/scsi/megaraid/megaraid_sas_base.c +3
-2@@ -4923,8 +4923,9 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num,if (instance->aen_cmd) { - prev_aen.word = instance->aen_cmd->frame->dcmd.mbox.w[1 ]; - prev_aen.members.locale =le16_to_cpu (prev_aen.members.locale); + prev_aen.word = +le32_to_cpu (instance->aen_cmd->frame->dcmd.mbox.w[1 ]); + prev_aen.members.locale = prev_aen.members.locale;
This^ looks odd, do we need the last assignment?
Tomas
Quoted 3 lines
drivers/scsi/megaraid/megaraid_sas_base.c +0
-0/* * A class whose enum value is smaller is inclusive of all
Quoted 17 lines · Tomas Henzl
Quoted 16 lines · On 04/20/2015 02:35 PM, [email protected] wrote:
Swap the whole 32 bits we read from the hardware instead of swapping just the 16bits we care about in place later.
Signed-off-by Christoph Hellwig <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/scsi/megaraid/megaraid_sas_base.c +0
-0@@ -4923,8 +4923,9 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num,if (instance->aen_cmd) {
Quoted 7 lines
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance *instance, u32 seq_num, · line 4928
Quoted 5 lines
drivers/scsi/megaraid/megaraid_sas_base.c +3
-2- prev_aen.word = instance->aen_cmd->frame->dcmd.mbox.w[1 ]; - prev_aen.members.locale =le16_to_cpu (prev_aen.members.locale); + prev_aen.word = +le32_to_cpu (instance->aen_cmd->frame->dcmd.mbox.w[1 ]); + prev_aen.members.locale = prev_aen.members.locale;This^ looks odd, do we need the last assignment?
Obviously not, I was just in mechnical mode when doing this.
It can be dropped for the repost.
Quoted 37 lines
-----Original Message-----
From: Christoph Hellwig [mailto:[email protected]]
Sent: Tuesday, April 21, 2015 6:07 PM
To: Tomas Henzl
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH RESEND 18/18]megaraid_sas: swap whole register inmegasas_register_aenQuoted 17 lines · Tomas Henzl
Quoted 16 lines · On 04/20/2015 02:35 PM, [email protected] wrote:
Swap the whole 32 bits we read from the hardware instead of swapping just the 16bits we care about in place later.
Signed-off-by Christoph Hellwig <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/scsi/megaraid/megaraid_sas_base.c +0
-0@@ -4923,8 +4923,9 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num,Quoted 5 lines
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance *instance, u32 seq_num,
Quoted 3 lines
drivers/scsi/megaraid/megaraid_sas_base.c +0
-1if (instance->aen_cmd) { - prev_aen.word = instance->aen_cmd->frame-dcmd.mbox.w[1];
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance · line 4928
Quoted 1 line
drivers/scsi/megaraid/megaraid_sas_base.c +0
-1- prev_aen.members.locale =
le16_to_cpu(prev_aen.members.locale);Quoted 3 lines
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance · line 4928
Quoted 2 lines
drivers/scsi/megaraid/megaraid_sas_base.c +2
-0+ prev_aen.word = + le32_to_cpu(instance->aen_cmd->frame-dcmd.mbox.w[1]);
Quoted 7 lines
Quoted 3 lines
drivers/scsi/megaraid/megaraid_sas_base.c megasas_register_aen(struct megasas_instance *instance, u32 seq_num, · line 4928
Quoted 1 line
drivers/scsi/megaraid/megaraid_sas_base.c +1
-0+ prev_aen.members.locale = prev_aen.members.locale;This^ looks odd, do we need the last assignment?
Obviously not, I was just in mechnical mode when doing this.
It can be dropped for the repost.
Will drop it in resubmission of the patch.