lkml.org 
[lkml]   [2020]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v1 1/1] scsi: pm: Leave runtime resume along if block layer PM is enabled
Hi Bart,

On 2020-11-18 12:38, Bart Van Assche wrote:
> On 11/15/20 5:42 PM, Can Guo wrote:
>> Actually, I am thinking about removing all the pm_runtime_set_active()
>> codes in both scsi_bus_resume_common() and scsi_dev_type_resume() - we
>> don't need to forcibly set the runtime PM status to RPM_ACTIVE for
>> either
>> SCSI host/target or SCSI devices.
>>
>> Whenever we access one SCSI device, either block layer or somewhere in
>> the path (e.g. throgh sg IOCTL, sg_open() calls
>> scsi_autopm_get_device())
>> should runtime resume the device first, and the runtime PM framework
>> makes
>> sure device's parent (and its parent's parent and so on)gets resumed
>> as
>> well.
>> Thus, the pm_runtime_set_active() seems redundant. What do you think?
>
> Hi Can,
>
> It is not clear to me why the pm_runtime_set_active() calls occur in
> the
> scsi_pm.c source file since the block layer automatically activates
> block devices if necessary. Maybe these calls are a leftover from a
> time
> when runtime suspended devices were not resumed automatically by the
> block layer? Anyway, I'm fine with removing these calls.
>
> Thanks,
>
> Bart.

Yes, I agree with you. Let me test the new patch (which removes all the
pm_runtime_set_active() calls) first, if no issue found, I will upload
it for review.

Thanks,

Can Guo.

\
 
 \ /
  Last update: 2020-11-18 09:51    [W:0.051 / U:6.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site