Re: [PATCH] usb: storage: fix runtime pm issue in usb_stor_probe2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 3 Aug 2016, Heiner Kallweit wrote:

> Since commit 71723f95463d "PM / runtime: print error when activating a
> child to unactive parent" I see the following error message:
> 
> scsi host2: usb-storage 1-3:1.0
> scsi host2: runtime PM trying to activate child device host2 but parent
> 	    (1-3:1.0) is not active
> 
> Digging into it it seems to be related to the problem described in the
> commit message for cd998ded5c12 "i2c: designware: Prevent runtime
> suspend during adapter registration" as scsi_add_host also calls
> device_add and after the call to device_add the parent device is
> suspended.
> 
> Fix this by using the approach from the mentioned commit and getting
> the runtime pm reference before calling scsi_add_host.

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

There's nothing wrong with this patch; it's a worthwhile thing to do 
because it can prevent an unnecessary runtime-suspend/resume cycle.

Still, it looks like the real problem here may lie in
drivers/scsi/hosts.c.  Commit bc4f24014de5 ("[SCSI] implement runtime
Power Management") added a call to pm_runtime_set_active() in
scsi_add_host_with_dma() _after_ device_add() instead of _before_.

If that were changed, this problem would not have occurred.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux