From: Sumit Saxena <sumit.saxena@avagotech.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: linux-scsi@vger.kernel.org, thenzl@redhat.com,
martin.petersen@oracle.com, hch@infradead.org,
Kashyap Desai <kashyap.desai@avagotech.com>
Subject: RE: [PATCH v3 17/18] megaraid_sas : fix megasas_fire_cmd_fusion calling convention
Date: Tue, 19 May 2015 13:01:04 +0530 [thread overview]
Message-ID: <aef53f6365d9b67ea035114567afa48a@mail.gmail.com> (raw)
In-Reply-To: <1432016578.4337.62.camel@HansenPartnership.com>
>-----Original Message-----
>From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
>Sent: Tuesday, May 19, 2015 11:53 AM
>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
>
>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.
I am really sorry for this. I compiled the driver at my setup but since this
code is inside conditional compilation and never get compiled. Code inside
"# if defined(writeq) && defined(CONFIG_64BIT)" was getting compiled and
this got missed.
I will take care of such stuff in future.
Thanks,
Sumit
>
>James
>
prev parent reply other threads:[~2015-05-19 7:31 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
2015-05-19 7:31 ` Sumit Saxena [this message]
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=aef53f6365d9b67ea035114567afa48a@mail.gmail.com \
--to=sumit.saxena@avagotech.com \
--cc=James.Bottomley@hansenpartnership.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 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.