From: Sumit Saxena <sumit.saxena@avagotech.com>
To: Christoph Hellwig <hch@lst.de>,
Kashyap Desai <kashyap.desai@avagotech.com>
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Subject: RE: [PATCH 04/10] megaraid_sas: add endianess conversions for all ones
Date: Tue, 13 Jan 2015 12:51:40 +0530 [thread overview]
Message-ID: <c414febe61c4e43bb273923286ccf6e8@mail.gmail.com> (raw)
In-Reply-To: <1420909883-19479-5-git-send-email-hch@lst.de>
>-----Original Message-----
>From: Christoph Hellwig [mailto:hch@lst.de]
>Sent: Saturday, January 10, 2015 10:41 PM
>To: Sumit.Saxena@avagotech.com; kashyap.desai@avagotech.com
>Cc: martin.petersen@oracle.com; linux-scsi@vger.kernel.org
>Subject: [PATCH 04/10] megaraid_sas: add endianess conversions for all
ones
>
>Add noop conversions for all ones to make sparse happy.
>
>Signed-off-by: Christoph Hellwig <hch@lst.de>
>---
> drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
> drivers/scsi/megaraid/megaraid_sas_fp.c | 7 ++++---
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 +++++----
> 3 files changed, 10 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
>b/drivers/scsi/megaraid/megaraid_sas_base.c
>index cb7d0c4..a6556ea 100644
>--- a/drivers/scsi/megaraid/megaraid_sas_base.c
>+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
>@@ -1232,7 +1232,7 @@ megasas_build_dcdb(struct megasas_instance
>*instance, struct scsi_cmnd *scp,
> */
> if (scp->device->type == TYPE_TAPE) {
> if ((scp->request->timeout / HZ) > 0xFFFF)
>- pthru->timeout = 0xFFFF;
>+ pthru->timeout = cpu_to_le16(0xFFFF);
> else
> pthru->timeout = cpu_to_le16(scp->request-
>>timeout / HZ);
> }
>diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c
>b/drivers/scsi/megaraid/megaraid_sas_fp.c
>index e9138a2..2001ffb 100644
>--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
>+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
>@@ -769,7 +769,7 @@ static u8 mr_spanset_get_phy_params(struct
>megasas_instance *instance, u32 ld,
> if (pd != MR_PD_INVALID)
> *pDevHandle = MR_PdDevHandleGet(pd, map);
> else {
>- *pDevHandle = MR_PD_INVALID;
>+ *pDevHandle = cpu_to_le16(MR_PD_INVALID);
> if ((raid->level >= 5) &&
> (!do_invader || (do_invader &&
> (raid->regTypeReqOnRead !=
>REGION_TYPE_UNUSED)))) @@ -864,7 +864,8 @@ u8
>MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
> /* Get dev handle from Pd. */
> *pDevHandle = MR_PdDevHandleGet(pd, map);
> else {
>- *pDevHandle = MR_PD_INVALID; /* set dev handle as invalid.
>*/
>+ /* set dev handle as invalid. */
>+ *pDevHandle = cpu_to_le16(MR_PD_INVALID);
> if ((raid->level >= 5) &&
> (!do_invader || (do_invader &&
> (raid->regTypeReqOnRead !=
>REGION_TYPE_UNUSED)))) @@ -1109,7 +1110,7 @@
>MR_BuildRaidContext(struct megasas_instance *instance,
> ref_in_start_stripe, io_info,
> pRAID_Context, map);
> /* If IO on an invalid Pd, then FP is not possible.*/
>- if (io_info->devHandle == MR_PD_INVALID)
>+ if (io_info->devHandle == cpu_to_le16(MR_PD_INVALID))
> io_info->fpOkForIo = FALSE;
> return retval;
> } else if (isRead) {
>diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
>b/drivers/scsi/megaraid/megaraid_sas_fusion.c
>index 983635f..82439f9 100644
>--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
>+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
>@@ -464,7 +464,7 @@ megasas_alloc_cmds_fusion(struct megasas_instance
>*instance)
>
> reply_desc = fusion->reply_frames_desc;
> for (i = 0; i < fusion->reply_q_depth * count; i++, reply_desc++)
>- reply_desc->Words = ULLONG_MAX;
>+ reply_desc->Words = cpu_to_le64(ULLONG_MAX);
>
> io_frames_sz = fusion->io_frames_alloc_sz;
>
>@@ -1995,7 +1995,8 @@ complete_cmd_fusion(struct megasas_instance
>*instance, u32 MSIxIndex)
>
> num_completed = 0;
>
>- while ((d_val.u.low != UINT_MAX) && (d_val.u.high != UINT_MAX)) {
>+ while (d_val.u.low != cpu_to_le32(UINT_MAX) &&
>+ d_val.u.high != cpu_to_le32(UINT_MAX)) {
> smid = le16_to_cpu(reply_desc->SMID);
>
> cmd_fusion = fusion->cmd_list[smid - 1]; @@ -2063,7
+2064,7
>@@ complete_cmd_fusion(struct megasas_instance *instance, u32
>MSIxIndex)
> fusion->reply_q_depth)
> fusion->last_reply_idx[MSIxIndex] = 0;
>
>- desc->Words = ULLONG_MAX;
>+ desc->Words = cpu_to_le64(ULLONG_MAX);
> num_completed++;
> threshold_reply_count++;
>
>@@ -2505,7 +2506,7 @@ void megasas_reset_reply_desc(struct
>megasas_instance *instance)
> fusion->last_reply_idx[i] = 0;
> reply_desc = fusion->reply_frames_desc;
> for (i = 0 ; i < fusion->reply_q_depth * count; i++, reply_desc++)
>- reply_desc->Words = ULLONG_MAX;
>+ reply_desc->Words = cpu_to_le64(ULLONG_MAX);
> }
>
> /* Check for a second path that is currently UP */
Acked-by: Sumit Saxena <sumit.saxena@avagotech.com>
>--
>1.9.1
next prev parent reply other threads:[~2015-01-13 7:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-10 17:11 megaraid_sas: sparse annotations and endianess fixes Christoph Hellwig
2015-01-10 17:11 ` [PATCH 01/10] megaraid_sas: megasas_complete_outstanding_ioctls() can be static Christoph Hellwig
2015-01-13 5:38 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 02/10] megaraid_sas: add missing __iomem annotations Christoph Hellwig
2015-01-13 7:05 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 03/10] megaraid_sas: add endianess annotations Christoph Hellwig
2015-01-13 7:17 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 04/10] megaraid_sas: add endianess conversions for all ones Christoph Hellwig
2015-01-13 7:21 ` Sumit Saxena [this message]
2015-01-10 17:11 ` [PATCH 05/10] megaraid_sas: move endianess conversion into caller of megasas_get_seq_num Christoph Hellwig
2015-01-13 7:23 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 06/10] megaraid_sas: bytewise or should be done on native endian variables Christoph Hellwig
2015-01-14 11:01 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 07/10] megaraid_sas: add missing byte swaps to the sriov code Christoph Hellwig
2015-01-14 11:02 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 08/10] megaraid_sas: fix megasas_fire_cmd_fusion calling convention Christoph Hellwig
2015-01-14 11:05 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 09/10] megaraid_sas: swap whole register in megasas_register_aen Christoph Hellwig
2015-01-14 11:07 ` Sumit Saxena
2015-01-10 17:11 ` [PATCH 10/10] megaraid_sas: fix endianess for the crash dump state support Christoph Hellwig
2015-01-14 12:01 ` Sumit Saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c414febe61c4e43bb273923286ccf6e8@mail.gmail.com \
--to=sumit.saxena@avagotech.com \
--cc=hch@lst.de \
--cc=kashyap.desai@avagotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.