Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

2020-11-24 Thread hongwus
On 2020-11-18 01:23, Asutosh Das (asd) wrote: On 11/16/2020 11:04 PM, Can Guo wrote: When AH8 error happens, all the regs and states are dumped in err handler. Sometime we need to look into host regs right after AH8 error happens, which is before leaving the IRQ handler. Signed-off-by: Can

Re: [PATCH v3 1/3] scsi: ufs: Serialize eh_work with system PM events and async scan

2020-11-24 Thread hongwus
On 2020-11-17 15:04, Can Guo wrote: Serialize eh_work with system PM events and async scan to make sure eh_work does not run in parallel with them. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 64 +-- drivers/scsi/ufs/ufshcd.h | 1 + 2

Re: [PATCH v2 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active

2020-11-24 Thread hongwus
On 2020-11-24 15:28, Can Guo wrote: If we want to disable clocks to save power but still keep the link active, core_clk_unipro, as same as ref_clk, should not be the one being disabled. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufs-qcom.c | 6 ++ 1 file changed, 6 insertions(+) diff

Re: [PATCH v2 1/2] scsi: ufs: Refector ufshcd_setup_clocks() to remove skip_ref_clk

2020-11-24 Thread hongwus
On 2020-11-25 08:53, Can Guo wrote: On 2020-11-25 05:09, Bean Huo wrote: On Mon, 2020-11-23 at 23:28 -0800, Can Guo wrote: +++ b/drivers/scsi/ufs/ufshcd.h @@ -229,6 +229,8 @@ struct ufs_dev_cmd { * @max_freq: maximum frequency supported by the clock * @min_freq: min frequency that can be

Re: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()

2020-08-18 Thread hongwus
On 2020-08-18 13:42, Asutosh Das wrote: On Mon, Aug 17 2020 at 22:21 -0700, Can Guo wrote: Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside err_handler(), but forgets to remove the

Re: [PATCH v7 4/8] scsi: ufs: Add some debug infos to ufshcd_print_host_state

2020-07-27 Thread hongwus
On 2020-07-28 13:00, Can Guo wrote: The infos of the last interrupt status and its timestamp are very helpful when debug system stability issues, e.g. IRQ starvation, so add them to ufshcd_print_host_state. Meanwhile, UFS device infos like model name and its FW version also come in handy

Re: [PATCH v7 3/8] scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regs

2020-07-27 Thread hongwus
On 2020-07-28 13:00, Can Guo wrote: Dumping testbus registers is heavy enough to cause stability issues sometime, just remove them as of now. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufs-qcom.c | 32 1 file changed, 32 deletions(-) diff --git

Re: [PATCH v5 3/9] ufs: ufs-qcom: Fix race conditions caused by func ufs_qcom_testbus_config

2020-07-22 Thread hongwus
On 2020-07-23 10:34, Can Guo wrote: If ufs_qcom_dump_dbg_regs() calls ufs_qcom_testbus_config() from ufshcd_suspend/resume and/or clk gate/ungate context, pm_runtime_get_sync() and ufshcd_hold() will cause racing problems. Fix this by removing the unnecessary calls of pm_runtime_get_sync() and

Re: [PATCH v5 2/9] scsi: ufs: Fix imbalanced scsi_block_reqs_cnt caused by ufshcd_hold()

2020-07-22 Thread hongwus
Hi Can, On 2020-07-23 10:34, Can Guo wrote: The scsi_block_reqs_cnt increased in ufshcd_hold() is supposed to be decreased back in ufshcd_ungate_work() in a paired way. However, if specific ufshcd_hold/release sequences are met, it is possible that scsi_block_reqs_cnt is increased twice but only

Re: [PATCH v5 1/9] scsi: ufs: Add checks before setting clk-gating states

2020-07-22 Thread hongwus
On 2020-07-23 10:34, Can Guo wrote: Clock gating features can be turned on/off selectively which means its state information is only important if it is enabled. This change makes sure that we only look at state of clk-gating if it is enabled. Signed-off-by: Can Guo Reviewed-by: Avri Altman