提交 be26374b 编写于 作者: S Sumit.Saxena@lsi.com 提交者: James Bottomley

[SCSI] megaraid_sas: Big endian code related fixes

Signed-off-by: NSumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 cfbe7554
...@@ -1347,9 +1347,15 @@ struct megasas_cmd; ...@@ -1347,9 +1347,15 @@ struct megasas_cmd;
union megasas_evt_class_locale { union megasas_evt_class_locale {
struct { struct {
#ifndef __BIG_ENDIAN_BITFIELD
u16 locale; u16 locale;
u8 reserved; u8 reserved;
s8 class; s8 class;
#else
s8 class;
u8 reserved;
u16 locale;
#endif
} __attribute__ ((packed)) members; } __attribute__ ((packed)) members;
u32 word; u32 word;
...@@ -1728,7 +1734,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -1728,7 +1734,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
struct IO_REQUEST_INFO *io_info, struct IO_REQUEST_INFO *io_info,
struct RAID_CONTEXT *pRAID_Context, struct RAID_CONTEXT *pRAID_Context,
struct MR_FW_RAID_MAP_ALL *map, u8 **raidLUN); struct MR_FW_RAID_MAP_ALL *map, u8 **raidLUN);
u16 MR_TargetIdToLdGet(u32 ldTgtId, struct MR_FW_RAID_MAP_ALL *map); u8 MR_TargetIdToLdGet(u32 ldTgtId, struct MR_FW_RAID_MAP_ALL *map);
struct MR_LD_RAID *MR_LdRaidGet(u32 ld, struct MR_FW_RAID_MAP_ALL *map); struct MR_LD_RAID *MR_LdRaidGet(u32 ld, struct MR_FW_RAID_MAP_ALL *map);
u16 MR_ArPdGet(u32 ar, u32 arm, struct MR_FW_RAID_MAP_ALL *map); u16 MR_ArPdGet(u32 ar, u32 arm, struct MR_FW_RAID_MAP_ALL *map);
u16 MR_LdSpanArrayGet(u32 ld, u32 span, struct MR_FW_RAID_MAP_ALL *map); u16 MR_LdSpanArrayGet(u32 ld, u32 span, struct MR_FW_RAID_MAP_ALL *map);
......
...@@ -143,12 +143,12 @@ u16 MR_PdDevHandleGet(u32 pd, struct MR_FW_RAID_MAP_ALL *map) ...@@ -143,12 +143,12 @@ u16 MR_PdDevHandleGet(u32 pd, struct MR_FW_RAID_MAP_ALL *map)
u16 MR_GetLDTgtId(u32 ld, struct MR_FW_RAID_MAP_ALL *map) u16 MR_GetLDTgtId(u32 ld, struct MR_FW_RAID_MAP_ALL *map)
{ {
return map->raidMap.ldSpanMap[ld].ldRaid.targetId; return le16_to_cpu(map->raidMap.ldSpanMap[ld].ldRaid.targetId);
} }
u16 MR_TargetIdToLdGet(u32 ldTgtId, struct MR_FW_RAID_MAP_ALL *map) u8 MR_TargetIdToLdGet(u32 ldTgtId, struct MR_FW_RAID_MAP_ALL *map)
{ {
return le16_to_cpu(map->raidMap.ldTgtIdToLd[ldTgtId]); return map->raidMap.ldTgtIdToLd[ldTgtId];
} }
static struct MR_LD_SPAN *MR_LdSpanPtrGet(u32 ld, u32 span, static struct MR_LD_SPAN *MR_LdSpanPtrGet(u32 ld, u32 span,
......
...@@ -1607,8 +1607,8 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance, ...@@ -1607,8 +1607,8 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance,
MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT; MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT;
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER) || if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER) ||
(instance->pdev->device == PCI_DEVICE_ID_LSI_FURY)) (instance->pdev->device == PCI_DEVICE_ID_LSI_FURY))
io_request->IoFlags |= io_request->IoFlags |= cpu_to_le16(
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH; MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH);
cmd->request_desc->SCSIIO.RequestFlags = cmd->request_desc->SCSIIO.RequestFlags =
(MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY << (MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY <<
MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
...@@ -2425,7 +2425,7 @@ int megasas_reset_fusion(struct Scsi_Host *shost) ...@@ -2425,7 +2425,7 @@ int megasas_reset_fusion(struct Scsi_Host *shost)
instance-> instance->
cmd_list[cmd_fusion->sync_cmd_idx]; cmd_list[cmd_fusion->sync_cmd_idx];
if (cmd_mfi->frame->dcmd.opcode == if (cmd_mfi->frame->dcmd.opcode ==
MR_DCMD_LD_MAP_GET_INFO) { cpu_to_le32(MR_DCMD_LD_MAP_GET_INFO)) {
megasas_return_cmd(instance, megasas_return_cmd(instance,
cmd_mfi); cmd_mfi);
megasas_return_cmd_fusion( megasas_return_cmd_fusion(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册