[PATCH v8 05/17] scsi: ufs: add support to read device and string descriptors

2016-03-10 Thread Yaniv Gardi
This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <

[PATCH v8 06/17] scsi: ufs: separate device and host quirks

2016-03-10 Thread Yaniv Gardi
Hannes Reinecke <h...@suse.de> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs.h| 31 ++ drivers/scsi/ufs/ufs_quirks.h | 139 ++ drivers/scs

[PATCH v8 14/17] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2016-03-10 Thread Yaniv Gardi
void this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@code

[PATCH v8 09/17] scsi: ufs: add error recovery after DL NAC error

2016-03-10 Thread Yaniv Gardi
of kernel logs. Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci

[PATCH v8 04/17] scsi: ufs: verify hba controller hce reg value

2016-03-10 Thread Yaniv Gardi
, indicating the timeout between reads will be done by sleeping or spinning the cpu. Reviewed-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi

[PATCH v8 12/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-03-10 Thread Yaniv Gardi
g> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 118 ++ drivers/scsi/ufs/ufshcd.h | 1 + drivers/scsi/ufs/ufshci.h | 2 + drivers/scsi/ufs/unipro.h | 21 + 4 files changed, 142 insertions(+) diff --

[PATCH v8 00/17] add fixes, device quirks, error recovery,

2016-03-10 Thread Yaniv Gardi
e a race condition" fixed and few comments. V1: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" Yaniv Gardi (15): scsi: ufs-qcom: add number of lanes per direction scsi: ufs: avoid spurious UFS host controller interrupts

[PATCH v8 17/17] scsi: ufs-qcom: add printouts of testbus debug registers

2016-03-10 Thread Yaniv Gardi
This change adds printouts of testbus and debug registers. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 +++

[PATCH v8 07/17] scsi: ufs: disable vccq if it's not needed by UFS device

2016-03-10 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yani

[PATCH v8 13/17] scsi: ufs: fix leakage during link off state

2016-03-10 Thread Yaniv Gardi
Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufsh

[PATCH v8 15/17] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-03-10 Thread Yaniv Gardi
ed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 27 --- drivers/scsi/ufs/unipro.h | 1 + 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index ed57729..96

[PATCH v8 03/17] scsi: ufs: implement scsi host timeout handler

2016-03-10 Thread Yaniv Gardi
<gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index de7280c..3400ceb 100644 --- a/drivers

[PATCH v8 08/17] scsi: ufs: make error handling bit faster

2016-03-10 Thread Yaniv Gardi
davani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 155 +- 1 file changed, 112 insertions(+), 43 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c inde

[PATCH v8 16/17] scsi: ufs-qcom: enable/disable the device ref clock

2016-03-10 Thread Yaniv Gardi
This change enables the device ref clock before changing to HS mode and disables it if entered to PWM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufs

[PATCH v8 01/17] scsi: ufs-qcom: add number of lanes per direction

2016-03-10 Thread Yaniv Gardi
Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers/scsi/ufs/ufs-qcom.c| 39 -- drivers/scsi/ufs/ufshcd-pltfrm.c | 19 +++ d

[PATCH v8 10/17] scsi: ufs: add retry for query descriptors

2016-03-10 Thread Yaniv Gardi
; Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 55 +++ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 4eedb7f..b429a57 100644 ---

[PATCH v8 11/17] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-03-10 Thread Yaniv Gardi
ubhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 6 ++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/drivers/s

[PATCH v8 02/17] scsi: ufs: avoid spurious UFS host controller interrupts

2016-03-10 Thread Yaniv Gardi
interrupt handling. Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers

[PATCH v7] scsi: ufs: add ioctl interface for query request

2016-03-09 Thread Yaniv Gardi
; Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs.h| 53 +++ drivers/scsi/ufs/ufshcd.c | 208 +- include/uapi/scsi/Kbuild | 1 + include/uap

[PATCH v6] scsi: ufs: add ioctl interface for query request

2016-03-09 Thread Yaniv Gardi
ff-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Noa Rubens <n...@codeaurora.org> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/u

[PATCH v5] scsi: ufs: add ioctl interface for query request

2016-03-09 Thread Yaniv Gardi
; Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs.h| 53 +++ drivers/scsi/ufs/ufshcd.c | 208 +- include/uapi/scsi/Kbuild | 1 + include/uap

[PATCH v7 05/17] scsi: ufs: add support to read device and string descriptors

2016-03-08 Thread Yaniv Gardi
This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <

[PATCH v7 03/17] scsi: ufs: implement scsi host timeout handler

2016-03-08 Thread Yaniv Gardi
<gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index de7280c..3400ceb 100644 ---

[PATCH v7 07/17] scsi: ufs: disable vccq if it's not needed by UFS device

2016-03-08 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yani

[PATCH v7 01/17] scsi: ufs-qcom: add number of lanes per direction

2016-03-08 Thread Yaniv Gardi
Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers/scsi/ufs/ufs-qcom.c| 39 -- drivers/scsi/ufs/ufshcd-pltfrm.c | 19 +++ d

[PATCH v7 09/17] scsi: ufs: add error recovery after DL NAC error

2016-03-08 Thread Yaniv Gardi
of kernel logs. Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci

[PATCH v7 02/17] scsi: ufs: avoid spurious UFS host controller interrupts

2016-03-08 Thread Yaniv Gardi
interrupt handling. Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers

[PATCH v7 12/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-03-08 Thread Yaniv Gardi
g> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 118 ++ drivers/scsi/ufs/ufshcd.h | 1 + drivers/scsi/ufs/ufshci.h | 2 + drivers/scsi/ufs/unipro.h | 21 + 4 files changed, 142 insertions(+) diff --

[PATCH v7 13/17] scsi: ufs: fix leakage during link off state

2016-03-08 Thread Yaniv Gardi
Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufsh

[PATCH v7 08/17] scsi: ufs: make error handling bit faster

2016-03-08 Thread Yaniv Gardi
davani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 155 +- 1 file changed, 112 insertions(+), 43 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c inde

[PATCH v7 11/17] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-03-08 Thread Yaniv Gardi
ubhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 6 ++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/drivers/s

[PATCH v7 14/17] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2016-03-08 Thread Yaniv Gardi
void this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@code

[PATCH v7 16/17] scsi: ufs-qcom: enable/disable the device ref clock

2016-03-08 Thread Yaniv Gardi
This change enables the device ref clock before changing to HS mode and disables it if entered to PWM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufs

[PATCH v7 15/17] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-03-08 Thread Yaniv Gardi
ed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 27 --- drivers/scsi/ufs/unipro.h | 1 + 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index ed57729..96

[PATCH v7 17/17] scsi: ufs-qcom: add printouts of testbus debug registers

2016-03-08 Thread Yaniv Gardi
This change adds printouts of testbus and debug registers. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 +++

[PATCH v7 06/17] scsi: ufs: separate device and host quirks

2016-03-08 Thread Yaniv Gardi
Hannes Reinecke <h...@suse.de> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/Makefile | 2 +- drivers/scsi/ufs/ufs.h| 31 +++ drivers/scsi/ufs/ufs_quirks.c | 100

[PATCH v7 10/17] scsi: ufs: add retry for query descriptors

2016-03-08 Thread Yaniv Gardi
; Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 55 +++ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index e9c7c91..394054e 100644 ---

[PATCH v7 04/17] scsi: ufs: verify hba controller hce reg value

2016-03-08 Thread Yaniv Gardi
, indicating the timeout between reads will be done by sleeping or spinning the cpu. Reviewed-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi

[PATCH v7 00/17] add fixes, device quirks, error recovery,

2016-03-08 Thread Yaniv Gardi
s, retries, handle a race condition" Yaniv Gardi (15): scsi: ufs-qcom: add number of lanes per direction scsi: ufs: avoid spurious UFS host controller interrupts scsi: ufs: implement scsi host timeout handler scsi: ufs: verify hba controller hce reg value scsi: ufs: add support to r

[PATCH v6 07/17] scsi: ufs: disable vccq if it's not needed by UFS device

2016-03-06 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- driv

[PATCH v6 17/17] scsi: ufs-qcom: add printouts of testbus debug registers

2016-03-06 Thread Yaniv Gardi
This change adds printouts of testbus and debug registers. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 ++ 2 files changed, 86 insertions(+) diff --git a/driver

[PATCH v6 06/17] scsi: ufs: separate device and host quirks

2016-03-06 Thread Yaniv Gardi
Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/Makefile | 2 +- drivers/scsi/ufs/ufs.h| 31 +++ drivers/scsi/ufs/ufs_quirks.c | 100 ++ drivers/scsi/ufs/

[PATCH v6 15/17] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-03-06 Thread Yaniv Gardi
Some UFS devices (and may be host) have issues if LCC is enabled. So we are setting PA_Local_TX_LCC_Enable to 0 before link startup which will make sure that both host and device TX LCC are disabled once link startup is completed. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- d

[PATCH v6 14/17] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2016-03-06 Thread Yaniv Gardi
void this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs_quirk

[PATCH v6 09/17] scsi: ufs: add error recovery after DL NAC error

2016-03-06 Thread Yaniv Gardi
of kernel logs. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --g

[PATCH v6 02/17] scsi: ufs: avoid spurious UFS host controller interrupts

2016-03-06 Thread Yaniv Gardi
interrupt handling. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c i

[PATCH v6 13/17] scsi: ufs: fix leakage during link off state

2016-03-06 Thread Yaniv Gardi
Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c9c4d68..f108a0b 100644 --- a/drivers/scsi/

[PATCH v6 08/17] scsi: ufs: make error handling bit faster

2016-03-06 Thread Yaniv Gardi
. But note that resetting host would any way clear all the pending requests from the hardware. Hence this change skips the forceful clear of the pending requests if we are anyway going to reset the host (for fatal errors). Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by:

[PATCH v6 05/17] scsi: ufs: add support to read device and string descriptors

2016-03-06 Thread Yaniv Gardi
This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs.h

[PATCH v6 04/17] scsi: ufs: verify hba controller hce reg value

2016-03-06 Thread Yaniv Gardi
, indicating the timeout between reads will be done by sleeping or spinning the cpu. Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- driv

[PATCH v6 10/17] scsi: ufs: add retry for query descriptors

2016-03-06 Thread Yaniv Gardi
Query commands have 100ms timeout and it may timeout if they are issued in parallel to ongoing read/write SCSI commands, this change adds the retry (max: 10) in case command timeouts. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codea

[PATCH v6 11/17] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-03-06 Thread Yaniv Gardi
ed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 6 ++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c i

[PATCH v6 16/17] scsi: ufs-qcom: enable/disable the device ref clock

2016-03-06 Thread Yaniv Gardi
This change enables the device ref clock before changing to HS mode and disables it if entered to PWM mode. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 21 insertions(+)

[PATCH v6 03/17] scsi: ufs: implement scsi host timeout handler

2016-03-06 Thread Yaniv Gardi
timeout callback and bypass SCSI error handling for request that were not actually sent to the device. For such requests simply reset the block layer timer. Otherwise, let SCSI layer perform the usual error handling. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gard

[PATCH v6 12/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-03-06 Thread Yaniv Gardi
port UniPro ver 1.6 or later, we have to manually tune them. But to keep manual tuning logic simple, we will only do manual tuning if local unipro version doesn't support ver1.6 or later. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@c

[PATCH v6 00/17] add fixes, device quirks, error recovery,

2016-03-06 Thread Yaniv Gardi
: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" fixed and few comments. V1: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" Yaniv Gardi (15): scsi: ufs-qcom: add

[PATCH v6 01/17] scsi: ufs-qcom: add number of lanes per direction

2016-03-06 Thread Yaniv Gardi
Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- ..

[PATCH v5 01/15] scsi: ufs-qcom: add number of lanes per direction

2016-02-28 Thread Yaniv Gardi
Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- ..

[PATCH v5 03/15] scsi: ufs: implement scsi host timeout handler

2016-02-28 Thread Yaniv Gardi
timeout callback and bypass SCSI error handling for request that were not actually sent to the device. For such requests simply reset the block layer timer. Otherwise, let SCSI layer perform the usual error handling. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gard

[PATCH v5 02/15] scsi: ufs: avoid spurious UFS host controller interrupts

2016-02-28 Thread Yaniv Gardi
interrupt handling. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c i

[PATCH v5 04/15] scsi: ufs: verify hba controller hce reg value

2016-02-28 Thread Yaniv Gardi
, indicating the timeout between reads will be done by sleeping or spinning the cpu. Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- driv

[PATCH v5 07/15] scsi: ufs: disable vccq if it's not needed by UFS device

2016-02-28 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- driv

[PATCH v5 05/15] scsi: ufs: add support to read device and string descriptors

2016-02-28 Thread Yaniv Gardi
This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs.h

[PATCH v5 06/15] scsi: ufs: separate device and host quirks

2016-02-28 Thread Yaniv Gardi
Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/Makefile | 2 +- drivers/scsi/ufs/ufs.h| 31 +++ drivers/scsi/ufs/ufs_quirks.c | 100 ++ drivers/scsi/ufs/

[PATCH v5 11/15] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-02-28 Thread Yaniv Gardi
ed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 6 ++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c i

[PATCH v5 08/15] scsi: ufs: make error handling bit faster

2016-02-28 Thread Yaniv Gardi
. But note that resetting host would any way clear all the pending requests from the hardware. Hence this change skips the forceful clear of the pending requests if we are anyway going to reset the host (for fatal errors). Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by:

[PATCH v5 09/15] scsi: ufs: add error recovery after DL NAC error

2016-02-28 Thread Yaniv Gardi
of kernel logs. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --g

[PATCH v5 12/15] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-02-28 Thread Yaniv Gardi
port UniPro ver 1.6 or later, we have to manually tune them. But to keep manual tuning logic simple, we will only do manual tuning if local unipro version doesn't support ver1.6 or later. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@c

[PATCH v5 10/15] scsi: ufs: add retry for query descriptors

2016-02-28 Thread Yaniv Gardi
Query commands have 100ms timeout and it may timeout if they are issued in parallel to ongoing read/write SCSI commands, this change adds the retry (max: 10) in case command timeouts. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codea

[PATCH v5 14/15] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2016-02-28 Thread Yaniv Gardi
void this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs_quirk

[PATCH v5 13/15] scsi: ufs: fix leakage during link off state

2016-02-28 Thread Yaniv Gardi
Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c9c4d68..f108a0b 100644 --- a/drivers/scsi/

[PATCH v5 15/15] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-02-28 Thread Yaniv Gardi
to HS mode and disables it if entered to PWM mode - adds printouts of testbus debug registers Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 116 +--- drivers/scsi/ufs/ufs-qcom.h | 9 drivers/scsi/ufs/uf

[PATCH v5 00/15] add fixes, device quirks, error recovery,

2016-02-28 Thread Yaniv Gardi
fixes, retries, handle a race condition" fixed and few comments. V1: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" Yaniv Gardi (15): scsi: ufs-qcom: add number of lanes per direction scsi: ufs: avoid spurious UFS host c

[v4 07/14] scsi: ufs: make error handling bit faster

2016-02-04 Thread Yaniv Gardi
. But note that resetting host would any way clear all the pending requests from the hardware. Hence this change skips the forceful clear of the pending requests if we are anyway going to reset the host (for fatal errors). Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by:

[v4 05/14] scsi: ufs: separate device and host quirks

2016-02-04 Thread Yaniv Gardi
Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/Makefile | 2 +- drivers/scsi/ufs/ufs.h| 32 +++ drivers/scsi/ufs/ufs_quirks.c | 100 ++ drivers/scsi/ufs/

[v4 06/14] scsi: ufs: disable vccq if it's not needed by UFS device

2016-02-04 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- driv

[v4 08/14] scsi: ufs: add error recovery after DL NAC error

2016-02-04 Thread Yaniv Gardi
of kernel logs. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --g

[v3 06/14] scsi: ufs: disable vccq if it's not needed by UFS device

2016-02-04 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- driv

[v3 05/14] scsi: ufs: separate device and host quirks

2016-02-04 Thread Yaniv Gardi
Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/Makefile | 2 +- drivers/scsi/ufs/ufs.h| 32 +++ drivers/scsi/ufs/ufs_quirks.c | 100 ++ drivers/scsi/ufs/

[v3 08/14] scsi: ufs: add error recovery after DL NAC error

2016-02-04 Thread Yaniv Gardi
of kernel logs. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --g

[v3 07/14] scsi: ufs: make error handling bit faster

2016-02-04 Thread Yaniv Gardi
. But note that resetting host would any way clear all the pending requests from the hardware. Hence this change skips the forceful clear of the pending requests if we are anyway going to reset the host (for fatal errors). Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by:

[v3 04/14] scsi: ufs: verify hba controller hce reg value

2016-02-04 Thread Yaniv Gardi
, indicating the timeout between reads will be done by sleeping or spinning the cpu. Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- driv

[v3 01/14] scsi: ufs-qcom: add number of lanes per direction

2016-02-04 Thread Yaniv Gardi
Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- ..

[v3 03/14] scsi: ufs: implement scsi host timeout handler

2016-02-04 Thread Yaniv Gardi
timeout callback and bypass SCSI error handling for request that were not actually sent to the device. For such requests simply reset the block layer timer. Otherwise, let SCSI layer perform the usual error handling. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gard

[v3 13/14] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2016-02-04 Thread Yaniv Gardi
void this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs_quirk

[v3 12/14] scsi: ufs: fix leakage during link off state

2016-02-04 Thread Yaniv Gardi
Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3c550e2..f7a699c2 100644 --- a/drivers/scsi/

[v3 14/14] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-02-04 Thread Yaniv Gardi
to HS mode and disables it if entered to PWM mode - adds printouts of testbus debug registers Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 116 +--- drivers/scsi/ufs/ufs-qcom.h | 9 drivers/scsi/ufs/uf

[v4 04/14] scsi: ufs: verify hba controller hce reg value

2016-02-04 Thread Yaniv Gardi
, indicating the timeout between reads will be done by sleeping or spinning the cpu. Signed-off-by: Raviv Shvili <rshv...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- driv

[v4 14/14] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-02-04 Thread Yaniv Gardi
to HS mode and disables it if entered to PWM mode - adds printouts of testbus debug registers Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 116 +--- drivers/scsi/ufs/ufs-qcom.h | 9 drivers/scsi/ufs/uf

[v4 12/14] scsi: ufs: fix leakage during link off state

2016-02-04 Thread Yaniv Gardi
Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3c550e2..f7a699c2 100644 --- a/drivers/scsi/

[v3 09/14] scsi: ufs: add retry for query descriptors

2016-02-04 Thread Yaniv Gardi
Query commands have 100ms timeout and it may timeout if they are issued in parallel to ongoing read/write SCSI commands, this change adds the retry (max: 10) in case command timeouts. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codea

[v3 10/14] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-02-04 Thread Yaniv Gardi
ed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 6 ++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c i

[v4 00/14] add fixes, device quirks, error recovery,

2016-02-04 Thread Yaniv Gardi
ments. V1: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" Yaniv Gardi (14): scsi: ufs-qcom: add number of lanes per direction scsi: ufs: avoid spurious UFS host controller interrupts scsi: ufs: implement scsi host timeout handler s

[v4 01/14] scsi: ufs-qcom: add number of lanes per direction

2016-02-04 Thread Yaniv Gardi
Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- ..

[v4 03/14] scsi: ufs: implement scsi host timeout handler

2016-02-04 Thread Yaniv Gardi
timeout callback and bypass SCSI error handling for request that were not actually sent to the device. For such requests simply reset the block layer timer. Otherwise, let SCSI layer perform the usual error handling. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Yaniv Gard

[v4 02/14] scsi: ufs: avoid spurious UFS host controller interrupts

2016-02-04 Thread Yaniv Gardi
interrupt handling. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c i

[PATCH v7 09/14] scsi: ufs: fix error recovery after the hibern8 exit failure

2016-02-01 Thread Yaniv Gardi
from first 2 context listed above. This change fixes the recovery by adding proper error handling mechanism. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by

[PATCH v7 07/14] scsi: ufs: add retries to dme_peer get and set attribute

2016-02-01 Thread Yaniv Gardi
<gbro...@codeaurora.org> Reviewed-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Lee Susman <lsus...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 40 +--- 1 file changed, 29 ins

[PATCH v7 06/14] scsi: ufs: avoid exception event handler racing with PM callbacks

2016-02-01 Thread Yaniv Gardi
while PM callbacks are running. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15

[PATCH v7 05/14] scsi: ufs: increase fDeviceInit query response timeout

2016-02-01 Thread Yaniv Gardi
have to retry fDeviceInit query requests multiple times and each query request timeout prints one error message. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Reviewed-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by

  1   2   3   4   >