[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c10d65c-14ba-d2d5-ee7f-c4579432823e@acm.org>
Date: Sat, 27 Jun 2020 19:37:54 -0700
From: Bart Van Assche <bvanassche@....org>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Martin Kepplinger <martin.kepplinger@...i.sm>, jejb@...ux.ibm.com,
Can Guo <cang@...eaurora.org>, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...i.sm
Subject: Re: [PATCH] scsi: sd: add runtime pm to open / release
On 2020-06-26 08:44, Alan Stern wrote:
> On Fri, Jun 26, 2020 at 08:07:51AM -0700, Bart Van Assche wrote:
>> As far as I know runtime power management support in the sd driver is working
>> fine and is being used intensively by the UFS driver. The following commit was
>> submitted to fix a bug encountered by an UFS developer: 05d18ae1cc8a ("scsi:
>> pm: Balance pm_only counter of request queue during system resume") # v5.7.
>
> I just looked at that commit for the first time.
>
> Instead of making the SCSI driver do the work of deciding what routine to
> call, why not redefine blk_set_runtime_active(q) to simply call
> blk_post_runtime_resume(q, 0)? Or vice versa: if err == 0 have
> blk_post_runtime_resume call blk_set_runtime_active?
>
> After all, the two routines do almost the same thing -- and the bug
> addressed by this commit was caused by the difference in their behaviors.
>
> If the device was already runtime-active during the system suspend, doing
> an extra clear of the pm_only counter won't hurt anything.
Hi Alan,
Do you want to submit a patch that implements this change or do you
perhaps expect me to do that?
Thanks,
Bart.
Powered by blists - more mailing lists