RE: [PATCH] usb: uas: fix a plug & unplug racing

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

 



Oliver Neukum wrote:

> > I just checked the code, and the reference count will be incremented
> > in scsi_scan_host(), precisely speaking, in scsi_autopm_get_host().
> > So, I still think we need to manually add reference count of interface here.
> > Please correct me if there is anything wrong.
> 
> AFAICT the generic power model will not suspend a parent while a child is
> active. The includes SCSI children of USB parents. So I think we are safe. Could
> you resubmit your patch without the PM counter manipulation and we can fix
> any issue that may exist in theory later?
> 

The child_count of usb device should be incremented in the scsi_scan_host().
I can simulate this situation by forcibly enable the autosuspend of uas driver
and add a delay before scsi_scan_host() is called in asynchronous way.

But for now, as uas driver does not support autosuspend, it is indeed safe to
remove the PM counter manipulation. If you have concern about it, it's OK 
to me to re-submit it.

Thanks,
EJ
--nvpublic





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux