lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAd53p4CpEQR0Y5XDN5E7xZ-iw2GG=gGMSm2Vd=V_M1LLEuuCA@mail.gmail.com>
Date:   Wed, 1 Dec 2021 08:19:31 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     mathias.nyman@...el.com
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "open list:USB XHCI DRIVER" <linux-usb@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xhci: Remove CONFIG_USB_DEFAULT_PERSIST to prevent xHCI
 from runtime suspending

On Fri, Nov 19, 2021 at 5:27 PM Kai-Heng Feng
<kai.heng.feng@...onical.com> wrote:
>
> When the xHCI is quirked with XHCI_RESET_ON_RESUME, runtime resume
> routine also resets the controller.
>
> This is bad for USB drivers without reset_resume callback, because
> there's no subsequent call of usb_dev_complete() ->
> usb_resume_complete() to force rebinding the driver to the device. For
> instance, btusb device stops working after xHCI controller is runtime
> resumed, if the controlled is quirked with XHCI_RESET_ON_RESUME.
>
> So always take XHCI_RESET_ON_RESUME into account to solve the issue.
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>

A gentle ping...

> ---
>  drivers/usb/host/xhci.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 902f410874e8e..af92a9f8ed670 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -3934,7 +3934,6 @@ static void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
>         struct xhci_slot_ctx *slot_ctx;
>         int i, ret;
>
> -#ifndef CONFIG_USB_DEFAULT_PERSIST
>         /*
>          * We called pm_runtime_get_noresume when the device was attached.
>          * Decrement the counter here to allow controller to runtime suspend
> @@ -3942,7 +3941,6 @@ static void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
>          */
>         if (xhci->quirks & XHCI_RESET_ON_RESUME)
>                 pm_runtime_put_noidle(hcd->self.controller);
> -#endif
>
>         ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__);
>         /* If the host is halted due to driver unload, we still need to free the
> @@ -4094,14 +4092,12 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
>
>         xhci_debugfs_create_slot(xhci, slot_id);
>
> -#ifndef CONFIG_USB_DEFAULT_PERSIST
>         /*
>          * If resetting upon resume, we can't put the controller into runtime
>          * suspend if there is a device attached.
>          */
>         if (xhci->quirks & XHCI_RESET_ON_RESUME)
>                 pm_runtime_get_noresume(hcd->self.controller);
> -#endif
>
>         /* Is this a LS or FS device under a HS hub? */
>         /* Hub or peripherial? */
> --
> 2.32.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