Re: [PATCH v2] mmc: core: Add support for idle time BKOPS

2012-11-11 Thread Subhash Jadavani
Thanks Maya. Looks good to me. Reviewed-by: subha...@codeaurora.org Regards, Subhash On 10/5/2012 3:58 AM, Maya Erez wrote: Devices have various maintenance operations need to perform internally. In order to reduce latencies during time critical operations like read and write, it is better to

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-15 Thread Subhash Jadavani
On 1/15/2013 9:49 PM, James Bottomley wrote: On Tue, 2013-01-15 at 21:31 +0530, Subhash Jadavani wrote: blk_rq_map_sg() function merges the physically contiguous pages to use same scatter-gather node without checking if their page descriptors are contiguous or not. Now when dma_map_sg

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-16 Thread Subhash Jadavani
On 1/16/2013 4:02 PM, James Bottomley wrote: On Wed, 2013-01-16 at 12:07 +0530, Subhash Jadavani wrote: Now consider this call stack from MMC block driver (this is on the ARmv7 based board): [ 98.918174] [c001b50c] (v7_dma_inv_range+0x30/0x48) from [c0017b8c] (dma_cache_maint_page

Re: [PATCH] mmc: core: disable the cache before suspend only after stopping BKOPS

2013-01-16 Thread Subhash Jadavani
As Maya is going to fix the commit text, Acked-by: Subhash Jadavani subha...@codeaurora.org On 1/17/2013 12:18 PM, Seungwon Jeon wrote: On Thursday, January 17, 2013 , Ulf Hansson wrote: On 13 January 2013 22:47, Maya Erez me...@codeaurora.org wrote: -Original Message- From: Subhash

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-17 Thread Subhash Jadavani
this patch? Yes, this patch also fixes the issue. You may add: Tested-by: Subhash Jadavani subha...@codeaurora.org . Regards, Subhash arch/arm/mm/dma-mapping.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma

[PATCH v1 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-11 Thread Subhash Jadavani
-gather nodes. Signed-off-by: Subhash Jadavani subha...@codeaurora.org --- block/blk-merge.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 936a110..623fca5 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -42,6

Re: [PATCH] mmc: core: disable the cache before suspend only after stopping BKOPS

2013-01-11 Thread Subhash Jadavani
On 1/12/2013 2:12 AM, Maya Erez wrote: mmc_cache_ctrl was called in runtime suspend before MMC interrupted BKOPS in case it is still running on the card. This caused the cache disable to timeout. I guess even if the idle time bkops polling is not implemented, this patch is good to have. cache

[PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-15 Thread Subhash Jadavani
-gather nodes. Signed-off-by: Subhash Jadavani subha...@codeaurora.org --- block/blk-merge.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 936a110..6eaef3d4 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -42,6

Re: [PATCH] scsi: ufs: read door bell register after clearing interrupt aggregation

2013-08-27 Thread Subhash Jadavani
Looks good to me. Reviewed-by: Subhash Jadavani subha...@codeaurora.org On 8/25/2013 4:06 PM, Dolev Raviv wrote: In interrupt context, after reading and comparing the UTRLDBR to hba-outstanding_request and before resetting the interrupt aggregation, there might be completion of another

Re: [PATCH] scsi: ufs: read door bell register after clearing interrupt aggregation

2013-08-27 Thread Subhash Jadavani
On 8/27/2013 1:50 PM, Subhash Jadavani wrote: Looks good to me. Reviewed-by: Subhash Jadavani subha...@codeaurora.org On 8/25/2013 4:06 PM, Dolev Raviv wrote: In interrupt context, after reading and comparing the UTRLDBR to hba-outstanding_request and before resetting the interrupt

[PATCH v1 3/8] scsi: ufs: add load based scaling of UFS gear

2017-02-03 Thread Subhash Jadavani
to scale gear between HS-G3 and HS-G1 based on same existing load based clock scaling logic. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 594 -- drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 428 inse

[PATCH v1 1/8] scsi: ufs: skip request abort task when previous aborts failed

2017-02-03 Thread Subhash Jadavani
Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 20 drivers/scsi/ufs/ufshcd.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

[PATCH v1 4/8] scsi: ufs: add host state prints in failure cases

2017-02-03 Thread Subhash Jadavani
driver will contribute to analysis efforts. Added prints of various fields in the hba struct which may be of interest. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 25 +++

[PATCH v1 2/8] scsi: ufs: reduce printout for aborted requests

2017-02-03 Thread Subhash Jadavani
inimal details for other subsequent requests. Signed-off-by: Gilad Broner <gbro...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 46 -- drivers/scsi/ufs/ufshcd.h | 3 +++ 2 files chan

[PATCH v1 5/8] scsi: ufs: don't suspend clock scaling during clock gating

2017-02-03 Thread Subhash Jadavani
-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 185 -- drivers/scsi/ufs/ufshcd.h | 31 +++- 2 files changed, 171 insertions(+), 45 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c

[PATCH v1 7/8] scsi: ufs-qcom: dump additional testbus registers

2017-02-03 Thread Subhash Jadavani
<venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufs-qcom.c | 48 +++-- drivers/scsi/ufs/ufs-qcom.h | 1 + 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/dr

[PATCH v1 6/8] scsi: ufs: kick start clock scaling only after device detection

2017-02-03 Thread Subhash Jadavani
UFS clock scaling might start kicking in even before the device is running at the fastest interface speed which is undesirable. This change moves the clock scaling kick start only after the device is detected and running at the fastest interface speed. Signed-off-by: Subhash Jadavani <su

[PATCH v1 8/8] scsi: ufs: dump hw regs on link failures

2017-02-03 Thread Subhash Jadavani
From: Venkat Gopalakrishnan <venk...@codeaurora.org> Dump host state, power info and host/vendor specific registers on link failures. This provides useful info to debug the failures. Signed-off-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jad

Re: [PATCH 1/4] phy: qcom-ufs: Don't kfree devres resource

2017-01-20 Thread Subhash Jadavani
acknowledge the fact that "name" is always a constant string and we don't actually need to create a local copy of it, but rather just reference the constant string. Cc: Subhash Jadavani <subha...@codeaurora.org> Cc: Vivek Gautam <vivek.gau...@codeaurora.org> Signed-o

Re: [PATCH 2/4] phy: qcom-ufs: Correct usage of regulator_get()

2017-01-20 Thread Subhash Jadavani
should not ignore errors upon failing to acquire the optional "vddp-ref-clk" supply. Cc: Subhash Jadavani <subha...@codeaurora.org> Cc: Vivek Gautam <vivek.gau...@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.anders...@linaro.org> --- drivers/phy/phy-qcom-ufs.c |

Re: [PATCH 4/4] phy: qcom-ufs: Suppress extraneous logging

2017-01-20 Thread Subhash Jadavani
when this occur. Cc: Subhash Jadavani <subha...@codeaurora.org> Cc: Vivek Gautam <vivek.gau...@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.anders...@linaro.org> --- drivers/phy/phy-qcom-ufs-qmp-14nm.c | 15 +++ drivers/phy/phy-qcom-ufs-qmp-20nm.c | 12 ++-

Re: [PATCH 3/4] phy: qcom-ufs: Remove -always-on property

2017-01-20 Thread Subhash Jadavani
regulator should be always on in a particular device, mark it so by specifying "regulator-always-on" in the regulator node. Cc: Subhash Jadavani <subha...@codeaurora.org> Cc: Vivek Gautam <vivek.gau...@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.anders...@linar

[PATCH v1 1/1] scsi: ufs-qcom: remove redundant condition check

2017-02-17 Thread Subhash Jadavani
1534__func__, host->testbus.select_minor); 1535 return false; 1536 } 1537 1538 return true; 1539 } --- As data type of "select_minor" is u8, above check is redundant. This change removes it. Reported-by: Dan Carpenter <dan.c

Re: [PATCH] scsi: ufs: Factor out ufshcd_read_desc_param

2017-02-22 Thread Subhash Jadavani
truct ufs_hba *hba, enum query_opcode opcode, enum flag_idn idn, bool *flag_res); int ufshcd_hold(struct ufs_hba *hba, bool async); void ufshcd_release(struct ufs_hba *hba); + +int ufshcd_map_desc_id_to_length(struct ufs_hba *hba, enum desc_idn desc_id, + int *desc_length);

Re: [PATCH v1 1/1] scsi: ufs-qcom: remove redundant condition check

2017-02-22 Thread Subhash Jadavani
On 2017-02-20 19:06, Martin K. Petersen wrote: "Subhash" == Subhash Jadavani <subha...@codeaurora.org> writes: Subhash, Subhash> Dan Carpenter <dan.carpen...@oracle.com> reported this: --- The Subhash> patch 9c46b8676271: "scsi: ufs-qcom: dump additional tes

[PATCH] 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> --- drivers/scsi/ufs/ufshcd.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/ufs/ufsh

[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.

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
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

[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] 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

[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

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

[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 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 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&

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 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

[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 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 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 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 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 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 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 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

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: [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 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 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 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 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

[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 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 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 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 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 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 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

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 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] 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()

[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

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:

[PATCH v1 02/12] scsi: ufs: add tracing support

2016-12-12 Thread Subhash Jadavani
ing/trace_pipe Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 133 include/trace/events/ufs.h | 149 + 2 fil

Re: [PATCH v1 12/12] scsi: ufs: Improve fatal error logs

2016-12-12 Thread Subhash Jadavani
On 2016-12-12 17:19, Joe Perches wrote: On Mon, 2016-12-12 at 16:56 -0800, Subhash Jadavani wrote: Errors such as UIC error, illegal OCS values, and others may require more information for debugging. Such information could be hibern8 events, events sequences, recoverable errors, error history

[PATCH v1 11/12] scsi: ufs: add trace event for ufs commands

2016-12-12 Thread Subhash Jadavani
ernel/debug/tracing/events/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Lee Susman <lsus...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 52 +-

[PATCH v1 10/12] scsi: ufs: add time profiling support

2016-12-12 Thread Subhash Jadavani
This patch adds the profiling support for some of the time critical operations like hibern8 enter/exit, clock gating & clock scaling. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/uf

[PATCH v1 09/12] scsi: ufs: fix setting init power mode

2016-12-12 Thread Subhash Jadavani
ed). Above issue is fixed by setting the default power mode immediately after successful link startup. Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 4 insertions(+)

[PATCH v1 01/12] scsi: ufs: dump debug info during failures

2016-12-12 Thread Subhash Jadavani
urora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 129 ++ drivers/scsi/ufs/ufshci.h | 3 ++ 2 files changed, 132 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufsh

[PATCH v1 07/12] scsi: ufs: add option to change default UFS power management level

2016-12-12 Thread Subhash Jadavani
have to tune this default power mode for different chipset platforms to meet the low power requirements/goals. Hence this patch adds option to change default UFS low power mode (level). Reviewed-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codea

[PATCH v1 08/12] scsi: ufs: add capability to keep auto bkops always enabled

2016-12-12 Thread Subhash Jadavani
regular data transfer but sometimes device may not behave properly if host keeps the auto-bkops disabled. This change adds the capability to let the device auto-bkops always enabled except suspend. Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani

[PATCH v1 03/12] scsi: ufs: fix multiple ufs spec violation

2016-12-12 Thread Subhash Jadavani
error is recognized those steps are skipped and the last step, reset and restore process, is initiated. Signed-off-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 13 - 1 file changed, 1

[PATCH v1 04/12] scsi: ufs: Add sysfs node to dynamically control clock gating

2016-12-12 Thread Subhash Jadavani
From: Sahitya Tummala <stumm...@codeaurora.org> Provide an option to enable/disable clock gating during runtime. Write 1 or 0 to "clkgate_enable" sysfs node to enable/disable clock gating. Signed-off-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: S

[PATCH v1 05/12] scsi: ufs: Add sysfs node to dynamically control clock scaling

2016-12-12 Thread Subhash Jadavani
From: Sahitya Tummala <stumm...@codeaurora.org> Provide an option to enable/disable clock scaling during runtime. Write 1/0 to "clkscale_enable" sysfs node to enable/disable clock scaling. Signed-off-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: S

[PATCH v1 06/12] scsi: ufs: provide sysfs attribute to select the PM level

2016-12-12 Thread Subhash Jadavani
This patch provides the sysfs attribute to choose the power management level for UFS runtime and system suspend. Reviewed-by: Sujit Reddy Thumma <sthu...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/uf

[PATCH v1 12/12] scsi: ufs: Improve fatal error logs

2016-12-12 Thread Subhash Jadavani
Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 202 -- drivers/scsi/ufs/ufshcd.h | 47 +++ 2 files changed, 207 insertions(+), 42 deletions(-) diff --git

[PATCH v2 04/12] scsi: ufs: Add sysfs node to dynamically control clock gating

2016-12-13 Thread Subhash Jadavani
From: Sahitya Tummala <stumm...@codeaurora.org> Provide an option to enable/disable clock gating during runtime. Write 1 or 0 to "clkgate_enable" sysfs node to enable/disable clock gating. Signed-off-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: S

[PATCH v2 06/12] scsi: ufs: provide sysfs attribute to select the PM level

2016-12-13 Thread Subhash Jadavani
This patch provides the sysfs attribute to choose the power management level for UFS runtime and system suspend. Reviewed-by: Sujit Reddy Thumma <sthu...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/uf

[PATCH v2 03/12] scsi: ufs: fix multiple ufs spec violation

2016-12-13 Thread Subhash Jadavani
error is recognized those steps are skipped and the last step, reset and restore process, is initiated. Signed-off-by: Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 13 - 1 file changed, 1

[PATCH v2 09/12] scsi: ufs: fix setting init power mode

2016-12-13 Thread Subhash Jadavani
ed). Above issue is fixed by setting the default power mode immediately after successful link startup. Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 4 insertions(+)

[PATCH v2 12/12] scsi: ufs: Improve fatal error logs

2016-12-13 Thread Subhash Jadavani
Dolev Raviv <dra...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes v1 -> v2: - Added explicit new line character at the end of the printk messages. --- drivers/scsi/ufs/ufshcd.c | 203 -- drivers/sc

[PATCH v2 07/12] scsi: ufs: add option to change default UFS power management level

2016-12-13 Thread Subhash Jadavani
have to tune this default power mode for different chipset platforms to meet the low power requirements/goals. Hence this patch adds option to change default UFS low power mode (level). Reviewed-by: Yaniv Gardi <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codea

[PATCH v2 11/12] scsi: ufs: add trace event for ufs commands

2016-12-13 Thread Subhash Jadavani
ernel/debug/tracing/events/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Lee Susman <lsus...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 52 +-

[PATCH v2 08/12] scsi: ufs: add capability to keep auto bkops always enabled

2016-12-13 Thread Subhash Jadavani
regular data transfer but sometimes device may not behave properly if host keeps the auto-bkops disabled. This change adds the capability to let the device auto-bkops always enabled except suspend. Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani

[PATCH v2 10/12] scsi: ufs: add time profiling support

2016-12-13 Thread Subhash Jadavani
This patch adds the profiling support for some of the time critical operations like hibern8 enter/exit, clock gating & clock scaling. Reviewed-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/uf

[PATCH v2 02/12] scsi: ufs: add tracing support

2016-12-13 Thread Subhash Jadavani
ing/trace_pipe Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 133 include/trace/events/ufs.h | 149 + 2 fil

[PATCH v2 05/12] scsi: ufs: Add sysfs node to dynamically control clock scaling

2016-12-13 Thread Subhash Jadavani
From: Sahitya Tummala <stumm...@codeaurora.org> Provide an option to enable/disable clock scaling during runtime. Write 1/0 to "clkscale_enable" sysfs node to enable/disable clock scaling. Signed-off-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: S

Re: [PATCH v2 11/12] scsi: ufs: add trace event for ufs commands

2016-12-13 Thread Subhash Jadavani
On 2016-12-13 12:22, Steven Rostedt wrote: On Tue, 13 Dec 2016 11:52:16 -0800 Subhash Jadavani <subha...@codeaurora.org> wrote: From: Lee Susman <lsus...@codeaurora.org> Use the ftrace infrastructure to conditionally trace ufs command events. New trace event is created, w

[PATCH v2 01/12] scsi: ufs: dump debug info during failures

2016-12-13 Thread Subhash Jadavani
urora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes v1 -> v2: - Added explicit new line character at the end of the printk messages. - Fixed couple of checkpatch warnings. --- drivers/scsi/ufs/ufshcd.c | 129 +++

Re: [PATCH v2 02/12] scsi: ufs: add tracing support

2016-12-13 Thread Subhash Jadavani
On 2016-12-13 12:10, Steven Rostedt wrote: On Tue, 13 Dec 2016 11:48:45 -0800 Subhash Jadavani <subha...@codeaurora.org> wrote: This change adds the ftrace support for following: 1. UFS initialization time 2. Clock gating states 3. Clock scaling states 4. Power management APIs latency 5.

Re: [PATCH v1 07/12] scsi: ufs: add option to change default UFS power management level

2016-12-13 Thread Subhash Jadavani
On 2016-12-13 12:04, Rob Herring wrote: On Mon, Dec 12, 2016 at 04:54:20PM -0800, Subhash Jadavani wrote: UFS device and link can be put in multiple different low power modes hence UFS driver supports multiple different low power modes. By default UFS driver selects the default (optimal) low

  1   2   3   4   >