diff options
author | Subhash Jadavani <subhashj@codeaurora.org> | 2014-11-03 20:29:23 -0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:57:47 -0700 |
commit | aa484ff4b600deef66cbb630379e902b9ff20a97 (patch) | |
tree | a580efc64d3f6346f72810d63bf7aaea4494cbdc /drivers | |
parent | 695e85590b0ea486abe28c2033387acd7a2254d6 (diff) |
scsi: ufs: stub UFS shutdown handler
Currently it seems possible that UFS shutdown handler may race with some
other UFS transfer requests and it may disable the clocks while normal UFS
requests are in progress. Until we fix this race properly, this change
stubs out the UFS shutdown handler. Stubbing out UFS shutdown handler
shouldn't have any functional side effects as UFS device's cache should
anyway be synced by the SCSI shutdown handler. UFS shutdown handler's
main purpose was to send power down notification to UFS device but it
should work even without this explicit notification.
Change-Id: I557891c71defbde722bba1a884f608f4ba3c7da3
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 54f53f547b32..4959aefcc0d1 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7247,22 +7247,11 @@ static inline void ufshcd_add_sysfs_nodes(struct ufs_hba *hba) */ int ufshcd_shutdown(struct ufs_hba *hba) { - int ret = 0; - - if (ufshcd_is_ufs_dev_poweroff(hba) && ufshcd_is_link_off(hba)) - goto out; - - if (pm_runtime_suspended(hba->dev)) { - ret = ufshcd_runtime_resume(hba); - if (ret) - goto out; - } - - ret = ufshcd_suspend(hba, UFS_SHUTDOWN_PM); -out: - if (ret) - dev_err(hba->dev, "%s failed, err %d\n", __func__, ret); - /* allow force shutdown even in case of errors */ + /* + * TODO: This function should send the power down notification to + * UFS device and then power off the UFS link. But we need to be sure + * that there will not be any new UFS requests issued after this. + */ return 0; } EXPORT_SYMBOL(ufshcd_shutdown); |