Re: [RFC PATCH V2] scsi: ufs: Add specific callback for setting DMA mask

2018-05-16 Thread Subhash Jadavani
On 2018-05-15 21:31, Alim Akhtar wrote: Ping !!! On Thu, Mar 8, 2018 at 4:33 PM, Alim Akhtar wrote: Currently DMA mask for UFS HCI is set by reading CAP register's [64AS] bit. Some HCI controller like Exynos support 36-bit bus address. This works perfectly fine with DMA mask set as 64 in ca

Re: [PATCH 4/4] scsi: ufs: make ufshcd_config_pwr_mode of non-static func

2018-05-16 Thread Subhash Jadavani
); +extern int ufshcd_config_pwr_mode(struct ufs_hba *hba, + struct ufs_pa_layer_attr *desired_pwr_mode); /* UIC command interfaces for DME primitives */ #define DME_LOCAL 0 Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a

Re: [PATCH 3/4] scsi: ufs: add quirk to enable host controller without hce

2018-05-16 Thread Subhash Jadavani
ks;/* Deviations from standard UFSHCI spec. */ /* Device deviations from standard UFS device spec. */ Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 2/4] scsi: ufs: add quirk not to allow reset of interrupt aggregation

2018-05-16 Thread Subhash Jadavani
UIRK_SKIP_RESET_INTR_AGGR 0x200 + unsigned int quirks;/* Deviations from standard UFSHCI spec. */ /* Device deviations from standard UFS device spec. */ Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of C

Re: [PATCH 1/4] scsi: ufs: add quirk to fix mishandling utrlclr/utmrlclr

2018-05-16 Thread Subhash Jadavani
ist is just opposite. +*/ + #define UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR0x100 + unsigned int quirks;/* Deviations from standard UFSHCI spec. */ /* Device deviations from standard UFS device spec. */ Looks good to me. Reviewed-by: Subhash Jadavani

Re: [PATCH v2 2/2] scsi: ufs: Use freq table with devfreq

2018-05-16 Thread Subhash Jadavani
caling.workq); + ufshcd_devfreq_remove(hba); } ufshcd_setup_clocks(hba, false); ufshcd_setup_hba_vreg(hba, false); Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH v2 10/10] scsi: ufs: Add clock ungating to a separate workqueue

2018-05-16 Thread Subhash Jadavani
i/ufs/ufshcd.h @@ -361,6 +361,7 @@ struct ufs_clk_gating { struct device_attribute enable_attr; bool is_enabled; int active_reqs; + struct workqueue_struct *clk_gating_workq; }; struct ufs_saved_pwr_info { Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH v2 07/10] scsi: ufs-qcom: remove broken hci version quirk

2018-05-16 Thread Subhash Jadavani
On 2018-05-03 04:07, Asutosh Das wrote: From: Subhash Jadavani UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION is only applicable for QCOM UFS host controller version 2.x.y and this has been fixed from version 3.x.y onwards, hence this change removes this quirk for version 3.x.y onwards. Signed-off

Re: [PATCH v2 08/10] scsi: ufs: make sure all interrupts are processed

2018-05-16 Thread Subhash Jadavani
_unlock(hba->host->host_lock); return retval; } Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH v2 06/10] scsi: ufs: add reference counting for scsi block requests

2018-05-16 Thread Subhash Jadavani
On 2018-05-03 04:07, Asutosh Das wrote: From: Subhash Jadavani Currently we call the scsi_block_requests()/scsi_unblock_requests() whenever we want to block/unblock scsi requests but as there is no reference counting, nesting of these calls could leave us in undesired state sometime. Consider

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

2018-05-16 Thread Subhash Jadavani
On 2018-05-03 04:07, Asutosh Das wrote: From: Subhash Jadavani vendor specific setup_clocks ops may depend on clocks managed by ufshcd driver so if the vendor specific setup_clocks callback is called when the required clocks are turned off, it results into unclocked register access. This

Re: [PATCH v2 04/10] scsi: ufs: fix exception event handling

2018-05-16 Thread Subhash Jadavani
retransmissions of the query requests, in case of timeout. Signed-off-by: Subhash Jadavani Signed-off-by: Maya Erez Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

Re: [PATCH v2 03/10] scsi: ufs: Add LCC quirk for host and device

2018-05-16 Thread Subhash Jadavani
we don't want to disable the LCC on both host & device; hence this change splits the quirk in 2 parts one for host and one for device. Signed-off-by: Subhash Jadavani Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufsh

Re: [PATCH v2 02/10] scsi: ufs-qcom: Enable UFSHCD_QUIRK_BROKEN_PWR_MODE_CHANGE quirk

2018-05-16 Thread Subhash Jadavani
On 2018-05-03 04:07, Asutosh Das wrote: Enable UFSHCD_QUIRK_BROKEN_PWR_MODE_CHANGE quirk to avoid failures in seen on some UFS devices. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/d

Re: [PATCH v2 01/10] scsi: ufs: Allowing power mode change

2018-05-16 Thread Subhash Jadavani
On 2018-05-03 04:07, Asutosh Das wrote: From: Yaniv Gardi Due to M-PHY issues, moving from HS to any other mode or gear or even Hibern8 may cause some un-predicted behavior of the device. This patch adds provides a quirk to address that. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash

Re: [PATCH] scsi: ufs: ufshcd: Remove VLA usage

2018-05-16 Thread Subhash Jadavani
X_MODEL_LEN] = '\0'; out: + kfree(desc_buf); return err; } -- 2.17.0 Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 3/3] scsi: ufs: Use freq table with devfreq

2018-04-24 Thread Subhash Jadavani
t;freq_table[0] = clki->min_freq; + profile->freq_table[1] = clki->max_freq; + devfreq = devm_devfreq_add_device(hba->dev, - &ufs_devfreq_profile, + profile, "simple_ondemand",

Re: [PATCH 2/3] scsi: ufs: Extract devfreq registration

2018-04-24 Thread Subhash Jadavani
goto out; - } } hba->clk_scaling.is_allowed = true; } Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 1/1] scsi: ufs: fix exception event handling

2018-02-08 Thread Subhash Jadavani
retransmissions of the query requests, in case of timeout. Signed-off-by: Subhash Jadavani Signed-off-by: Maya Erez Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

Re: [PATCH] phy: qcom-ufs: add missing MODULE_DESCRIPTION/LICENSE

2017-11-21 Thread Subhash Jadavani
(UFS) QCOM PHY"); +MODULE_LICENSE("GPL v2"); Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg

2017-11-21 Thread Subhash Jadavani
et_voltage(reg, min_uV, vreg->max_uV); Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH v2 5/5] ufs/phy: qcom: Refactor to use phy_init call

2017-10-13 Thread Subhash Jadavani
phy *phy); int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes); -int ufs_qcom_phy_calibrate_phy(struct phy *phy, bool is_rate_B); -int ufs_qcom_phy_is_pcs_ready(struct phy *phy); void ufs_qcom_phy_save_controller_version(struct phy *phy, u8 major, u16 minor, u16 step); Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 5/5] ufs/phy: qcom: Refactor to use phy_init call

2017-09-26 Thread Subhash Jadavani
Hi Vivek, Please find one comment inline below, rest look good. Regards, Subhash On 2017-08-03 23:48, Vivek Gautam wrote: Refactor ufs_qcom_power_up_sequence() to get rid of ugly exported phy APIs and use the phy_init() and phy_power_on() to do the phy initialization. Signed-off-by: Vivek Gau

Re: [PATCH 4/5] scsi/ufs: qcom: Set phy mode based on the controllers HS MODE

2017-09-26 Thread Subhash Jadavani
); /* provide 1ms delay to let the reset pulse propagate */ Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1

2017-09-26 Thread Subhash Jadavani
) || + (hba->ufs_version == UFSHCI_VERSION_11)) lrbp->command_type = UTP_CMD_TYPE_SCSI; + else + lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE; if (likely(lrbp->cmd)) { ufshcd_prepare_req_desc_hdr(lrbp, &upiu_flags,

Re: [PATCH] scsi: ufs: continue to boot even with Boot LUN is disabled

2017-09-26 Thread Subhash Jadavani
e_put(sdev_boot); goto out; -remove_sdev_boot: - scsi_remove_device(sdev_boot); remove_sdev_ufs_device: scsi_remove_device(hba->sdev_ufs_device); out: Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code

Re: [PATCH v2 2/5] dt-bindings: scsi: ufs: add document for hi3660-ufs

2017-06-22 Thread Subhash Jadavani
On 2017-06-22 04:51, Arnd Bergmann wrote: On Thu, Jun 22, 2017 at 1:44 PM, Bu Tao wrote: 在 2017/6/17 5:51, Arnd Bergmann 写道: On Fri, Jun 16, 2017 at 8:51 AM, Bu Tao wrote: +Optional properties for board device: +- ufs-hi3660-use-rate-B: specifies UFS rate-B +- ufs-hi3660-brok

Re: [PATCH 1/3] scsi:ufs:add AHIT for hi3660 ufs

2017-06-12 Thread Subhash Jadavani
On 2017-06-09 18:20, butao wrote: add Auto-Hibernate Idle Timer value for hi3660 ufs Signed-off-by: Bu Tao Signed-off-by: Geng Jianfeng Signed-off-by: Zang Leigang Signed-off-by: Yu Jianfeng --- drivers/scsi/ufs/ufshci.h | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755

Re: [PATCH 2/2] scsi: ufshcd-intel-pci: Add PCI driver for Intel Host controllers

2017-06-05 Thread Subhash Jadavani
On 2017-06-05 01:36, Adrian Hunter wrote: From: Szymon Mielczarek This patch adds a glue pci driver for Intel UFS Host controllers. Signed-off-by: Szymon Mielczarek Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/Kconfig| 11 +++ drivers/scsi/ufs/Makefile | 1 + d

Re: [PATCH 1/2] scsi: ufs: Tidy clocks list head usage

2017-06-05 Thread Subhash Jadavani
list_for_each_entry(clki, head, list) { @@ -7811,6 +7811,8 @@ int ufshcd_alloc_host(struct device *dev, struct ufs_hba **hba_handle) hba->dev = dev; *hba_handle = hba; + INIT_LIST_HEAD(&hba->clk_list_head); + out_error: return err; } Looks good to m

Re: [PATCH 3/3] scsi: ufs: Delete an unnecessary return statement in ufshcd_exception_event_handler()

2017-04-26 Thread Subhash Jadavani
tatic void ufshcd_exception_event_handler(struct work_struct *work) out: pm_runtime_put_sync(hba->dev); - return; } /* Complete requests that have door-bell cleared */ Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora F

Re: [PATCH 2/3] scsi: ufs: Delete an error message for a failed memory allocation in ufshcd_memory_alloc()

2017-04-26 Thread Subhash Jadavani
on failed\n"); + if (!hba->lrb) goto out; - } + return 0; out: return -ENOMEM; Looks good to me. Reviewed-by: Subhash Jadavani PS: ufshcd_memory_alloc() also does some DMA coherent memory allocation (via dmam_alloc_coherent() APIs) and tries

Re: [PATCH 1/3] scsi: ufs: Use devm_kcalloc() in ufshcd_memory_alloc()

2017-04-26 Thread Subhash Jadavani
lrb) { dev_err(hba->dev, "LRB Memory allocation failed\n"); Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] scsi: ufs: remove the duplicated checking for supporting clkscaling

2017-03-24 Thread Subhash Jadavani
wed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR

2017-03-15 Thread Subhash Jadavani
goto out; } LGTM. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [scsi] scsi: ufs: don't check unsigned type for a negative value

2017-03-15 Thread Subhash Jadavani
On 2017-03-15 10:26, James Bottomley wrote: On Mon, 2017-03-13 at 17:19 -0700, Subhash Jadavani wrote: On 2017-03-12 03:22, Tomas Winkler wrote: > Fix compilation warning > > drivers/scsi/ufs/ufshcd.c:7645:13: warning: comparison of unsigned > expression < 0 is always false [-Wty

Re: [scsi] scsi: ufs: don't check unsigned type for a negative value

2017-03-13 Thread Subhash Jadavani
flags); 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] scsi: ufs: Factor out ufshcd_read_desc_param

2017-03-01 Thread Subhash Jadavani
On 2017-02-27 19:24, Martin K. Petersen wrote: "Michal" == Potomski, MichalX writes: Michal> Since in UFS 2.1 specification some of the descriptor lengths Michal> differs from 2.0 specification and some devices, which are Michal> reporting spec version 2.0 have different descriptor lengths we

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 writes: Subhash, Subhash> Dan Carpenter reported this: --- The Subhash> patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus Subhash> registers" from Feb 3, 2017, leads to

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

2017-02-22 Thread Subhash Jadavani
ns true if clocks can be gated. Otherwise false */ @@ -733,6 +744,10 @@ int ufshcd_query_flag(struct 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_ma

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

2017-02-17 Thread Subhash Jadavani
__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 Signed-off-by: Subha

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

2017-02-03 Thread Subhash Jadavani
From: Venkat Gopalakrishnan 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 12 +++- 1 file changed

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

2017-02-03 Thread Subhash Jadavani
From: Venkat Gopalakrishnan Change testbus default config, dump additional testbus registers along with other debug vendor specific registers. These additional info are useful in debugging link related failures. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers

[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

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

2017-02-03 Thread Subhash Jadavani
ff-by: Subhash Jadavani --- 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 index 056e912..4f6ba24 100644

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

2017-02-03 Thread Subhash Jadavani
efforts. Added prints of various fields in the hba struct which may be of interest. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi

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

2017-02-03 Thread Subhash Jadavani
rt to scale gear between HS-G3 and HS-G1 based on same existing load based clock scaling logic. Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 594 -- drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 428 insertions(+), 175 deletions(-)

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

2017-02-03 Thread Subhash Jadavani
subsequent requests. Signed-off-by: Gilad Broner Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 46 -- drivers/scsi/ufs/ufshcd.h | 3 +++ 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi

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

2017-02-03 Thread Subhash Jadavani
Signed-off-by: Subhash Jadavani --- 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/scsi/ufs/ufshcd.c index a70bf06..61fea17 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b

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

2017-01-20 Thread Subhash Jadavani
when this occur. Cc: Subhash Jadavani Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- drivers/phy/phy-qcom-ufs-qmp-14nm.c | 15 +++ drivers/phy/phy-qcom-ufs-qmp-20nm.c | 12 ++-- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/phy/phy-qcom-ufs-qmp

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 Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - drivers/phy/phy-qc

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 Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- drivers/phy/phy-qcom-ufs.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/ph

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 Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- drivers/phy/phy-qcom-ufs.c | 9 + 1

Re: [scsi 4/4] scsi: ufs: refactor device descriptor reading

2017-01-10 Thread Subhash Jadavani
__func__, ret); + goto out; + } + + ufs_fixup_device_setup(hba, &card); ufshcd_tune_unipro_params(hba); ret = ufshcd_set_vccq_rail_unused(hba, Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [scsi 3/4] scsi: ufs: ufshcd_get_max_icc_level fix endianity handling

2017-01-10 Thread Subhash Jadavani
L_UNIT_MASK) >> ATTR_ICC_LVL_UNIT_OFFSET; curr_uA = data & ATTR_ICC_LVL_VALUE_MASK; Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [scsi 2/4] scsi: ufs: unexport descritpor reading functions

