RE: [PATCH v3 17/18] megaraid_sas : fix megasas_fire_cmd_fusion calling convention

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: James Bottomley [mailto:James.Bottomley@xxxxxxxxxxxxxxxxxxxxx]
>Sent: Tuesday, May 19, 2015 11:53 AM
>To: Sumit.Saxena@xxxxxxxxxxxxx
>Cc: linux-scsi@xxxxxxxxxxxxxxx; thenzl@xxxxxxxxxx;
>martin.petersen@xxxxxxxxxx; hch@xxxxxxxxxxxxx;
>kashyap.desai@xxxxxxxxxxxxx
>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@xxxxxxxxxxxxx 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@xxxxxx>
>> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
>> Signed-off-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxxx>
>> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
>> Reviewed-by: Tomas Henzl <thenzl@xxxxxxxxxx>
>>
>> ---
>>  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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux