lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] scsi: ufs: set device state to power-off before 1st link startup
Date
In the ufshcd init sequence, device state should be power-off
bacause the UFS device is not active.

Signed-off-by: DooHyun Hwang <dh0421.hwang@samsung.com>
---
drivers/scsi/ufs/ufshcd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 286f7c918f0e..32cb3b0dcbcf 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9447,13 +9447,12 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
/* Hold auto suspend until async scan completes */
pm_runtime_get_sync(dev);
atomic_set(&hba->scsi_block_reqs_cnt, 0);
+
/*
- * We are assuming that device wasn't put in sleep/power-down
- * state exclusively during the boot stage before kernel.
- * This assumption helps avoid doing link startup twice during
- * ufshcd_probe_hba().
+ * The device-initialize-sequence hasn't been invoked yet.
+ * Set the device to power-off state
*/
- ufshcd_set_ufs_dev_active(hba);
+ ufshcd_set_ufs_dev_poweroff(hba);

async_schedule(ufshcd_async_scan, hba);
ufs_sysfs_add_nodes(hba->dev);
--
2.29.0
\
 
 \ /
  Last update: 2021-02-05 02:51    [W:0.055 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site