Microchip USB2642 Hub not resuming from USB autosuspend

Martin Kepplinger martin.kepplinger at puri.sm
Wed Jun 24 03:22:42 EDT 2020

On 23.06.20 16:54, Alan Stern wrote:
> On Tue, Jun 23, 2020 at 03:48:01PM +0200, Martin Kepplinger wrote:
>> We've resolved this issue too. When scsi (sd) runtime pm is not enabled
>> by default, it needs to be enabled of course and events_dfl_poll_msecs
>> for the block layer set to 0.
> Actually that last step isn't needed.  But if you don't do it, the device 
> will wake up from runtime suspend every time the block layer polls it.  So 
> you probably do want to either turn off polling or increase the polling 
> interval significantly.

true, thanks for pointing that out. a long interval is totally an option

>> scsi sd has until now incomplete support for runtime pm and this
>> addition makes it work, i.e. suspend when not mounted:
>> https://lore.kernel.org/linux-scsi/20200623111018.31954-1-martin.kepplinger@puri.sm/T/
>> the whole USB path is suspended as a consequence - and woken up if opened.
> I don't understand this.  As far as I know, runtime-PM support in the SCSI 
> and block layers has been complete for many years.  If you have to do 
> anything extra (like applying the patch in the email you mentioned) then 
> something is broken.  The device should be able to go into runtime suspend 
> just fine with the current code -- even when a file system is mounted.

The scsi and usb layers have good implementations for runtime pm for a
long time indeed. The scsi drivers though vary: for example sr indeed
suspends when unused, when mounted and open too.

look at the sd driver in comparison though: From what I see, it "uses"
autopm (runtime pm) as it would let the device suspend, but never
resumes from it (except when removing and probing again). My suspicion
is that it's not really used for that reason.

I might be wrong of course - I usually don't look at scsi code and I'm
so thankful for feedback. That's what I read though and also what my
tests verify. Hence the patch to the sd driver that makes enabling
runtime pm result in a usable device (granted, not yet saving as much
power as it really could, but that can be added later).

so thanks for your feedback again,


> Alan Stern

More information about the linux-arm-kernel mailing list