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

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

2018-05-16 Thread Subhash Jadavani
u32 attr_sel, u32 *mib_val, u8 peer); +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 Jad

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

2018-05-16 Thread Subhash Jadavani
0 unsigned int quirks;/* Deviations from standard UFSHCI spec. */ /* Device deviations from standard UFS device spec. */ Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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
nd counter are reset by s/w. +*/ + #define UFSHCI_QUIRK_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 <subha...@co

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

2018-05-16 Thread Subhash Jadavani
+* Cleaer handling for transfer/task request list 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

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

2018-05-16 Thread Subhash Jadavani
; + ufshcd_devfreq_remove(hba); } ufshcd_setup_clocks(hba, false); ufshcd_setup_hba_vreg(hba, false); Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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
100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/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 m

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 <subha...@codeaurora.org> 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

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

2018-05-16 Thread Subhash Jadavani
, enabled_intr_status); - retval = IRQ_HANDLED; - } spin_unlock(hba->host->host_lock); return retval; } Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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 <subha...@codeaurora.org> 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 und

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 <subha...@codeaurora.org> 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 unc

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

2018-05-16 Thread Subhash Jadavani
eption events and allow retransmissions of the query requests, in case of timeout. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Maya Erez <me...@codeaurora.org> Signed-off-by: Can Guo <c...@codeaurora.org> Signed-off-by: Asutosh Das <asuto...@codeaurora

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 <subha...@codeaurora.org> Signed-off-by: Venkat Gopalakrishnan <venk...@codeaurora.org> Signed-off-by: Can Guo <

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

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

2018-05-16 Thread Subhash Jadavani
i <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Can Guo <c...@codeaurora.org> Signed-off-by: Asutosh Das <asuto...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 8 +++- drivers/scsi/ufs/ufshcd.h | 7 +++ 2 file

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

2018-05-16 Thread Subhash Jadavani
el[MAX_MODEL_LEN] = '\0'; out: + kfree(desc_buf); return err; } -- 2.17.0 Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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
gt;min_freq; + profile->freq_table[1] = clki->max_freq; + devfreq = devm_devfreq_add_device(hba->dev, - _devfreq_profile, + profile, "simple_ondemand", NULL); if (I

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

2018-04-24 Thread Subhash Jadavani
); + if (ret) goto out; - } } hba->clk_scaling.is_allowed = true; } Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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
eption events and allow retransmissions of the query requests, in case of timeout. Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> Signed-off-by: Maya Erez <me...@codeaurora.org> Signed-off-by: Can Guo <c...@codeaurora.org> Signed-off-by: Asutosh Das <asuto...@codeaurora

Re: [PATCH] scsi: ufs: Fix Runtime PM

2017-11-21 Thread Subhash Jadavani
On 2017-11-13 01:14, Michal Potomski wrote: From: Michał Potomski Recent testing of Runtime PM for UFS has shown it's not working as intended. To acheive fully working Runtime PM, first we have to put back scsi_device autopm reference counter. Existing

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

2017-11-21 Thread Subhash Jadavani
gt;min_uV : 0; ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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
truct 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 m

Re: [PATCH] scsi: ufs: add ufs a command complete time stamp

2017-09-27 Thread Subhash Jadavani
t task flag */ struct ufshcd_lrb { @@ -189,6 +190,7 @@ struct ufshcd_lrb { u8 lun; /* UPIU LUN id field is only 8-bit wide */ bool intr_cmd; ktime_t issue_time_stamp; + ktime_t compl_time_stamp; bool req_abort_skip; }; Looks good to me. Reviewed-by: Subhash

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

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

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

Re: UFS maximum access unit is 8KB

2017-09-26 Thread Subhash Jadavani
On 2017-08-09 00:28, Bean Huo (beanhuo) wrote: Hi, I am now using one hikey960, and Linux kernel version is 4.4.77. And found that for UFS driver version, the maximum transformation is 8KB. Means that if I using 128KB chuck size to program in the user space, but, from ftrace/blktrace, It shows

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

2017-09-26 Thread Subhash Jadavani
c_hdr(lrbp, _flags, Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] scsi: ufs: fix a pclint warning

2017-09-26 Thread Subhash Jadavani
"pwr ctrl cmd 0x%x failed, host upmcrs:0x%x\n", cmd->command, status); ret = (status != PWR_OK) ? status : -1; } Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is

Re: [PATCH] scsi: ufs: add ufs a command complete time stamp

2017-09-26 Thread Subhash Jadavani
On 2017-09-20 03:30, Zang Leigang wrote: Signed-off-by: Zang Leigang diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 794a4600e952..2984f33095be 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -385,6 +385,8 @@ void

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

2017-09-26 Thread Subhash Jadavani
+ scsi_device_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 <subha...@codeaurora.org> -- The Qual

