summaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid/megaraid_sas_fp.c
diff options
context:
space:
mode:
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>2017-02-10 11:59:21 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-02-13 15:26:22 +0300
commita174118b7a97c52c3c3a4f1b8eee594502a55381 (patch)
treea213d4e8a9fb6b1bdfd5e198ff49f5d3328f4d00 /drivers/scsi/megaraid/megaraid_sas_fp.c
parentff96f9251768f3fe1b4cd6f48f4021b3a1be269b (diff)
downloadlinux-a174118b7a97c52c3c3a4f1b8eee594502a55381.tar.xz
scsi: megaraid_sas: big endian support changes
Fix endiannes fixes for Ventura specific. Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_fp.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index 9d5d4851c0c4..68582d9f9e45 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -210,7 +210,7 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
le32_to_cpu(fw_map_dyn->desc_table_size),
le32_to_cpu(fw_map_dyn->desc_table_num_elements));
dev_dbg(&instance->pdev->dev, "drv map %p ldCount %d\n",
- drv_map, fw_map_dyn->ld_count);
+ drv_map, le16_to_cpu(fw_map_dyn->ld_count));
#endif
desc_table =
(struct MR_RAID_MAP_DESC_TABLE *)((void *)fw_map_dyn + le32_to_cpu(fw_map_dyn->desc_table_offset));
@@ -222,7 +222,8 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
pDrvRaidMap->ldCount = (__le16)cpu_to_le16(ld_count);
pDrvRaidMap->fpPdIoTimeoutSec =
fw_map_dyn->fp_pd_io_timeout_sec;
- pDrvRaidMap->totalSize = sizeof(struct MR_DRV_RAID_MAP_ALL);
+ pDrvRaidMap->totalSize =
+ cpu_to_le32(sizeof(struct MR_DRV_RAID_MAP_ALL));
/* point to actual data starting point*/
raid_map_data = (void *)fw_map_dyn +
le32_to_cpu(fw_map_dyn->desc_table_offset) +
@@ -234,11 +235,11 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
dev_dbg(&instance->pdev->dev, "desc table %p\n",
desc_table);
dev_dbg(&instance->pdev->dev, "raidmap type %d, raidmapOffset 0x%x\n",
- desc_table->raid_map_desc_type,
- desc_table->raid_map_desc_offset);
+ le32_to_cpu(desc_table->raid_map_desc_type),
+ le32_to_cpu(desc_table->raid_map_desc_offset));
dev_dbg(&instance->pdev->dev, "raid map number of elements 0%x, raidmapsize 0x%x\n",
- desc_table->raid_map_desc_elements,
- desc_table->raid_map_desc_buffer_size);
+ le32_to_cpu(desc_table->raid_map_desc_elements),
+ le32_to_cpu(desc_table->raid_map_desc_buffer_size));
#endif
switch (le32_to_cpu(desc_table->raid_map_desc_type)) {
case RAID_MAP_DESC_TYPE_DEVHDL_INFO:
@@ -263,7 +264,7 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
#endif
for (j = 0; j < le32_to_cpu(desc_table->raid_map_desc_elements); j++) {
pDrvRaidMap->ldTgtIdToLd[j] =
- fw_map_dyn->ld_tgt_id_to_ld[j];
+ le16_to_cpu(fw_map_dyn->ld_tgt_id_to_ld[j]);
#if VD_EXT_DEBUG
dev_dbg(&instance->pdev->dev, " %d drv ldTgtIdToLd %d\n",
j, pDrvRaidMap->ldTgtIdToLd[j]);