linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sumit Saxena <sumit.saxena@avagotech.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi@vger.kernel.org, stable@vger.kernel.org,
	martin.petersen@oracle.com, jbottomley@parallels.com,
	Kashyap Desai <kashyap.desai@avagotech.com>
Subject: RE: [PATCH 1/8] megaraid_sas : Endianness related bug fixes and code optimization
Date: Thu, 8 Jan 2015 19:13:18 +0530	[thread overview]
Message-ID: <a24e6f2fbad0983e24fc583d013b19a8@mail.gmail.com> (raw)

>-----Original Message-----
>From: Christoph Hellwig [mailto:hch@infradead.org]
>Sent: Thursday, January 08, 2015 4:09 PM
>To: Sumit.Saxena@avagotech.com
>Cc: linux-scsi@vger.kernel.org; stable@vger.kernel.org;
>martin.petersen@oracle.com; hch@infradead.org;
>jbottomley@parallels.com; kashyap.desai@avagotech.com
>Subject: Re: [PATCH 1/8] megaraid_sas : Endianness related bug fixes and
>code optimization
>
>> -#if   defined(__BIG_ENDIAN_BITFIELD)
>> -	u32     MessageAddress1:24; /* bits 31:8*/
>> -	u32     RequestFlags:8;
>> -#else
>>  	u32     RequestFlags:8;
>> -	u32     MessageAddress1:24; /* bits 31:8*/
>> -#endif
>> -	u32     MessageAddress2;      /* bits 61:32 */
>> +	u32     MessageAddress1:24;
>> +	u32     MessageAddress2;
>
>Doesn't this break architectures that set __BIG_ENDIAN_BITFIELD?
Earlier code create the req_desc in machine format and later we convert it
into LE format (as FW wants the data In LE format). Now with this change
we just simplify code, which will first convert req_desc to LE format and
set the MessageAddres1 and RequestFlags  in LE format. Eventually this
will pass same address/flag frame as earlier code does, but giving some
readability.

We have tested this on PPC and this works fine. Actually, this MFA frame
will be fired only at driver load time(for firmware initialization), so if
this setting is not appropriate FW init will fail. We do not refer MFIAIo
anywhere else.

Thanks,
Sumit

             reply	other threads:[~2015-01-08 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 13:43 Sumit Saxena [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-01-05 14:35 [PATCH 1/8] megaraid_sas : Endianness related bug fixes and code optimization Sumit.Saxena
2015-01-07  0:24 ` Martin K. Petersen
2015-01-08 10:38 ` Christoph Hellwig
2015-01-08 15:15   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a24e6f2fbad0983e24fc583d013b19a8@mail.gmail.com \
    --to=sumit.saxena@avagotech.com \
    --cc=hch@infradead.org \
    --cc=jbottomley@parallels.com \
    --cc=kashyap.desai@avagotech.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).