Re: [PATCH] scsi: ufs: set host_byte to DID_REQUEUE when ocs = OCS_ABORTED

2017-07-03 Thread Subhash Jadavani
On 2017-06-28 19:25, Zang Leigang wrote: On Wed, Jun 28, 2017 at 04:42:36PM -0700, Subhash Jadavani wrote: On 2017-06-24 03:27, Zang Leigang wrote: >Host set ocs to OCS_ABORTED when clear a doorbell in err handler. OCS field is valid after host controller has cleared the corresponding doorb

Re: [PATCH] scsi: ufs: check link active or not after switch to HS mode

2017-06-28 Thread Subhash Jadavani
On 2017-06-24 04:44, Zang Leigang wrote: Some device can successfully link and switch to HS mode. But failed to do more. ufshcd_verify_dev_init can help to find this earlier. Signed-off-by: Zang Leigang diff --git a/drivers/scsi/ufs/ufshcd.c

Re: [PATCH] scsi: ufs: flush eh_work when eh_work scheduled.

2017-06-28 Thread Subhash Jadavani
); dev_dbg(hba->dev, "%s: reset in progress\n", __func__); Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] scsi: ufs: set host_byte to DID_REQUEUE when ocs = OCS_ABORTED

2017-06-28 Thread Subhash Jadavani
On 2017-06-24 03:27, Zang Leigang wrote: Host set ocs to OCS_ABORTED when clear a doorbell in err handler. OCS field is valid after host controller has cleared the corresponding doorbell (UTRLDBR) bit to zero. And here HW would be clearing the doorbell bit, not the SW. So I am not sure what

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:

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

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

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

2017-06-05 Thread Subhash Jadavani
goto out; 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(>clk_list_head); + out_error: re

Re: [PATCH] scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove

2017-05-18 Thread Subhash Jadavani
t;host); /* disable interrupts */ ufshcd_disable_intr(hba, hba->intr_mask); Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

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

2017-04-26 Thread Subhash Jadavani
ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4966,7 +4966,6 @@ static 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

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
{ - dev_err(hba->dev, "LRB Memory allocation failed\n"); + if (!hba->lrb) goto out; - } + return 0; out: return -ENOMEM; Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> PS: ufshcd_me

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

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

Re: [PATCH v2] scsi: ufs: make ufshcd_get_lists_status() register operation obvious

2017-04-26 Thread Subhash Jadavani
(UTP_TRANSFER_REQ_LIST_READY |\ + UTP_TASK_REQ_LIST_READY |\ + UIC_COMMAND_READY) + enum { PWR_OK = 0x0, PWR_LOCAL = 0x01, Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innov

Re: [PATCH 2/2] scsi: ufs: make ufshcd_get_lists_status() register operation obvious

2017-04-26 Thread Subhash Jadavani
On 2017-04-20 05:01, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi It could be just cmp 0xe instead of >>1 and cmp 0x7, with readable code. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 11 +--

Re: [PATCH 1/2] scsi: ufs: use MASK_EE_STATUS

2017-04-26 Thread Subhash Jadavani
etry(hba, UPIU_QUERY_OPCODE_WRITE_ATTR, QUERY_ATTR_IDN_EE_CONTROL, 0, 0, ); if (!err) Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 6/6] scsi: ufs: just use sizeof() for snprintf()

2017-03-28 Thread Subhash Jadavani
host->host_no); hba->clk_scaling.workq = create_singlethread_workqueue(wq_name); Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 5/6] scsi: ufs: remove deprecated enum for hw interrupt

2017-03-28 Thread Subhash Jadavani
n options */ -enum { - UFSHCD_INT_DISABLE, - UFSHCD_INT_ENABLE, - UFSHCD_INT_CLEAR, -}; - #define ufshcd_set_eh_in_progress(h) \ ((h)->eh_flags |= UFSHCD_EH_IN_PROGRESS) #define ufshcd_eh_in_progress(h) \ Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeauro

Re: [PATCH 4/6] scsi: ufs: add missing macros for register bits from UFSHCI spec

2017-03-28 Thread Subhash Jadavani
LLER_DISABLE 0x0 +#define CRYPTO_GENERAL_ENABLE UFS_BIT(1) /* UECPA - Host UIC Error Code PHY Adapter Layer 38h */ #define UIC_PHY_ADAPTER_LAYER_ERRORUFS_BIT(31) Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Inno

Re: [PATCH 3/6] scsi: ufs: non functional macro fix

2017-03-28 Thread Subhash Jadavani
cancel gating * work and to enable clocks. */ Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 2/6] scsi: ufs: use existing macro CONTROLLER_ENABLE to test register bit

