public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] scsi: ufs: Start to make driver synchronization easier to understand
@ 2021-10-04 12:06 Adrian Hunter
  2021-10-04 12:06 ` [PATCH RFC 1/6] scsi: ufs: Encapsulate clk_scaling_lock by inline functions Adrian Hunter
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Adrian Hunter @ 2021-10-04 12:06 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: James E . J . Bottomley, Bean Huo, Avri Altman, Alim Akhtar,
	Can Guo, Asutosh Das, Bart Van Assche, linux-scsi

Hi

Driver synchronization would be easier to understand if we used the
clk_scaling_lock as the only lock to provide either shared (down/up_read)
or exclusive (down/up_write) access to the host.

These patches make changes with that in mind, finally resulting in being
able to hold the down_write() lock for the entire error handler duration.

If this approach is acceptable, it could be extended to simplify the
the synchronization of PM vs error handler and Shutdown vs sysfs.


Adrian Hunter (6):
      scsi: ufs: Encapsulate clk_scaling_lock by inline functions
      scsi: ufs: Rename clk_scaling_lock to host_rw_sem
      scsi: ufs: Let ufshcd_[down/up]_read be nested within ufshcd_[down/up]_write
      scsi: ufs: Fix a possible dead lock in clock scaling
      scsi: ufs: Reorder dev_cmd locking
      scsi: ufs: Hold ufshcd_down_write() lock for entire error handler duration

 drivers/scsi/ufs/ufshcd.c | 104 +++++++++++++++++++++-------------------------
 drivers/scsi/ufs/ufshcd.h |  41 +++++++++++++++++-
 2 files changed, 87 insertions(+), 58 deletions(-)


Regards
Adrian

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

end of thread, other threads:[~2021-10-05 19:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-04 12:06 [PATCH RFC 0/6] scsi: ufs: Start to make driver synchronization easier to understand Adrian Hunter
2021-10-04 12:06 ` [PATCH RFC 1/6] scsi: ufs: Encapsulate clk_scaling_lock by inline functions Adrian Hunter
2021-10-04 12:06 ` [PATCH RFC 2/6] scsi: ufs: Rename clk_scaling_lock to host_rw_sem Adrian Hunter
2021-10-04 16:52   ` Bart Van Assche
2021-10-05  5:06     ` Adrian Hunter
2021-10-05 19:06       ` Bart Van Assche
2021-10-04 12:06 ` [PATCH RFC 3/6] scsi: ufs: Let ufshcd_[down/up]_read be nested within ufshcd_[down/up]_write Adrian Hunter
2021-10-04 12:06 ` [PATCH RFC 4/6] scsi: ufs: Fix a possible dead lock in clock scaling Adrian Hunter
2021-10-04 12:06 ` [PATCH RFC 5/6] scsi: ufs: Reorder dev_cmd locking Adrian Hunter
2021-10-04 12:06 ` [PATCH RFC 6/6] scsi: ufs: Hold ufshcd_down_write() lock for entire error handler duration Adrian Hunter
2021-10-04 12:42 ` [PATCH RFC 0/6] scsi: ufs: Start to make driver synchronization easier to understand Avri Altman
2021-10-04 13:27   ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox