scsi: ufs: Export ufshcd_hba_stop
PATCH 1/1 scsi: ufs: Export ufshcd_hba_stop
From: "Alice.Chao" <[email protected]>
Export ufshcd_hba_stop to allow vendors to disable HCI in variant ops.
--- drivers/scsi/ufs/ufshcd.c | 3 ++- drivers/scsi/ufs/ufshcd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +2 -1
@@ -4417,7 +4417,7 @@ EXPORT_SYMBOL_GPL(ufshcd_make_hba_operational);* ufshcd_hba_stop - Send controller to reset state * @hba: per adapter instance */ -static inline void ufshcd_hba_stop (struct ufs_hba *hba) +void ufshcd_hba_stop (struct ufs_hba *hba) {unsigned long flags;int err;
@@ -4436,6 +4436,7 @@ static inline void ufshcd_hba_stop(struct ufs_hba *hba)if (err)dev_err (hba->dev,"%s: Controller disable failed\n" , __func__); } +EXPORT_SYMBOL_GPL (ufshcd_hba_stop);/** * ufshcd_hba_execute_hce - initialize the controller
drivers/scsi/ufs/ufshcd.h +1 -0
@@ -947,6 +947,7 @@ int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask, unsigned long timeout_ms);void ufshcd_parse_dev_ref_clk_freq (struct ufs_hba *hba,struct clk *refclk);void ufshcd_update_evt_hist (struct ufs_hba *hba,u32 id,u32 val); +void ufshcd_hba_stop (struct ufs_hba *hba);static inline void check_upiu_size (void ) {
Signature · 1 line
2.18.0
PATCH 1/1 scsi: ufs-mediatek: Fix HWReset timing
From: "Alice.Chao" <[email protected]>
HCI disable before HW Reset.
Because of the property of mtk ufshci,
we need to change reset flow to avoid potential issues.
CR-Id: ALPS05728133
Feature: UFS(Universal Flash Storage)
--- drivers/scsi/ufs/ufs-mediatek.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/scsi/ufs/ufs-mediatek.c +3 -0
@@ -846,6 +846,9 @@ static int ufs_mtk_device_reset(struct ufs_hba *hba) {struct arm_smccc_res res; +/* disable hba before device reset */ +ufshcd_hba_stop (hba); +ufs_mtk_device_reset_ctrl (0 , res);/*
Signature · 1 line
2.18.0
RE: [PATCH 1/1] scsi: ufs-mediatek: Fix HWReset timing
Quoted 15 lines
-----Original Message-----
From: Alice <[email protected]>
Sent: 27 May 2021 21:28
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; chun- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH 1/1] scsi: ufs-mediatek: Fix HWReset timing
Quoted 6 lines
From: "Alice.Chao" <[email protected]>
HCI disable before HW Reset.
Because of the property of mtk ufshci,
we need to change reset flow to avoid potential issues.
Please re-format the commit message and mention few wards about potential issues.
Quoted 1 line
Change-Id: I3eb917fd2953b58dcf7e021286d1de71c9232cfb
Hmm, run a checkpatch before submitting any patch.
Quoted 2 lines
Signed-off-by Alice.Chao <[email protected]>CR-Id: ALPS05728133
What are these ID? Please remove.
Quoted 1 line
Feature: UFS(Universal Flash Storage)
Please check Documentation/process/submitting-patches.rst, before submitting patches.
Review
Quoted 5 lines
--- drivers/scsi/ufs/ufs-mediatek.c | 3 +++ 1 file changed, 3 insertions(+)(quoted diff) +0
-0
b/drivers/scsi/ufs/ufs-mediatek.c
Quoted 15 lines
index
a981f261b304..c62603ed3d33100644drivers/scsi/ufs/ufs-mediatek.c +3
-1@@ -846,6 +846,9 @@ static int ufs_mtk_device_reset(struct ufs_hba *hba) {struct arm_smccc_res res; +/* disable hba before device reset */ +ufshcd_hba_stop (hba); +ufs_mtk_device_reset_ctrl (0 , res);/* -- 2.18.0