Re: [PATCH 3/3] scsi: ufs: add support for query requests

2013-05-06 Thread merez
Tested-by: Maya Erez 

>>> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
>>> index 35faf24..82417d6 100644
>>> --- a/drivers/scsi/ufs/Kconfig
>>> +++ b/drivers/scsi/ufs/Kconfig
>>> @@ -35,6 +35,7 @@
>>>  config SCSI_UFSHCD
>>>   tristate "Universal Flash Storage Controller Driver Core"
>>>   depends on SCSI
>>> + default y
>>>   ---help---
>>>   This selects the support for UFS devices in Linux, say Y and make
>>> sure that you know the name of your UFS host adapter (the card
>>
>> I don't think you want to force this on in every configuration since
>> it's only appropriate to non server/desktop.  I stripped this hunk.
>>
>
> Hi James,
>
> Please apply the patch without the particular change or you can apply
> the latest patch sent by Dolev -
> http://marc.info/?l=linux-scsi&m=136774922024179&w=1.
>
> Thanks,
> Santosh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Maya Erez
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] scsi: ufs: add support for query requests

2013-05-05 Thread Santosh Y
>> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
>> index 35faf24..82417d6 100644
>> --- a/drivers/scsi/ufs/Kconfig
>> +++ b/drivers/scsi/ufs/Kconfig
>> @@ -35,6 +35,7 @@
>>  config SCSI_UFSHCD
>>   tristate "Universal Flash Storage Controller Driver Core"
>>   depends on SCSI
>> + default y
>>   ---help---
>>   This selects the support for UFS devices in Linux, say Y and make
>> sure that you know the name of your UFS host adapter (the card
>
> I don't think you want to force this on in every configuration since
> it's only appropriate to non server/desktop.  I stripped this hunk.
>

Hi James,

Please apply the patch without the particular change or you can apply
the latest patch sent by Dolev -
http://marc.info/?l=linux-scsi&m=136774922024179&w=1.

Thanks,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] scsi: ufs: add support for query requests

2013-05-05 Thread Dolev Raviv
Hi James,
I've noticed you haven't merged this patch.
To avoid further problems I resent a V5 to this patch removing the Kconfig
change.

Dolev

> On Thu, 2013-05-02 at 17:25 +0530, Santosh Y wrote:
>> From: Dolev Raviv 
>>
>> Add support for sending UFS query requests through tagged command
>> queuing. This design allows queuing query requests in any open slot
>> along with other SCSI commands. In this way there is no need to
>> save a slot in the requests queue and decrease its size.
>>
>> A query request is posing to a SCSI command to use native flow. But
>> unlike normal SCSI command flow, the data and response fields are
>> filled in UFS host data structure instead of passing as arguments
>> while queuing into SCSI mlqueue (mid-layer SCSI queue, the requests
>> from this queue are submitted to the device queue). As per specification
>> only one query request is allowed to be processed by device. Hence a
>> mutex lock for protecting data and response fields (hba->query.request
>> and
>> hba->query.response) needs to be held while query request is in
>> progress.
>>
>> The API for submitting a query request is ufs_query_request() in
>> ufshcd.c. This function is responsible for:
>> 1. Obtaining the SCSI device from the host
>> 2. Keeping the query mutex to prevent multiple queries
>> 3. Storing the required data for sending a query request in ufs_hba
>> 4. Queuing a SCSI vendor specific command to trigger a query request
>>in the UFS driver.
>>
>> The callers of ufs_query_request() are expected to fill the query
>> command data fields and are to provide an allocated response field
>> for the driver to fill response fields after request completion.
>>
>> The request and response upiu is extended in a union to enable using the
>> same data structure, both for command upiu and query request upiu.
>>
>> The query request flow is separated from the scsi command flow in:
>> 1. Preparing the request
>> 2. Validating response (error) codes
>> 3. Copying data (only used for descriptor read/write query requests)
>> 4. Copying response/sense
>>
>> Data error can't be handled in the scsi command native flow. Hence,
>> we pass the code as without a change back to the submitting layer.
>>
>> UPIU (UFS Protocol Information Unit) size is increased to 512 bytes
>> from 128. The UPIU header and the transaction specific fields (SCSI
>> command or Query Request OSF - Op-code Specific Fields) are 32 bytes
>> together, the rest is used to transfer extra request data (such as
>> descriptor in query requests). In order to accommodate the largest
>> descriptor in the UFS spec (256 bytes) we need to increase the UPIU
>> size.
>>
>> Signed-off-by: Dolev Raviv 
>> Signed-off-by: Santosh Y 
>>
>> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
>> index 35faf24..82417d6 100644
>> --- a/drivers/scsi/ufs/Kconfig
>> +++ b/drivers/scsi/ufs/Kconfig
>> @@ -35,6 +35,7 @@
>>  config SCSI_UFSHCD
>>  tristate "Universal Flash Storage Controller Driver Core"
>>  depends on SCSI
>> +default y
>>  ---help---
>>  This selects the support for UFS devices in Linux, say Y and make
>>sure that you know the name of your UFS host adapter (the card
>
> I don't think you want to force this on in every configuration since
> it's only appropriate to non server/desktop.  I stripped this hunk.
>
> James
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] scsi: ufs: add support for query requests

2013-05-03 Thread James Bottomley
On Thu, 2013-05-02 at 17:25 +0530, Santosh Y wrote:
> From: Dolev Raviv 
> 
> Add support for sending UFS query requests through tagged command
> queuing. This design allows queuing query requests in any open slot
> along with other SCSI commands. In this way there is no need to
> save a slot in the requests queue and decrease its size.
> 
> A query request is posing to a SCSI command to use native flow. But
> unlike normal SCSI command flow, the data and response fields are
> filled in UFS host data structure instead of passing as arguments
> while queuing into SCSI mlqueue (mid-layer SCSI queue, the requests
> from this queue are submitted to the device queue). As per specification
> only one query request is allowed to be processed by device. Hence a
> mutex lock for protecting data and response fields (hba->query.request and
> hba->query.response) needs to be held while query request is in
> progress.
> 
> The API for submitting a query request is ufs_query_request() in
> ufshcd.c. This function is responsible for:
> 1. Obtaining the SCSI device from the host
> 2. Keeping the query mutex to prevent multiple queries
> 3. Storing the required data for sending a query request in ufs_hba
> 4. Queuing a SCSI vendor specific command to trigger a query request
>in the UFS driver.
> 
> The callers of ufs_query_request() are expected to fill the query
> command data fields and are to provide an allocated response field
> for the driver to fill response fields after request completion.
> 
> The request and response upiu is extended in a union to enable using the
> same data structure, both for command upiu and query request upiu.
> 
> The query request flow is separated from the scsi command flow in:
> 1. Preparing the request
> 2. Validating response (error) codes
> 3. Copying data (only used for descriptor read/write query requests)
> 4. Copying response/sense
> 
> Data error can't be handled in the scsi command native flow. Hence,
> we pass the code as without a change back to the submitting layer.
> 
> UPIU (UFS Protocol Information Unit) size is increased to 512 bytes
> from 128. The UPIU header and the transaction specific fields (SCSI
> command or Query Request OSF - Op-code Specific Fields) are 32 bytes
> together, the rest is used to transfer extra request data (such as
> descriptor in query requests). In order to accommodate the largest
> descriptor in the UFS spec (256 bytes) we need to increase the UPIU
> size.
> 
> Signed-off-by: Dolev Raviv 
> Signed-off-by: Santosh Y 
> 
> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
> index 35faf24..82417d6 100644
> --- a/drivers/scsi/ufs/Kconfig
> +++ b/drivers/scsi/ufs/Kconfig
> @@ -35,6 +35,7 @@
>  config SCSI_UFSHCD
>   tristate "Universal Flash Storage Controller Driver Core"
>   depends on SCSI
> + default y
>   ---help---
>   This selects the support for UFS devices in Linux, say Y and make
> sure that you know the name of your UFS host adapter (the card

I don't think you want to force this on in every configuration since
it's only appropriate to non server/desktop.  I stripped this hunk.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html