All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>, Peter Chen <peter.chen@nxp.com>
Cc: Jun Li <jun.li@nxp.com>, Manu Gautam <mgautam@codeaurora.org>,
	"mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	Baolin Wang <baolin.wang@linaro.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: 回复: [PATCH 1/1] usb: host: xhci-plat: keep runtime active when remove host
Date: Thu, 14 May 2020 12:06:59 +0300	[thread overview]
Message-ID: <ac353786-16a5-8e23-4948-fbdef30a786f@linux.intel.com> (raw)
In-Reply-To: <20200514013425.GB10515@rowland.harvard.edu>

On 14.5.2020 4.34, Alan Stern wrote:
> On Thu, May 14, 2020 at 01:31:59AM +0000, Peter Chen wrote:
>> On 20-05-13 14:45:42, Jun Li wrote:
>>> ​
>>> ...
>>>> Would it make sense to change xhci_plat_remove() to
>>>
>>>
>>>
>>>> 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.

Thanks
-Mathias

  reply	other threads:[~2020-05-14  9:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  2:35 [PATCH 1/1] usb: host: xhci-plat: keep runtime active when remove host Peter Chen
2020-05-12  3:49 ` Manu Gautam
2020-05-12  4:03   ` Peter Chen
2020-05-12 22:33     ` Mathias Nyman
2020-05-13  9:14       ` Peter Chen
2020-05-13 14:45       ` 回复: " Jun Li
2020-05-14  1:31         ` Peter Chen
2020-05-14  1:34           ` Alan Stern
2020-05-14  9:06             ` Mathias Nyman [this message]
2020-05-14  9:11               ` Peter Chen
2020-05-14  9:18                 ` Jun Li
2020-05-12 13:35 ` Alan Stern
2020-05-13 11:08   ` Peter Chen
2020-05-13 14:48     ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac353786-16a5-8e23-4948-fbdef30a786f@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=baolin.wang@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.li@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mgautam@codeaurora.org \
    --cc=peter.chen@nxp.com \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.