2017-03-28 Thread Subhash Jadavani
ctive(struct ufs_hba *hba) { - return (ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & 0x1) ? false : true; + return (ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & CONTROLLER_ENABLE) + ? false : true; } static const char *ufschd_uic_link_state_to_string( Looks good to me.

Re: [PATCH 1/6] scsi: ufs: make ufshcd_is_{device_present,hba_active}() return bool

2017-03-28 Thread Subhash Jadavani
_to_string( Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] Revert "scsi: ufs: add queries retry mechanism"

2017-03-28 Thread Subhash Jadavani
etry(hba, UPIU_QUERY_OPCODE_WRITE_ATTR, + QUERY_ATTR_IDN_ACTIVE_ICC_LVL, 0, 0, + >init_prefetch_data.icc_level); if (ret) dev_err(hba->dev, Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] scsi: ufs: fix wrong/ambiguous fall through comments

2017-03-24 Thread Subhash Jadavani
I_VERSION_21: default: intr_mask = INTERRUPT_MASK_ALL_VER_21; + break; } return intr_mask; Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,

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

2017-03-24 Thread Subhash Jadavani
s */ Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- 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 <subha...@codeaurora.org> -- 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

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

2017-03-13 Thread Subhash Jadavani
->host->host_lock, flags); LGTM. Reviewed-by: Subhash Jadavani <subha...@codaurora.org> -- 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

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

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

[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: [bug report] scsi: ufs-qcom: dump additional testbus registers

2017-02-16 Thread Subhash Jadavani
On 2017-02-13 23:58, Dan Carpenter wrote: Hello Venkat Gopalakrishnan, The patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus registers" from Feb 3, 2017, leads to the following static checker warning: drivers/scsi/ufs/ufs-qcom.c:1531 ufs_qcom_testbus_cfg_is_ok()

[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

[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 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 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 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 0/8] scsi: ufs: enhancements, bug fixes and debug support

2017-02-03 Thread Subhash Jadavani
(3): scsi: ufs: skip request abort task when previous aborts failed scsi: ufs: reduce printout for aborted requests scsi: ufs: add host state prints in failure cases Subhash Jadavani (3): scsi: ufs: add load based scaling of UFS gear scsi: ufs: don't suspend clock scaling during clock

[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

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

2017-01-10 Thread Subhash Jadavani
+ goto out; + } + + ufs_fixup_device_setup(hba, ); ufshcd_tune_unipro_params(hba); ret = ufshcd_set_vccq_rail_unused(hba, Looks good to me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a membe

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

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

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

2017-01-10 Thread Subhash Jadavani
me. Reviewed-by: Subhash Jadavani <subha...@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vg

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

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

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

2017-01-10 Thread Subhash Jadavani
canonical.com> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/ufshcd.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index be6322e..6b56eb0 100644 --- a/drivers/scsi/ufs/ufshcd

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

2017-01-03 Thread Subhash Jadavani
const struct of_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

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

2016-12-22 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 v3 11/12] scsi: ufs: add trace event for ufs commands

2016-12-22 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> --- Changes from v2 -> v3: - Removed conditional compilation based on CONFIG_TRACE

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

2016-12-22 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 v3 09/12] scsi: ufs: fix setting init power mode

2016-12-22 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 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 <venk...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/uf

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

2016-12-22 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 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 <yga...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes from v2 -> v3: - Simplified patch to just set the default power management level. Device

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

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

[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 <sthu...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- drivers/scsi/ufs/uf

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

2016-12-22 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 v3 02/12] scsi: ufs: add tracing support

2016-12-22 Thread Subhash Jadavani
ing/trace_pipe Reviewed-by: Sahitya Tummala <stumm...@codeaurora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes from v2 -> v3: - Used TRACE_DEFINE_ENUM to print out enums --- drivers/scsi/ufs/ufshcd.c | 85 ++--- include/trace/

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

2016-12-22 Thread Subhash Jadavani
urora.org> Signed-off-by: Subhash Jadavani <subha...@codeaurora.org> --- Changes from 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 +++

[PATCH v3 00/12] scsi: ufs: add trace/debug support, sysfs controls and few fixes

2016-12-22 Thread Subhash Jadavani
ufs: Add sysfs node to dynamically control clock gating scsi: ufs: Add sysfs node to dynamically control clock scaling Subhash Jadavani (6): scsi: ufs: add tracing support scsi: ufs: provide sysfs attribute to select the PM level scsi: ufs: set default UFS power management level

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 <subha...@codeaurora.org> 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

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

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

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

[PATCH v2 00/12] scsi: ufs: add trace/debug support, sysfs controls and few fixes

2016-12-13 Thread Subhash Jadavani
e event for ufs commands Sahitya Tummala (2): scsi: ufs: Add sysfs node to dynamically control clock gating scsi: ufs: Add sysfs node to dynamically control clock scaling Subhash Jadavani (6): scsi: ufs: add tracing support scsi: ufs: provide sysfs attribute to select the PM level scsi: u

  1   2   3   >