]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
8e280a0e1989c062cf96138e4b8dfd065d3eb3ef
[thirdparty/kernel/stable-queue.git] /
1 From b9d5e3e7f370a817c742fb089ac1a86dfe8947dc Mon Sep 17 00:00:00 2001
2 From: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
3 Date: Fri, 8 May 2020 14:21:30 +0530
4 Subject: scsi: megaraid_sas: Replace undefined MFI_BIG_ENDIAN macro with __BIG_ENDIAN_BITFIELD macro
5
6 From: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
7
8 commit b9d5e3e7f370a817c742fb089ac1a86dfe8947dc upstream.
9
10 MFI_BIG_ENDIAN macro used in drivers structure bitfield to check the CPU
11 big endianness is undefined which would break the code on big endian
12 machine. __BIG_ENDIAN_BITFIELD kernel macro should be used in places of
13 MFI_BIG_ENDIAN macro.
14
15 Link: https://lore.kernel.org/r/20200508085130.23339-1-chandrakanth.patil@broadcom.com
16 Fixes: a7faf81d7858 ("scsi: megaraid_sas: Set no_write_same only for Virtual Disk")
17 Cc: <stable@vger.kernel.org> # v5.6+
18 Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
19 Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
20 Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/scsi/megaraid/megaraid_sas.h | 4 ++--
25 drivers/scsi/megaraid/megaraid_sas_fusion.h | 6 +++---
26 2 files changed, 5 insertions(+), 5 deletions(-)
27
28 --- a/drivers/scsi/megaraid/megaraid_sas.h
29 +++ b/drivers/scsi/megaraid/megaraid_sas.h
30 @@ -511,7 +511,7 @@ union MR_PROGRESS {
31 */
32 struct MR_PD_PROGRESS {
33 struct {
34 -#ifndef MFI_BIG_ENDIAN
35 +#ifndef __BIG_ENDIAN_BITFIELD
36 u32 rbld:1;
37 u32 patrol:1;
38 u32 clear:1;
39 @@ -537,7 +537,7 @@ struct MR_PD_PROGRESS {
40 };
41
42 struct {
43 -#ifndef MFI_BIG_ENDIAN
44 +#ifndef __BIG_ENDIAN_BITFIELD
45 u32 rbld:1;
46 u32 patrol:1;
47 u32 clear:1;
48 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
49 +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
50 @@ -774,7 +774,7 @@ struct MR_SPAN_BLOCK_INFO {
51 struct MR_CPU_AFFINITY_MASK {
52 union {
53 struct {
54 -#ifndef MFI_BIG_ENDIAN
55 +#ifndef __BIG_ENDIAN_BITFIELD
56 u8 hw_path:1;
57 u8 cpu0:1;
58 u8 cpu1:1;
59 @@ -866,7 +866,7 @@ struct MR_LD_RAID {
60 __le16 seqNum;
61
62 struct {
63 -#ifndef MFI_BIG_ENDIAN
64 +#ifndef __BIG_ENDIAN_BITFIELD
65 u32 ldSyncRequired:1;
66 u32 regTypeReqOnReadIsValid:1;
67 u32 isEPD:1;
68 @@ -889,7 +889,7 @@ struct {
69 /* 0x30 - 0x33, Logical block size for the LD */
70 u32 logical_block_length;
71 struct {
72 -#ifndef MFI_BIG_ENDIAN
73 +#ifndef __BIG_ENDIAN_BITFIELD
74 /* 0x34, P_I_EXPONENT from READ CAPACITY 16 */
75 u32 ld_pi_exp:4;
76 /* 0x34, LOGICAL BLOCKS PER PHYSICAL