linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/1] Enable power management for ufs wlun
@ 2021-02-11 19:18 Asutosh Das
  2021-02-11 19:18 ` [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun Asutosh Das
  2021-02-13 20:51 ` [RFC PATCH v3 0/1] Enable power management for ufs wlun Avri Altman
  0 siblings, 2 replies; 11+ messages in thread
From: Asutosh Das @ 2021-02-11 19:18 UTC (permalink / raw)
  To: cang, martin.petersen, linux-scsi; +Cc: Asutosh Das, linux-arm-msm, stern


This patch attempts to fix a deadlock in ufs while sending SSU.
Recently, blk_queue_enter() added a check to not process requests if the
queue is suspended. That leads to a resume of the associated device which
is suspended. In ufs, that device is ufs device wlun and it's parent is
ufs_hba. This resume tries to resume ufs device wlun which in turn tries
to resume ufs_hba, which is already in the process of suspending, thus
causing a deadlock.

This patch takes care of:
* Suspending the ufs device lun only after all other luns are suspended
* Sending SSU during ufs device wlun suspend
* Clearing uac for rpmb and ufs device wlun
* Not sending commands to the device during host suspend

I'm testing it out now, please take a look and let me know.

Asutosh Das (1):
  scsi: ufs: Enable power management for wlun

 drivers/scsi/ufs/ufshcd.c  | 415 +++++++++++++++++++++++++++++++++++++--------
 drivers/scsi/ufs/ufshcd.h  |   4 +
 include/trace/events/ufs.h |  20 +++
 3 files changed, 364 insertions(+), 75 deletions(-)

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-02-19 18:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 19:18 [RFC PATCH v3 0/1] Enable power management for ufs wlun Asutosh Das
2021-02-11 19:18 ` [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun Asutosh Das
2021-02-13  3:25   ` Bart Van Assche
2021-02-16 17:38     ` Asutosh Das
2021-02-13 21:37   ` Avri Altman
2021-02-16 17:36     ` Asutosh Das
2021-02-17 22:29       ` Asutosh Das
2021-02-19  8:35   ` Adrian Hunter
2021-02-19 18:18     ` Asutosh Das
2021-02-13 20:51 ` [RFC PATCH v3 0/1] Enable power management for ufs wlun Avri Altman
2021-02-14  7:48   ` Avri Altman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).