2017-01-10 Thread Subhash Jadavani
struct ufs_hba *hba, int desc_index, u8 *buf, - u32 size, bool ascii); - /* Expose Query-Request API */ int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode, enum flag_idn idn, bool *flag_res); Looks good to me. Reviewed-by: Subhash Jadavani

Re: [scsi 1/4] scsi: ufs: ufshcd_query_descriptor_retry should be static

2017-01-10 Thread Subhash Jadavani
); /** * ufshcd_read_desc_param - read the specified descriptor parameter Looks good to me. Reviewed-by: Subhash Jadavani -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

[PATCH v1] scsi: ufs: fix arguments order some trace calls

2017-01-10 Thread Subhash Jadavani
tem_resume, and trace_ufshcd_init Where: hba->uic_link_state is passed to dev_state hba->curr_dev_pwr_mode is passed to link_state This wasn't intentional so it's a bug. This change fixed this bug. Reported-by: Colin Ian King Signed-off-by: Subhash Jadavani --- driv

Re: [PATCH] scsi: ufs-qcom: Fix module autoload

2017-01-03 Thread Subhash Jadavani
_device_id ufs_qcom_of_match[] = { { .compatible = "qcom,ufshc"}, {}, }; +MODULE_DEVICE_TABLE(of, ufs_qcom_of_match); static const struct dev_pm_ops ufs_qcom_pm_ops = { .suspend= ufshcd_pltfrm_suspend, Looks good to me. Reviewed-by: Subhash Jadavani -- The

[PATCH v3 07/12] scsi: ufs: set default UFS power management level

2016-12-22 Thread Subhash Jadavani
good power savings with relatively less enter/exit latencies. Reviewed-by: Yaniv Gardi Signed-off-by: Subhash Jadavani --- Changes from v2 -> v3: - Simplified patch to just set the default power management level. Device tree capability to specify broken hardware will be taken up

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

2016-12-22 Thread Subhash Jadavani
doing any 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

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

2016-12-22 Thread Subhash Jadavani
: Subhash Jadavani --- Changes from v1 -> v2: - Added explicit new line character at the end of the printk messages. --- drivers/scsi/ufs/ufshcd.c | 203 -- drivers/scsi/ufs/ufshcd.h | 47 +++ 2 files changed, 208 insertions(+), 42 deletions(-) d

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

2016-12-22 Thread Subhash Jadavani
. Above issue is fixed by setting the default power mode immediately after successful link startup. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drive

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

2016-12-22 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 24 include/trace/events/ufs.h

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

2016-12-22 Thread Subhash Jadavani
ts/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Lee Susman Signed-off-by: Subhash Jadavani --- Changes from v2 -> v3: - Removed conditional compilation based on CONFIG_TRACEPOINTS and used trace_*_enabled() to skip unnecessary code path execution. --- drivers/scsi/uf

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

2016-12-22 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 144 ++ drivers/scsi/ufs/ufshcd.h | 2

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

2016-12-22 Thread Subhash Jadavani
From: Sahitya Tummala 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

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

2016-12-22 Thread Subhash Jadavani
From: Sahitya Tummala 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

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

2016-12-22 Thread Subhash Jadavani
are skipped and the last step, reset and restore process, is initiated. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

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

2016-12-22 Thread Subhash Jadavani
ing/trace_pipe Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- Changes from v2 -> v3: - Used TRACE_DEFINE_ENUM to print out enums --- drivers/scsi/ufs/ufshcd.c | 85 ++--- include/trace/events/ufs.h | 185 + 2 files change

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

2016-12-22 Thread Subhash Jadavani
From: Dolev Raviv Inserts driver dumps for UFS Host Controller registers, Transfer Requests and Task Management Requests. The dumps will occur on driver initialization failure, ufshcd_abort() and on error handling path. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- Changes

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

2016-12-20 Thread Subhash Jadavani
On 2016-12-19 10:38, Rob Herring wrote: On Tue, Dec 13, 2016 at 2:16 PM, Subhash Jadavani wrote: 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

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 wrote: From: Lee Susman Use the ftrace infrastructure to conditionally trace ufs command events. New trace event is created, which samples the following ufs command data: - device name

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 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. BKOPs enable/disable Usage

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

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

2016-12-13 Thread Subhash Jadavani
From: Dolev Raviv Inserts driver dumps for UFS Host Controller registers, Transfer Requests and Task Management Requests. The dumps will occur on driver initialization failure, ufshcd_abort() and on error handling path. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- Changes v1

[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 Signed-off-by: Subhash Jadavani --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt

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

2016-12-13 Thread Subhash Jadavani
ts/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Lee Susman Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 52 +- include/trace/events/ufs.h | 38 + 2 files changed, 89 insertions(+

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

2016-12-13 Thread Subhash Jadavani
doing any 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

[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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 24 include/trace/events/ufs.h

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

2016-12-13 Thread Subhash Jadavani
. Above issue is fixed by setting the default power mode immediately after successful link startup. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drive

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

2016-12-13 Thread Subhash Jadavani
: Subhash Jadavani --- Changes v1 -> v2: - Added explicit new line character at the end of the printk messages. --- drivers/scsi/ufs/ufshcd.c | 203 -- drivers/scsi/ufs/ufshcd.h | 47 +++ 2 files changed, 208 insertions(+), 42 deletions(-) diff --

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

2016-12-13 Thread Subhash Jadavani
are skipped and the last step, reset and restore process, is initiated. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

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

2016-12-13 Thread Subhash Jadavani
From: Sahitya Tummala 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

[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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 122 ++ drivers/scsi/ufs/ufshcd.h | 2

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

2016-12-13 Thread Subhash Jadavani
From: Sahitya Tummala 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

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

2016-12-13 Thread Subhash Jadavani
ing/trace_pipe Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 133 include/trace/events/ufs.h | 149 + 2 files changed, 270 insertions(+), 12 deletions(-) create mode 100

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 12/12] scsi: ufs: Improve fatal error logs

2016-12-12 Thread Subhash Jadavani
: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 202 -- drivers/scsi/ufs/ufshcd.h | 47 +++ 2 files changed, 207 insertions(+), 42 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c19cf40..c13549f 100644 --- a

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

2016-12-12 Thread Subhash Jadavani
ts/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Lee Susman Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 52 +- include/trace/events/ufs.h | 38 + 2 files changed, 89 insertions(+

[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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 24 include/trace/events/ufs.h

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

2016-12-12 Thread Subhash Jadavani
. Above issue is fixed by setting the default power mode immediately after successful link startup. Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drive

[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 Signed-off-by: Subhash Jadavani --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt

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

2016-12-12 Thread Subhash Jadavani
doing any 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

[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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 122 ++ drivers/scsi/ufs/ufshcd.h | 2

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

2016-12-12 Thread Subhash Jadavani
are skipped and the last step, reset and restore process, is initiated. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

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

2016-12-12 Thread Subhash Jadavani
From: Sahitya Tummala 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

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

2016-12-12 Thread Subhash Jadavani
From: Sahitya Tummala 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 Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs

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

2016-12-12 Thread Subhash Jadavani
ing/trace_pipe Reviewed-by: Sahitya Tummala Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 133 include/trace/events/ufs.h | 149 + 2 files changed, 270 insertions(+), 12 deletions(-) create mode 100

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

2016-12-12 Thread Subhash Jadavani
From: Dolev Raviv Inserts driver dumps for UFS Host Controller registers, Transfer Requests and Task Management Requests. The dumps will occur on driver initialization failure, ufshcd_abort() and on error handling path. Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani --- drivers

  1   2   >