Re: [PATCH 1/8] megaraid_sas : Endianness related bug fixes and code optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Christoph" == Christoph Hellwig <hch@xxxxxxxxxxxxx> writes:

> -#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;

Christoph> Doesn't this break architectures that set
Christoph> __BIG_ENDIAN_BITFIELD?

We went back and forth a few times in debugging this issue. This
particular struct is always little endian and consists of an 8-bit LSB
flags field plus a 56-bit pointer.

I am not a fan of wedging these values into a u32 universe (which also
causes grief when the struct is being filled out). But the Avago folks
did it this way because they want to keep things in sync with their
firmware.

In any case the code works fine on big endian with this patch in place.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux