Messages in this thread | | | Date | Wed, 18 Nov 2020 16:49:47 +0800 | From | Can Guo <> | Subject | Re: [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.
| |