scsi: ufs-mediatek: Disable HCI before HW reset
v2 cover scsi: ufs-mediatek: Disable HCI before HW reset
Hi,
This series changes the hw reset timing to avoid potential issues in MediaTek platform.
Change since v1:
- Fix the commit message of patch 2
Alice.Chao (2):
scsi: ufs: Export ufshcd_hba_stop
scsi: ufs-mediatek: Disable HCI before HW reset
drivers/scsi/ufs/ufs-mediatek.c | 3 +++ drivers/scsi/ufs/ufshcd.c | 3 ++- drivers/scsi/ufs/ufshcd.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0
PATCH v2 1/2 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 v2 2/2 scsi: ufs-mediatek: Disable HCI before HW reset
In reply to AliceFrom: "Alice.Chao" <[email protected]>
MediaTek ufshci needs to be disabled before HW reset to avoid potential issues.
--- 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
Hi Alice,
Quoted 6 lines · Alice
Hi,
This series changes the hw reset timing to avoid potential issues in MediaTek platform.Change since v1:
- Fix the commit message of patch 2
Quoted 9 lines
Alice.Chao (2):
scsi: ufs: Exportufshcd_hba_stop
scsi: ufs-mediatek: Disable HCI before HW resetdrivers/scsi/ufs/ufs-mediatek.c | 3 +++ drivers/scsi/ufs/ufshcd.c | 3 ++- drivers/scsi/ufs/ufshcd.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-)
Thanks for these patches! For this series,
Martin K. Petersen
AppliedAlice,
Quoted 2 lines
This series changes the hw reset timing to avoid potential issues in MediaTek platform.
Applied to 5.14/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 10 lines · Alice
This series changes the hw reset timing to avoid potential issues in MediaTek platform.
Change since v1:
- Fix the commit message of patch 2Alice.Chao (2):
scsi: ufs: Exportufshcd_hba_stop
scsi: ufs-mediatek: Disable HCI before HW reset[...]
Applied to 5.14/scsi-queue, thanks!
[1/2] scsi: ufs: Export ufshcd_hba_stop
https://git.kernel.org/mkp/scsi/c/3a95f5b39254 [2/2] scsi: ufs-mediatek: Disable HCI before HW reset https://git.kernel.org/mkp/scsi/c/f9c602f3bd9c
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering