scsi: megaraid_sas: Replace undefined MFI_BIG_ENDIAN macro with __BIG_ENDIAN_BITFIELD...
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 8 May 2020 08:51:30 +0000 (14:21 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 12 May 2020 03:06:24 +0000 (23:06 -0400)
MFI_BIG_ENDIAN macro used in drivers structure bitfield to check the CPU
big endianness is undefined which would break the code on big endian
machine. __BIG_ENDIAN_BITFIELD kernel macro should be used in places of
MFI_BIG_ENDIAN macro.

Link: https://lore.kernel.org/r/20200508085130.23339-1-chandrakanth.patil@broadcom.com
Fixes: a7faf81d7858 ("scsi: megaraid_sas: Set no_write_same only for Virtual Disk")
Cc: <stable@vger.kernel.org> # v5.6+
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas.h
drivers/scsi/megaraid/megaraid_sas_fusion.h

index 83d8c4cb1ad5ffadfc41a1b310dd2e00fdab4e3b..98827363bc49ba908ba36509bf50e76f6a3d0788 100644 (file)
@@ -511,7 +511,7 @@ union MR_PROGRESS {
  */
 struct MR_PD_PROGRESS {
        struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
                u32     rbld:1;
                u32     patrol:1;
                u32     clear:1;
@@ -537,7 +537,7 @@ struct MR_PD_PROGRESS {
        };
 
        struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
                u32     rbld:1;
                u32     patrol:1;
                u32     clear:1;
index d57ecc7f88d8afec2473e7c1374d5d1bfb10fdd4..30de4b01f7035be32e961453aeaf7e6d51bb19b2 100644 (file)
@@ -774,7 +774,7 @@ struct MR_SPAN_BLOCK_INFO {
 struct MR_CPU_AFFINITY_MASK {
        union {
                struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
                u8 hw_path:1;
                u8 cpu0:1;
                u8 cpu1:1;
@@ -866,7 +866,7 @@ struct MR_LD_RAID {
        __le16     seqNum;
 
 struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
        u32 ldSyncRequired:1;
        u32 regTypeReqOnReadIsValid:1;
        u32 isEPD:1;
@@ -889,7 +889,7 @@ struct {
        /* 0x30 - 0x33, Logical block size for the LD */
        u32 logical_block_length;
        struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
        /* 0x34, P_I_EXPONENT from READ CAPACITY 16 */
        u32 ld_pi_exp:4;
        /* 0x34, LOGICAL BLOCKS PER PHYSICAL