[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A54D4229-0971-4325-8495-AF0AD6B06E38@xyratex.com>
Date: Wed, 7 Mar 2012 12:25:47 -0500
From: Mark Salyzyn <mark_salyzyn@...atex.com>
To: santosh prasad nayak <santoshprasadnayak@...il.com>
Cc: Mark Salyzyn <mark_salyzyn@...atex.com>, wharms@....de,
lindar_liu <lindar_liu@...sh.com>,
James Bottomley <JBottomley@...allels.com>,
linux-scsi <linux-scsi@...r.kernel.org>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Jack Wang <jack_wang@...sh.com>
Subject: Re: [PATCH] [SCSI] pm8001: fix endian issue with code optimization.
ACK
Sincerely -- Mark Salyzyn
On Mar 7, 2012, at 12:24 PM, santosh prasad nayak wrote:
> Following the are the changes as suggested by you. Please let me know
> if anymore changes are required
> so that I can send a formal patch for it. The below patch is just for
> review not a formal one.
>
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index 597593b..3976fab 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -3150,7 +3150,7 @@ mpi_fw_flash_update_resp(struct pm8001_hba_info
> *pm8001_ha, void *piomb)
> struct fw_control_ex fw_control_context;
> struct fw_flash_Update_resp *ppayload =
> (struct fw_flash_Update_resp *)(piomb + 4);
> - u32 tag = ppayload->tag;
> + u32 tag = le32_to_cpu(ppayload->tag);
> struct pm8001_ccb_info *ccb = &pm8001_ha->ccb_info[tag];
> status = le32_to_cpu(ppayload->status);
> memcpy(&fw_control_context,
> @@ -3496,8 +3496,8 @@ static int mpi_hw_event(struct pm8001_hba_info
> *pm8001_ha, void* piomb)
> */
> static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
> {
> - u32 pHeader = (u32)*(u32 *)piomb;
> - u8 opc = (u8)(pHeader & 0xFFF);
> + __le32 pHeader = (__le32)*(__le32 *)piomb;
> + u8 opc = (u8)((le32_to_cpu(pHeader)) & 0xFFF);
>
> PM8001_MSG_DBG(pm8001_ha, pm8001_printk("process_one_iomb:"));
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.h b/drivers/scsi/pm8001/pm8001_hwi.h
> index 1a4611e..d437309 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.h
> +++ b/drivers/scsi/pm8001/pm8001_hwi.h
> @@ -599,7 +599,7 @@ struct fw_flash_Update_req {
> *
> */
> struct fw_flash_Update_resp {
> - dma_addr_t tag;
> + __le32 tag;
> __le32 status;
> u32 reserved[13];
> } __attribute__((packed, aligned(4)));
>
>
>
>
>
> Regards
> Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists