[PATCH v1 4/4] scsi: ufs-qcom: fix bug with read/modify write of UFS_CFG1

2016-12-05 Thread Subhash Jadavani
ufs_qcom_print_hw_debug_reg_all() function is having a bug where it might incorrectly modify undesired bits in UFS_CFG1 register, this change fixes it. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/

[PATCH v1 4/4] scsi: ufs-qcom: fix bug with read/modify write of UFS_CFG1

2016-12-05 Thread Subhash Jadavani
ufs_qcom_print_hw_debug_reg_all() function is having a bug where it might incorrectly modify undesired bits in UFS_CFG1 register, this change fixes it. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-qcom.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v1 2/4] scsi: ufs-qcom: add probe_defer in case phy driver not probed yet

2016-12-05 Thread Subhash Jadavani
From: Yaniv Gardi <yga...@codeaurora.org> In case UFS driver is probed before the phy driver does, the UFS driver should return a PROBE_DEFER code. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/u

[PATCH v1 3/4] scsi: ufs: add quirk to increase host PA_SaveConfigTime

2016-12-05 Thread Subhash Jadavani
to increase PA_SaveConfigTime to >32us as per vendor recommendation. This change adds a quirk to increase the PA_SaveConfigTime parameter. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/uf

[PATCH v1 2/4] scsi: ufs-qcom: add probe_defer in case phy driver not probed yet

2016-12-05 Thread Subhash Jadavani
From: Yaniv Gardi In case UFS driver is probed before the phy driver does, the UFS driver should return a PROBE_DEFER code. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-qcom.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

[PATCH v1 3/4] scsi: ufs: add quirk to increase host PA_SaveConfigTime

2016-12-05 Thread Subhash Jadavani
to increase PA_SaveConfigTime to >32us as per vendor recommendation. This change adds a quirk to increase the PA_SaveConfigTime parameter. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-qcom.c | 30 ++ drivers/scsi/ufs/

[PATCH v1 1/4] scsi: ufs: add support for UFS HCI 2.1

2016-12-05 Thread Subhash Jadavani
From: Yaniv Gardi <yga...@codeaurora.org> The UFS HCI v2.1 includes a few additional registers. This change updates the HCI register, the UFS version register content and the Interrupt Status register. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jad

[PATCH v1 1/4] scsi: ufs: add support for UFS HCI 2.1

2016-12-05 Thread Subhash Jadavani
From: Yaniv Gardi The UFS HCI v2.1 includes a few additional registers. This change updates the HCI register, the UFS version register content and the Interrupt Status register. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 29

[PATCH v1 11/11] scsi: ufs: fix default power mode to FAST/SLOW

2016-11-23 Thread Subhash Jadavani
We would by default like to run in FAST/SLOW mode instead of FASTAUTO/SLOWAUTO mode for performance reasons. This change sets the default speed mode to FAST/SLOW mode. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codea

[PATCH v1 11/11] scsi: ufs: fix default power mode to FAST/SLOW

2016-11-23 Thread Subhash Jadavani
We would by default like to run in FAST/SLOW mode instead of FASTAUTO/SLOWAUTO mode for performance reasons. This change sets the default speed mode to FAST/SLOW mode. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 8 1 file changed

[PATCH v1 03/11] scsi: ufs: update device descriptor maximum size

2016-11-23 Thread Subhash Jadavani
From: Yaniv Gardi <yga...@codeaurora.org> According to JESD220B - UFS v2.0, the maximum size of device descriptor has changed from 0x1F to 0x40. This patch updates the maximum size of this descriptor. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jad

[PATCH v1 03/11] scsi: ufs: update device descriptor maximum size

2016-11-23 Thread Subhash Jadavani
From: Yaniv Gardi According to JESD220B - UFS v2.0, the maximum size of device descriptor has changed from 0x1F to 0x40. This patch updates the maximum size of this descriptor. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs.h | 2 +- 1 file changed, 1

[PATCH v1 07/11] scsi: ufs: issue link starup 2 times if device isn't active

2016-11-23 Thread Subhash Jadavani
would have to issue the link startup 2 times to make sure that device moves to active state. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 23 --- 1 file changed, 20 inse

[PATCH v1 07/11] scsi: ufs: issue link starup 2 times if device isn't active

2016-11-23 Thread Subhash Jadavani
would have to issue the link startup 2 times to make sure that device moves to active state. Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs

[PATCH v1 04/11] scsi: ufs: fix failure to read the string descriptor

2016-11-23 Thread Subhash Jadavani
correct size as part of Query Request UPIU). Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 40 +++- 1 file changed, 31 insertions(+), 9 d

[PATCH v1 04/11] scsi: ufs: fix failure to read the string descriptor

2016-11-23 Thread Subhash Jadavani
correct size as part of Query Request UPIU). Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 40 +++- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/s

[PATCH v1 01/11] scsi: ufs: add queries retry mechanism

2016-11-23 Thread Subhash Jadavani
From: Dolev Raviv <dra...@codeaurora.org> Some of the queries might fail during init. To avoid system failure, we add retry mechanism to issue queries several times. Signed-off-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> ---

[PATCH v1 09/11] scsi: ufs: fix condition in which DME command failure msg is printed out

2016-11-23 Thread Subhash Jadavani
rinted out. This change fixes this issue. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c

[PATCH v1 05/11] scsi: ufs: increase the scsi query response timeout

2016-11-23 Thread Subhash Jadavani
device responds back with 2 resposes on same tag, host HW/SW behaviour isn't predictable. To avoid running into above scenario, we would basically allow device to take longer (upto 1.5 seconds) for query response. Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: S

[PATCH v1 06/11] scsi: ufs: ensure that host pa_tactivate is higher than device

2016-11-23 Thread Subhash Jadavani
Some UFS devices require host PA_TACTIVATE to be higher than device PA_TACTIVATE otherwise it may get stuck during hibern8 sequence. This change allows this by using quirk. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codea

[PATCH v1 08/11] scsi: ufs: handle errors from PHY_ADAPTER_ERROR register

2016-11-23 Thread Subhash Jadavani
potted separately, no action other than clearing the register is necessary. Signed-off-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 11 +++ drivers/scsi/ufs/ufshci.h | 1 + 2 files chan

[PATCH v1 10/11] scsi: ufs: optimize system suspend handling

2016-11-23 Thread Subhash Jadavani
oper state checks in ufshcd_system_suspend(). Reviewed-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/scs

[PATCH v1 01/11] scsi: ufs: add queries retry mechanism

2016-11-23 Thread Subhash Jadavani
From: Dolev Raviv Some of the queries might fail during init. To avoid system failure, we add retry mechanism to issue queries several times. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 54 +++ 1 file

[PATCH v1 09/11] scsi: ufs: fix condition in which DME command failure msg is printed out

2016-11-23 Thread Subhash Jadavani
this issue. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ec4c99a..b826078 100644 --- a/drivers/scsi/ufs/ufshcd.c

[PATCH v1 05/11] scsi: ufs: increase the scsi query response timeout

2016-11-23 Thread Subhash Jadavani
device responds back with 2 resposes on same tag, host HW/SW behaviour isn't predictable. To avoid running into above scenario, we would basically allow device to take longer (upto 1.5 seconds) for query response. Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs

[PATCH v1 06/11] scsi: ufs: ensure that host pa_tactivate is higher than device

2016-11-23 Thread Subhash Jadavani
Some UFS devices require host PA_TACTIVATE to be higher than device PA_TACTIVATE otherwise it may get stuck during hibern8 sequence. This change allows this by using quirk. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs_quirks.h | 9 ++ drivers

[PATCH v1 10/11] scsi: ufs: optimize system suspend handling

2016-11-23 Thread Subhash Jadavani
oper state checks in ufshcd_system_suspend(). Reviewed-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b826078..4b6

[PATCH v1 08/11] scsi: ufs: handle errors from PHY_ADAPTER_ERROR register

2016-11-23 Thread Subhash Jadavani
other than clearing the register is necessary. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 11 +++ drivers/scsi/ufs/ufshci.h | 1 + 2 files changed, 12 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH v1 02/11] scsi: ufs: add index details to query error messages

2016-11-23 Thread Subhash Jadavani
; Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 0b278a1..9abc11e 100644 --- a/drivers/scsi/ufs/ufshcd.c +++

[PATCH v1 02/11] scsi: ufs: add index details to query error messages

2016-11-23 Thread Subhash Jadavani
From: Yaniv Gardi When sending query to the device, the index of the failure is additional useful information that should be printed out as it might specify the logical unit (LU) where the error occurred. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs

Re: [PATCH v2] ufs: qcom: Properly clear hba priv on failure

2016-11-21 Thread Subhash Jadavani
@ -1267,7 +1267,7 @@ static int ufs_qcom_init(struct ufs_hba *hba) phy_power_off(host->generic_phy); out_unregister_bus: phy_exit(host->generic_phy); -out_host_free: +out_variant_clear: ufshcd_set_variant(hba, NULL); out: return err; Looks good to me.

Re: [PATCH v2] ufs: qcom: Properly clear hba priv on failure

2016-11-21 Thread Subhash Jadavani
int ufs_qcom_init(struct ufs_hba *hba) phy_power_off(host->generic_phy); out_unregister_bus: phy_exit(host->generic_phy); -out_host_free: +out_variant_clear: ufshcd_set_variant(hba, NULL); out: return err; Looks good to me. Reviewed-by: Subhash Jadavani -- The

Re: [PATCH] ufs: qcom: Properly clear hba priv on failure

2016-11-21 Thread Subhash Jadavani
On 2016-11-19 22:15, Bjorn Andersson wrote: On Sat 19 Nov 12:30 PST 2016, Subhash Jadavani wrote: On 2016-11-18 12:55, Bjorn Andersson wrote: >In the case where we fail to acquire the phy the hba priv will be set >already, so during cleanup ufs_qcom_setup_clocks() will dereference th

Re: [PATCH] ufs: qcom: Properly clear hba priv on failure

2016-11-21 Thread Subhash Jadavani
On 2016-11-19 22:15, Bjorn Andersson wrote: On Sat 19 Nov 12:30 PST 2016, Subhash Jadavani wrote: On 2016-11-18 12:55, Bjorn Andersson wrote: >In the case where we fail to acquire the phy the hba priv will be set >already, so during cleanup ufs_qcom_setup_clocks() will dereference th

Re: [PATCH] ufs: qcom: Properly clear hba priv on failure

2016-11-19 Thread Subhash Jadavani
On 2016-11-18 12:55, Bjorn Andersson wrote: In the case where we fail to acquire the phy the hba priv will be set already, so during cleanup ufs_qcom_setup_clocks() will dereference the now free, but still "valid looking" pointer "host". host (ufs_qcom_host) was allocated with devm_kzalloc()

Re: [PATCH] ufs: qcom: Properly clear hba priv on failure

2016-11-19 Thread Subhash Jadavani
On 2016-11-18 12:55, Bjorn Andersson wrote: In the case where we fail to acquire the phy the hba priv will be set already, so during cleanup ufs_qcom_setup_clocks() will dereference the now free, but still "valid looking" pointer "host". host (ufs_qcom_host) was allocated with devm_kzalloc()

Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device

2016-11-08 Thread Subhash Jadavani
devfreq = devm_devfreq_add_device(dev, _devfreq_profile, "simple_ondemand", NULL); if (IS_ERR(hba->devfreq)) { dev_err(hba->dev, "Unable to register with devfreq %ld\n", L

Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device

2016-11-08 Thread Subhash Jadavani
ndemand", NULL); if (IS_ERR(hba->devfreq)) { dev_err(hba->dev, "Unable to register with devfreq %ld\n", LGTM. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

[PATCH v1 3/4] scsi: ufs: suspend clock scaling at the start of suspend

2016-10-27 Thread Subhash Jadavani
<stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 6c0082e..9ed96ae 100644 --- a/

[PATCH v1 3/4] scsi: ufs: suspend clock scaling at the start of suspend

2016-10-27 Thread Subhash Jadavani
Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 6c0082e..9ed96ae 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c

[PATCH v1 2/4] scsi: ufshcd: release resources if probe fails

2016-10-27 Thread Subhash Jadavani
. Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd-pci.c| 2 ++ drivers/scsi/ufs/ufshcd-pltfrm.c | 5 + drivers/scsi/ufs/ufshcd.c| 3 --- 3 files changed, 3 insertions(+),

[PATCH v1 4/4] scsi: ufs: change device rails hpm mode ramp up sequence

2016-10-27 Thread Subhash Jadavani
they are still in LPM mode) causing voltage drop on these rails. This change fixes this issue by bringing VCCQ & VCCQ2 rails out of LPM before powering on VCC rail. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org&

[PATCH v1 2/4] scsi: ufshcd: release resources if probe fails

2016-10-27 Thread Subhash Jadavani
. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd-pci.c| 2 ++ drivers/scsi/ufs/ufshcd-pltfrm.c | 5 + drivers/scsi/ufs/ufshcd.c| 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers

[PATCH v1 4/4] scsi: ufs: change device rails hpm mode ramp up sequence

2016-10-27 Thread Subhash Jadavani
they are still in LPM mode) causing voltage drop on these rails. This change fixes this issue by bringing VCCQ & VCCQ2 rails out of LPM before powering on VCC rail. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file change

[PATCH v1 1/4] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-27 Thread Subhash Jadavani
once next scaling window expires. Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd

[PATCH v1 1/4] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-27 Thread Subhash Jadavani
once next scaling window expires. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 304adce..5c931d1 100644

Re: [PATCH 2/2] scsi: ufs: Use the resource-managed function to add devfreq device

2016-10-26 Thread Subhash Jadavani
On 2016-10-26 00:38, Chanwoo Choi wrote: This patch uses the resource-managed to add the devfreq device. This function will make it easy to handle the devfreq device. - struct devfreq *devm_devfreq_add_device(struct device *dev, struct devfreq_dev_profile

Re: [PATCH 2/2] scsi: ufs: Use the resource-managed function to add devfreq device

2016-10-26 Thread Subhash Jadavani
On 2016-10-26 00:38, Chanwoo Choi wrote: This patch uses the resource-managed to add the devfreq device. This function will make it easy to handle the devfreq device. - struct devfreq *devm_devfreq_add_device(struct device *dev, struct devfreq_dev_profile

Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling

2016-10-19 Thread Subhash Jadavani
On 2016-10-19 10:45, Vivek Gautam wrote: Hi, On Wed, Oct 19, 2016 at 1:43 AM, Subhash Jadavani <subha...@codeaurora.org> wrote: On 2016-10-18 07:28, Vivek Gautam wrote: Add phy clock enable code to phy_power_on/off callbacks, and remove explicit calls to enable these phy clocks from t

Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling

2016-10-19 Thread Subhash Jadavani
On 2016-10-19 10:45, Vivek Gautam wrote: Hi, On Wed, Oct 19, 2016 at 1:43 AM, Subhash Jadavani wrote: On 2016-10-18 07:28, Vivek Gautam wrote: Add phy clock enable code to phy_power_on/off callbacks, and remove explicit calls to enable these phy clocks from the ufs-qcom hcd driver. Signed

Re: [PATCH v2 10/10] phy: qcom-ufs: Remove common layer phy exit callback

2016-10-18 Thread Subhash Jadavani
(!phy_common->is_powered_on) + return 0; + phy_common->phy_spec_ops->power_control(phy_common, false); if (phy_common->vddp_ref_clk.reg) LGTM , Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code

Re: [PATCH v2 10/10] phy: qcom-ufs: Remove common layer phy exit callback

2016-10-18 Thread Subhash Jadavani
n 0; + phy_common->phy_spec_ops->power_control(phy_common, false); if (phy_common->vddp_ref_clk.reg) LGTM , Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH v2 09/10] scsi/ufs: qcom: Add phy_exit call in hcd exit path

2016-10-18 Thread Subhash Jadavani
f(host->generic_phy); + phy_exit(host->generic_phy); } static int ufs_qcom_set_dme_vs_core_clk_ctrl_clear_div(struct ufs_hba *hba, LGTM. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,

Re: [PATCH v2 09/10] scsi/ufs: qcom: Add phy_exit call in hcd exit path

2016-10-18 Thread Subhash Jadavani
phy); + phy_exit(host->generic_phy); } static int ufs_qcom_set_dme_vs_core_clk_ctrl_clear_div(struct ufs_hba *hba, LGTM. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling

2016-10-18 Thread Subhash Jadavani
On 2016-10-18 07:28, Vivek Gautam wrote: Add phy clock enable code to phy_power_on/off callbacks, and remove explicit calls to enable these phy clocks from the ufs-qcom hcd driver. Signed-off-by: Vivek Gautam --- Changes since v1: - staticized

Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling

2016-10-18 Thread Subhash Jadavani
On 2016-10-18 07:28, Vivek Gautam wrote: Add phy clock enable code to phy_power_on/off callbacks, and remove explicit calls to enable these phy clocks from the ufs-qcom hcd driver. Signed-off-by: Vivek Gautam --- Changes since v1: - staticized ufs_qcom_phy_enable(/disable)_ref_clk(), -

Re: [PATCH v2 06/10] phy: qcom-ufs: Remove unnecessary function declarations

2016-10-18 Thread Subhash Jadavani
ptional */ + __ufs_qcom_phy_init_vreg(phy_common->dev, _common->vddp_ref_clk, +"vddp-ref-clk", true); +out: + return err; +} +EXPORT_SYMBOL_GPL(ufs_qcom_phy_init_vregulators); + static int ufs_qcom_phy_cfg_vreg(struct device *dev,

Re: [PATCH v2 06/10] phy: qcom-ufs: Remove unnecessary function declarations

2016-10-18 Thread Subhash Jadavani
_phy_init_vreg(phy_common->dev, _common->vddp_ref_clk, +"vddp-ref-clk", true); +out: + return err; +} +EXPORT_SYMBOL_GPL(ufs_qcom_phy_init_vregulators); + static int ufs_qcom_phy_cfg_vreg(struct device *dev, struct ufs_qco

Re: [PATCH v2 01/10] phy: qcom-ufs: remove failure when rx/tx_iface_clk are absent

2016-10-18 Thread Subhash Jadavani
On 2016-10-18 07:28, Vivek Gautam wrote: From: Yaniv Gardi Since in future UFS Phy's the tx_iface_clk and rx_iface_clk are no longer exist, we should not fail when their initialization fail, but rather just report with debug message. You may also want to update the

Re: [PATCH v2 01/10] phy: qcom-ufs: remove failure when rx/tx_iface_clk are absent

2016-10-18 Thread Subhash Jadavani
On 2016-10-18 07:28, Vivek Gautam wrote: From: Yaniv Gardi Since in future UFS Phy's the tx_iface_clk and rx_iface_clk are no longer exist, we should not fail when their initialization fail, but rather just report with debug message. You may also want to update the device tree binding

Re: [RESEND PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-17 Thread Subhash Jadavani
On 2016-10-14 13:47, Martin K. Petersen wrote: "Subhash" == Subhash Jadavani <subha...@codeaurora.org> writes: Subhash> UFS devfreq clock scaling work may require clocks to be ON if Subhash> it need to execute some UFS commands hence it may request for Subhash>

Re: [RESEND PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-17 Thread Subhash Jadavani
On 2016-10-14 13:47, Martin K. Petersen wrote: "Subhash" == Subhash Jadavani writes: Subhash> UFS devfreq clock scaling work may require clocks to be ON if Subhash> it need to execute some UFS commands hence it may request for Subhash> clock hold before issuing the comman

[PATCH v1 11/11] scsi: ufs: optimize clock gate work

2016-10-17 Thread Subhash Jadavani
ipping the gate work and change the clk state to CLKS_ON as they are not turned off yet. Signed-off-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 9 - 1 file changed, 8 insertions(+), 1

[PATCH v1 11/11] scsi: ufs: optimize clock gate work

2016-10-17 Thread Subhash Jadavani
the clk state to CLKS_ON as they are not turned off yet. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7959793

[PATCH v1 10/11] scsi: ufshcd: Fix race between clk scaling and ungate work

2016-10-17 Thread Subhash Jadavani
; Signed-off-by: Subhash Jadavani <subha...@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 index ea97fd0..7959793 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/

[PATCH v1 10/11] scsi: ufshcd: Fix race between clk scaling and ungate work

2016-10-17 Thread Subhash Jadavani
ufshcd_devfreq_target update_devfreq devfreq_monitor process_one_work worker_thread kthread ret_from_fork ufshcd_uic_hibern8_exit ufshcd_ungate_work process_one_work worker_thread kthread ret_from_fork Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c

[PATCH v1 03/11] scsi: ufs: fix bugs related to null pointer access and array size

2016-10-17 Thread Subhash Jadavani
From: Yaniv Gardi <yga...@codeaurora.org> In this change there are a few fixes of possible NULL pointer access and possible access to index that exceeds array boundaries. Signed-off-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.or

[PATCH v1 05/11] scsi: ufs: fix sense buffer size to 18 bytes

2016-10-17 Thread Subhash Jadavani
From: Gilad Broner <gbro...@codeaurora.org> According to UFS device specification, sense data can be only 18 bytes long, this change makes the changes accordingly. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> ---

[PATCH v1 09/11] scsi: ufs: change device rails hpm mode ramp up sequence

2016-10-17 Thread Subhash Jadavani
they are still in LPM mode) causing voltage drop on these rails. This change fixes this issue by bringing VCCQ & VCCQ2 rails out of LPM before powering on VCC rail. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 inser

[PATCH v1 03/11] scsi: ufs: fix bugs related to null pointer access and array size

2016-10-17 Thread Subhash Jadavani
From: Yaniv Gardi In this change there are a few fixes of possible NULL pointer access and possible access to index that exceeds array boundaries. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs.h| 3 ++- drivers/scsi/ufs/ufshcd.c | 25

[PATCH v1 05/11] scsi: ufs: fix sense buffer size to 18 bytes

2016-10-17 Thread Subhash Jadavani
From: Gilad Broner According to UFS device specification, sense data can be only 18 bytes long, this change makes the changes accordingly. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions

[PATCH v1 09/11] scsi: ufs: change device rails hpm mode ramp up sequence

2016-10-17 Thread Subhash Jadavani
they are still in LPM mode) causing voltage drop on these rails. This change fixes this issue by bringing VCCQ & VCCQ2 rails out of LPM before powering on VCC rail. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH v1 04/11] scsi: ufs: commit descriptors before setting the doorbell

2016-10-17 Thread Subhash Jadavani
iately. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index a99f5

[PATCH v1 04/11] scsi: ufs: commit descriptors before setting the doorbell

2016-10-17 Thread Subhash Jadavani
Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index a99f57b..beb4988 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -878,6 +878,8

[PATCH v1 07/11] scsi: ufs: fail ufshcd_probe_hba() if power configuration fails

2016-10-17 Thread Subhash Jadavani
error handling or power management contexts Signed-off-by: Dov Levenglick <d...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c

[PATCH v1 08/11] scsi: ufs: suspend clock scaling at the start of suspend

2016-10-17 Thread Subhash Jadavani
Currently clock scaling is suspended only after the host and device are put in low power mode but we should avoid clock scaling running after UFS link is put in low power mode (hibern8). This change suspends clock scaling before putting host/device in low power mode. Signed-off-by: Subhash

[PATCH v1 07/11] scsi: ufs: fail ufshcd_probe_hba() if power configuration fails

2016-10-17 Thread Subhash Jadavani
management contexts Signed-off-by: Dov Levenglick Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c6fa3c0..fced52f 100644 --- a/drivers/scsi/ufs/ufshcd.c

[PATCH v1 08/11] scsi: ufs: suspend clock scaling at the start of suspend

2016-10-17 Thread Subhash Jadavani
Currently clock scaling is suspended only after the host and device are put in low power mode but we should avoid clock scaling running after UFS link is put in low power mode (hibern8). This change suspends clock scaling before putting host/device in low power mode. Signed-off-by: Subhash

[PATCH v1 06/11] scsi: ufs: suspend clock scaling for failed runtime_resume

2016-10-17 Thread Subhash Jadavani
g> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index f549be3..c6fa3c0 100644 ---

[PATCH v1 06/11] scsi: ufs: suspend clock scaling for failed runtime_resume

2016-10-17 Thread Subhash Jadavani
path of runtime resume will disable clocks. As clock scaling was already resumed, it will get scheduled later on and try to access UFS registers while clocks are disabled, resulting in unclocked register access. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs

[PATCH v1 02/11] scsi: ufshcd: release resources if probe fails

2016-10-17 Thread Subhash Jadavani
. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd-pci.c| 2 ++ drivers/scsi/ufs/ufshcd-pltfrm.c | 5 + drivers/scsi/ufs/ufshcd.c| 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/driver

[PATCH v1 02/11] scsi: ufshcd: release resources if probe fails

2016-10-17 Thread Subhash Jadavani
. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd-pci.c| 2 ++ drivers/scsi/ufs/ufshcd-pltfrm.c | 5 + drivers/scsi/ufs/ufshcd.c| 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index

[PATCH v1 01/11] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-17 Thread Subhash Jadavani
once next scaling window expires. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 571a2f6..77700ee

[PATCH v1 01/11] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-17 Thread Subhash Jadavani
once next scaling window expires. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 571a2f6..77700ee 100644 --- a/drivers/scsi/ufs/ufshcd.c

Re: [PATCH] ufs: changing maintainer

2016-10-13 Thread Subhash Jadavani
On 2016-10-13 10:23, Joao Pinto wrote: Signed-off-by: Joao Pinto --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5ac91d8a..d9855b5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12084,7 +12084,8 @@ F:

Re: [PATCH] ufs: changing maintainer

2016-10-13 Thread Subhash Jadavani
On 2016-10-13 10:23, Joao Pinto wrote: Signed-off-by: Joao Pinto --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5ac91d8a..d9855b5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12084,7 +12084,8 @@ F:

[RESEND PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-11 Thread Subhash Jadavani
once next scaling window expires. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 571a2f6..77700ee

[RESEND PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-11 Thread Subhash Jadavani
once next scaling window expires. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 571a2f6..77700ee 100644 --- a/drivers/scsi/ufs/ufshcd.c

[RESEND PATCH v3] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
, this change adds one more argument to setup_clocks callback to let it know whether it is called pre/post the clock changes by core driver. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes from v2: * Added one more argument to setup_clocks callback, this should address Kiwoong

[RESEND PATCH v3] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
, this change adds one more argument to setup_clocks callback to let it know whether it is called pre/post the clock changes by core driver. Signed-off-by: Subhash Jadavani --- Changes from v2: * Added one more argument to setup_clocks callback, this should address Kiwoong Kim's comments on v2. Changes

[PATCH v3] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
, this change adds one more argument to setup_clocks callback to let it know whether it is called pre/post the clock changes by core driver. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 10 ++ drivers/scsi/ufs/ufshcd.c | 17 - d

[PATCH v3] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
, this change adds one more argument to setup_clocks callback to let it know whether it is called pre/post the clock changes by core driver. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-qcom.c | 10 ++ drivers/scsi/ufs/ufshcd.c | 17 - drivers/scsi/ufs/ufshcd.h | 8

Re: [PATCH v2] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
ck register access, this change makes sure >> that >> required clocks remain enabled before calling into vendor specific >> setup_clocks callback. >> >> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> >> --- >> Changes from v2: >> * Don't cal

Re: [PATCH v2] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
ck register access, this change makes sure >> that >> required clocks remain enabled before calling into vendor specific >> setup_clocks callback. >> >> Signed-off-by: Subhash Jadavani >> --- >> Changes from v2: >> * Don't call ufshcd_vops_setup_clocks()

[PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-06 Thread Subhash Jadavani
once next scaling window expires. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 05c7456..4011887

[PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-06 Thread Subhash Jadavani
once next scaling window expires. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 05c7456..4011887 100644 --- a/drivers/scsi/ufs/ufshcd.c

Re: [PATCH v2] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
register access, this change makes sure that required clocks remain enabled before calling into vendor specific setup_clocks callback. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes from v2: * Don't call ufshcd_vops_setup_clocks() again for clock off --- drivers/sc

Re: [PATCH v2] scsi: ufshcd: fix possible unclocked register access

2016-10-06 Thread Subhash Jadavani
register access, this change makes sure that required clocks remain enabled before calling into vendor specific setup_clocks callback. Signed-off-by: Subhash Jadavani --- Changes from v2: * Don't call ufshcd_vops_setup_clocks() again for clock off --- drivers/scsi/ufs/ufshcd.c | 22

[PATCH v2] scsi: ufshcd: fix possible unclocked register access

2016-10-05 Thread Subhash Jadavani
, this change makes sure that required clocks remain enabled before calling into vendor specific setup_clocks callback. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes from v2: * Don't call ufshcd_vops_setup_clocks() again for clock off --- drivers/scsi/ufs/ufshcd.

[PATCH v2] scsi: ufshcd: fix possible unclocked register access

2016-10-05 Thread Subhash Jadavani
, this change makes sure that required clocks remain enabled before calling into vendor specific setup_clocks callback. Signed-off-by: Subhash Jadavani --- Changes from v2: * Don't call ufshcd_vops_setup_clocks() again for clock off --- drivers/scsi/ufs/ufshcd.c | 22 +- 1 file changed

<    1   2   3   4   >