[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1x+KmXhzikbEm8U@rowland.harvard.edu>
Date: Fri, 28 Oct 2022 21:13:14 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Brian Norris <briannorris@...omium.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mathias Nyman <mathias.nyman@...el.com>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH 1/2] usb: ehci-pci: Set PROBE_PREFER_ASYNCHRONOUS
On Fri, Oct 28, 2022 at 02:19:07PM -0700, Brian Norris wrote:
> This driver often takes on the order of 8ms to start, but every little
> bit counts. It shouldn't have many cross-device dependencies to
> race with, nor racy access to shared state with other drivers, so this
> should be a relatively low risk change.
>
> This driver was pinpointed as part of a survey of top slowest initcalls
> (i.e., are built in, and probing synchronously) on a lab of ChromeOS
> systems.
>
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> ---
Acked-by: Alan Stern <stern@...land.harvard.edu>
However, I'm curious to know why this patch makes ehci-pci use
PROBE_PREFER_ASYNCHRONOUS even when CONFIG_PM isn't set, whereas the 2/2
patch makes xhci-pci use PROBE_PREFER_ASYNCHRONOUS only when CONFIG_PM
is set.
Alan Stern
> drivers/usb/host/ehci-pci.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
> index 17f8b6ea0c35..4b148fe5e43b 100644
> --- a/drivers/usb/host/ehci-pci.c
> +++ b/drivers/usb/host/ehci-pci.c
> @@ -411,11 +411,12 @@ static struct pci_driver ehci_pci_driver = {
> .remove = ehci_pci_remove,
> .shutdown = usb_hcd_pci_shutdown,
>
> -#ifdef CONFIG_PM
> .driver = {
> - .pm = &usb_hcd_pci_pm_ops
> - },
> +#ifdef CONFIG_PM
> + .pm = &usb_hcd_pci_pm_ops,
> #endif
> + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> + },
> };
>
> static int __init ehci_pci_init(void)
> --
> 2.38.1.273.g43a17bfeac-goog
>
Powered by blists - more mailing lists