[PATCH v3 0/2] Avoid re-initializing XHCI HC during removal

Wesley Cheng posted 2 patches 2 years, 8 months ago
drivers/usb/host/xhci-plat.c | 2 +-
drivers/usb/host/xhci.c      | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
[PATCH v3 0/2] Avoid re-initializing XHCI HC during removal
Posted by Wesley Cheng 2 years, 8 months ago
There is an extra amount of overhead being adding to XHCI HCD removal
cases when the HCD needs to undergo a runtime resume.  The xhc_reinit
logic will attempt to restart the HC if there is a HCE observed during
resume.  However, in the removal case, this is not required as the
XHCI stop/halt will execute the same operations.  In addition, it isn't
needed that the HC be placed back into the running state if it is being
removed.

Changes in v3:
- Update xhci-plat to set the removal flag before issuing the runtime PM
get

Changes in v2:
- Fixed spacing issue

Wesley Cheng (2):
  usb: host: xhci: Do not re-initialize the XHCI HC if being removed
  usb: host: xhci-plat: Set XHCI_STATE_REMOVING before resuming XHCI HC

 drivers/usb/host/xhci-plat.c | 2 +-
 drivers/usb/host/xhci.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Re: [PATCH v3 0/2] Avoid re-initializing XHCI HC during removal
Posted by Wesley Cheng 2 years, 7 months ago
Friendly ping to see if there are any review feedback/concerns with this 
series?

Thanks
Wesley Cheng

On 5/31/2023 3:27 PM, Wesley Cheng wrote:
> There is an extra amount of overhead being adding to XHCI HCD removal
> cases when the HCD needs to undergo a runtime resume.  The xhc_reinit
> logic will attempt to restart the HC if there is a HCE observed during
> resume.  However, in the removal case, this is not required as the
> XHCI stop/halt will execute the same operations.  In addition, it isn't
> needed that the HC be placed back into the running state if it is being
> removed.
> 
> Changes in v3:
> - Update xhci-plat to set the removal flag before issuing the runtime PM
> get
> 
> Changes in v2:
> - Fixed spacing issue
> 
> Wesley Cheng (2):
>    usb: host: xhci: Do not re-initialize the XHCI HC if being removed
>    usb: host: xhci-plat: Set XHCI_STATE_REMOVING before resuming XHCI HC
> 
>   drivers/usb/host/xhci-plat.c | 2 +-
>   drivers/usb/host/xhci.c      | 3 ++-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
Re: [PATCH v3 0/2] Avoid re-initializing XHCI HC during removal
Posted by Mathias Nyman 2 years, 7 months ago
On 21.6.2023 22.46, Wesley Cheng wrote:
> Friendly ping to see if there are any review feedback/concerns with this series?
> 

Looks good to me.
Seems that Greg already applied these

-Mathias