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

2016-03-10 Thread Yaniv Gardi
this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs_quirks.h | 14 +- drivers/scsi/ufs/ufshcd.c

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

2016-03-10 Thread Yaniv Gardi
ned-off-by: Yaniv Gardi --- 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 index 8ed7d4b..adaae34 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/driver

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

2016-03-10 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs

[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 Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 21 insertions

[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 Reviewed-by: Hannes Reinecke Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c | 88

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

2016-03-10 Thread Yaniv Gardi
t support 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- dr

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

2016-03-10 Thread Yaniv Gardi
Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 31 ++ drivers/scsi/ufs/ufs_quirks.h | 139 ++ drivers/scsi/ufs/ufshcd.c | 71 + drivers/scsi/ufs/ufshcd.h | 3 + 4 files changed, 244 inser

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

2016-03-10 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. Reviewed-by: Hannes Reinecke Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi

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

2016-03-10 Thread Yaniv Gardi
pamming of kernel logs. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/scsi/ufs/

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 ++ 2 files changed, 86 insertions(+) diff --git a/drivers

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

2016-03-10 Thread Yaniv Gardi
g UFS interrupt handling. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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 index a8e42df..de7280c 1

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

2016-03-10 Thread Yaniv Gardi
d-off-by: Yaniv Gardi --- 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 index b429a57..82a4b1c 100644

[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 Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 12

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

2016-03-10 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. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi

[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 13/17] scsi: ufs: fix leakage during link off state

2016-03-10 Thread Yaniv Gardi
Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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 305210f..93cc02f 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi

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

2016-03-10 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. Reviewed-by: Hannes Reinecke Acked-by: Rob Herring Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi --- .../devicetree

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

2016-03-09 Thread Yaniv Gardi
This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Reviewed-by: Subhash Jadavani Signed-off-by: Dolev Raviv Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi

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

2016-03-09 Thread Yaniv Gardi
-off-by: Raviv Shvili Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 53 +++ drivers/scsi/ufs/ufshcd.c | 208 +- include/uapi/scsi/Kbuild | 1 + include/uapi/scsi/ufs/Kbuild | 3 + include

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

2016-03-09 Thread Yaniv Gardi
This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Reviewed-by: Subhash Jadavani Signed-off-by: Dolev Raviv Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi

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

2016-03-08 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. Reviewed-by: Dolev Raviv Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi

[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 Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h

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

2016-03-08 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. Reviewed-by: Hannes Reinecke Acked-by: Rob Herring Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi --- .../devicetree

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

2016-03-08 Thread Yaniv Gardi
t support 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- dr

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

2016-03-08 Thread Yaniv Gardi
ned-off-by: Yaniv Gardi --- 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 index 987cf27..dc096f1 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/driver

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

2016-03-08 Thread Yaniv Gardi
Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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/ufs/ufshcd.c +++ b/drivers/scsi

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

2016-03-08 Thread Yaniv Gardi
Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/Makefile | 2 +- drivers/scsi/ufs/ufs.h| 31 +++ drivers/scsi/ufs/ufs_quirks.c | 100 ++ drivers/scsi/ufs/ufs_quirks.h | 124 ++ drivers/scs

[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 Reviewed-by: Hannes Reinecke Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c | 88

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 ++ 2 files changed, 86 insertions(+) diff --git a/drivers

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

2016-03-08 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. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi

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

2016-03-08 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs

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

2016-03-08 Thread Yaniv Gardi
this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs_quirks.c | 4 drivers/scsi/ufs/ufs_quirks.h

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 21 insertions

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

2016-03-08 Thread Yaniv Gardi
d-off-by: Yaniv Gardi --- 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 index 394054e..d28c629 100644

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

2016-03-08 Thread Yaniv Gardi
pamming of kernel logs. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/scsi/ufs/

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

2016-03-08 Thread Yaniv Gardi
g UFS interrupt handling. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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 index a8e42df..de7280c 1

[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 Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 12

[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 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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 12 +++ 2 files changed, 35

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

2016-03-06 Thread Yaniv Gardi
this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs_quirks.c | 4 drivers/scsi/ufs/ufs_quirks.h | 11 ++- drivers/scsi/ufs/ufshcd.c

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

2016-03-06 Thread Yaniv Gardi
g the host. 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 Signed-off-by: Yaniv Gardi --- dr

[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 --- drivers/scsi/ufs/ufs-qcom.c | 27

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 55

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

2016-03-06 Thread Yaniv Gardi
Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Reviewed-by: Gilad Broner Signed-off-by: Raviv Shvili Signed-off-by:

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c

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

2016-03-06 Thread Yaniv Gardi
We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv

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

2016-03-06 Thread Yaniv Gardi
pamming of kernel logs. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/uf

[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 --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 ++ 2 files changed, 86 insertions(+) diff --git a/drivers/scsi/ufs/ufs-qcom.c b

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

2016-03-06 Thread Yaniv Gardi
t support 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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/

[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 Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c | 88

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

2016-03-06 Thread Yaniv Gardi
g UFS interrupt handling. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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 index a8e42df..de7280c 100644 --- a/drivers/scsi/ufs/ufs

[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 --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 21 insertions(+) diff --git a/drivers/scsi/ufs

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs

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

2016-03-06 Thread Yaniv Gardi
Jadavani Signed-off-by: Yaniv Gardi --- 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/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5619,6

[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 Signed-off-by: Yaniv Gardi --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers

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

2016-02-28 Thread Yaniv Gardi
g UFS interrupt handling. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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 index a8e42df..de7280c 100644 --- a/drivers/scsi/ufs/ufs

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c

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

2016-02-28 Thread Yaniv Gardi
Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Reviewed-by: Gilad Broner Signed-off-by: Raviv Shvili Signed-off-by:

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

2016-02-28 Thread Yaniv Gardi
pamming of kernel logs. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/uf

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 55

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

2016-02-28 Thread Yaniv Gardi
t support 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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/

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

2016-02-28 Thread Yaniv Gardi
g the host. 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 Signed-off-by: Yaniv Gardi --- dr

[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 Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c | 88

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 12 +++ 2 files changed, 35

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

2016-02-28 Thread Yaniv Gardi
We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv

[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 --- drivers/scsi/ufs/ufs-qcom.c | 116 +--- drivers/scsi/ufs/ufs-qcom.h | 9 drivers/scsi/ufs/ufshcd.h | 9 drivers

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

2016-02-28 Thread Yaniv Gardi
this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs_quirks.c | 4 drivers/scsi/ufs/ufs_quirks.h | 11 ++- drivers/scsi/ufs/ufshcd.c

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs

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

2016-02-28 Thread Yaniv Gardi
Jadavani Signed-off-by: Yaniv Gardi --- 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/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5619,6

[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 Signed-off-by: Yaniv Gardi --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers

[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 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 Signed-off-by: Yaniv Gardi --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs

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

2016-02-04 Thread Yaniv Gardi
g the host. 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 Signed-off-by: Yaniv Gardi --- dr

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

2016-02-04 Thread Yaniv Gardi
Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Reviewed-by: Gilad Broner Signed-off-by: Raviv Shvili Signed-off-by:

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c

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

2016-02-04 Thread Yaniv Gardi
pamming of kernel logs. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/uf

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

2016-02-04 Thread Yaniv Gardi
We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv

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

2016-02-04 Thread Yaniv Gardi
Jadavani Signed-off-by: Yaniv Gardi --- 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/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5619,6

[v4 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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 55

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

2016-02-04 Thread Yaniv Gardi
this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs_quirks.c | 4 drivers/scsi/ufs/ufs_quirks.h | 11 ++- drivers/scsi/ufs/ufshcd.c

[v4 11/14] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-02-04 Thread Yaniv Gardi
t support 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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/

[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 --- drivers/scsi/ufs/ufs-qcom.c | 116 +--- drivers/scsi/ufs/ufs-qcom.h | 9 drivers/scsi/ufs/ufshcd.h | 9 drivers

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 12 +++ 2 files changed, 35

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

2016-02-04 Thread Yaniv Gardi
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 02/14] scsi: ufs: avoid spurious UFS host controller interrupts

2016-02-04 Thread Yaniv Gardi
g UFS interrupt handling. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- 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 index 65593b3..b0ef94d 100644 --- a/drivers/scsi/ufs/ufs

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs

[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 Signed-off-by: Yaniv Gardi --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 53 --- drivers/scsi/ufs/ufshcd.h | 12 +++ 2 files changed, 35

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

2016-02-04 Thread Yaniv Gardi
g the host. 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 Signed-off-by: Yaniv Gardi --- dr

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

2016-02-04 Thread Yaniv Gardi
pamming of kernel logs. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 93 +++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/uf

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

2016-02-04 Thread Yaniv Gardi
Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Reviewed-by: Gilad Broner Signed-off-by: Raviv Shvili Signed-off-by:

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 + drivers/scsi/ufs/ufshcd.c

[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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 55

[v3 11/14] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-02-04 Thread Yaniv Gardi
t support 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 Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/

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

2016-02-04 Thread Yaniv Gardi
We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv

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

2016-02-04 Thread Yaniv Gardi
this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs_quirks.c | 4 drivers/scsi/ufs/ufs_quirks.h | 10 +- drivers/scsi/ufs/ufshcd.c

[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 --- drivers/scsi/ufs/ufs-qcom.c | 116 +--- drivers/scsi/ufs/ufs-qcom.h | 9 drivers/scsi/ufs/ufshcd.h | 9 drivers

  1   2   3   4   5   >