lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: Re: [PATCH v19 2/3] scsi: ufs: L2P map management for HPB read
From
Date
> @@ -342,13 +1208,14 @@ void ufshpb_suspend(struct ufs_hba *hba)
> > struct scsi_device *sdev;
> >
> > shost_for_each_device(sdev, hba->host) {
> > - hpb = sdev->hostdata;
> > + hpb = ufshpb_get_hpb_data(sdev);
> > if (!hpb)
> > continue;
> >
> > if (ufshpb_get_state(hpb) != HPB_PRESENT)
> > continue;
> > ufshpb_set_state(hpb, HPB_SUSPEND);
> > + ufshpb_cancel_jobs(hpb);
>
> Here may have a dead lock problem - in the case of runtime suspend,
> when ufshpb_suspend() is invoked, all of hba's children scsi devices
> are in RPM_SUSPENDED state. When this line tries to cancel a running
> map work, i.e. when ufshpb_get_map_req() calls below lines, it will
> be stuck at blk_queue_enter().
>
> req = blk_get_request(hpb->sdev_ufs_lu->request_queue,
> REQ_OP_SCSI_IN, 0);
>
> Please check block layer power management, and see also commit d55d15a33
> ("scsi: block: Do not accept any requests while suspended").

I am agree with your comment.
How about add BLK_MQ_REQ_NOWAIT flag on blk_get_request() to avoid hang?

Thanks,
Daejun

\
 
 \ /
  Last update: 2021-02-08 09:06    [W:0.744 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site