RE: 回复: [PATCH 1/1] usb: host: xhci-plat: keep runtime active when remove host

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

 




> -----Original Message-----
> From: Peter Chen <peter.chen@xxxxxxx>
> Sent: 2020年5月14日 17:11
> To: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>; Alan Stern
> <stern@xxxxxxxxxxxxxxxxxxx>
> Cc: Jun Li <jun.li@xxxxxxx>; Manu Gautam <mgautam@xxxxxxxxxxxxxx>;
> mathias.nyman@xxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx;
> dl-linux-imx <linux-imx@xxxxxxx>; Baolin Wang <baolin.wang@xxxxxxxxxx>;
> stable@xxxxxxxxxxxxxxx
> Subject: RE: 回复: [PATCH 1/1] usb: host: xhci-plat: keep runtime active when remove
> host
> 
> 
> > >>>
> > >>>> xhci_plat_remove()
> > >>>
> > >>>>   pm_runtime_disable()
> > >>>
> > >>>>   <remove and put both hcd's>
> > >>>
> > >>>>   pm_runtime_set_suspended()
> > >>>
> > >>>
> > >>>
> > >>>> or possibly wrapping the remove in a runtime get/put:
> > >>>
> > >>>> xhci_plat_remove()
> > >>>
> > >>>>  pm_runtime_get_noresume()
> > >>>
> > >>>>   pm_runtime_disable()
> > >>>
> > >>>  >  <remove and put both hcd's>
> > >>>
> > >>>  >  pm_runtime_set_suspended()
> > >>>
> > >>>  >  pm_runtime_put_noidle()
> > >>>
> > >>> I think it's better to keep runtime active during driver removal,
> > >>> how about this:
> > >>>
> > >>> pm_runtime_get_sync()
> > >>> <remove and put both hcd's>
> > >>> pm_runtime_disable()
> > >>> pm_runtime_put_noidle()
> > >>> pm_runtime_set_suspended()
> > >>>
> > >>
> > >> I think it is more reasonable since for some DRD controllers if DRD
> > >> core is suspended, access the xHCI register (eg, we remove
> > >> xhci-plat-hcd module at the time) may hang the system. Alan &
> > >> Mathias, what's your opinion?
> >
> > Makes sense to me
> >
> > >
> > > Jun's suggestion looks good to me.
> > >
> > > Alan Stern
> > >
> >
> > Great, lets go with this then.
> > Jun, or Peter, could you turn this into a patch and check that it works?
> > I only got PCI xHC's to play with myself.
> >
> 
> Jun, would you please create a patch for it. I have tested it at CDNS3 platform,
> feel free add my tag.
> 
> Reviewed-by: Peter Chen <peter.chen@xxxxxxx>
> Tested-by: Peter Chen <peter.chen@xxxxxxx>

Thanks, I will send out a v2 for this.

Li Jun

> 
> Peter




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

  Powered by Linux