From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Sumit.Saxena@avagotech.com
Cc: linux-scsi@vger.kernel.org, thenzl@redhat.com,
martin.petersen@oracle.com, hch@infradead.org,
kashyap.desai@avagotech.com
Subject: Re: [PATCH v3 17/18] megaraid_sas : fix megasas_fire_cmd_fusion calling convention
Date: Mon, 18 May 2015 23:22:58 -0700 [thread overview]
Message-ID: <1432016578.4337.62.camel@HansenPartnership.com> (raw)
In-Reply-To: <201504231106.t3NB6PX8030941@palmhbs0.lsi.com>
On Thu, 2015-04-23 at 16:34 +0530, Sumit.Saxena@avagotech.com wrote:
> The fusion HBAs don't really use the instance template like the other
> variants, as it branches off at a much higher level. So instead of
> trying to squeeze megasas_fire_cmd_fusion into the wrong calling
> convention call it locally with argument data types that match what
> is passed.
>
> From: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> Reviewed-by: Tomas Henzl <thenzl@redhat.com>
>
> ---
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 72 +++++++++++---------------
> 1 files changed, 31 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> index 487cd34..826ba1c 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> @@ -182,6 +182,31 @@ inline void megasas_return_cmd_fusion(struct megasas_instance *instance,
> }
>
> /**
> + * megasas_fire_cmd_fusion - Sends command to the FW
> + */
> +static void
> +megasas_fire_cmd_fusion(struct megasas_instance *instance,
> + union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc)
> +{
> +#if defined(writeq) && defined(CONFIG_64BIT)
> + u64 req_data = (((u64)le32_to_cpu(req_desc->u.high) << 32) |
> + le32_to_cpu(req_desc->u.low));
> +
> + writeq(req_data, &instance->reg_set->inbound_low_queue_port);
> +#else
> + unsigned long flags;
> +
> + spin_lock_irqsave(&instance->hba_lock, flags);
> + writel(le32_to_cpu(req_desc->u.low),
> + &instance->reg_set->inbound_low_queue_port);
> + writel(le32_to_cpu(req_desc.u.high),
^^^
Compile the bloody code. This should be req_desc->u.high
I fixed it but I expect you to submit better code in future.
James
next prev parent reply other threads:[~2015-05-19 6:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 11:04 [PATCH v3 17/18] megaraid_sas : fix megasas_fire_cmd_fusion calling convention Sumit.Saxena
2015-05-19 6:22 ` James Bottomley [this message]
2015-05-19 7:31 ` 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=1432016578.4337.62.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=Sumit.Saxena@avagotech.com \
--cc=hch@infradead.org \
--cc=kashyap.desai@avagotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=thenzl@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox