Skip to content

Commit

Permalink
usb: Probe EHCI, OHCI controllers asynchronously
Browse files Browse the repository at this point in the history
initcall_debug shows that OHCI controllers take ~60ms to probe on
Rockchip RK3399 systems:

  probe of fe3a0000.usb returned 1 after 58941 usecs

A few of these can add up to waste non-trivial amounts of time at boot.

These host controllers don't provide resources to other drivers, so
this shouldn't contribute to exposing race conditions.

Chrome OS kernels have carried this patch on some systems for a while
without issues. Similar patches have been merged for a variety of (e)MMC
host controllers for similar reasons.

[Brian: rewrote commit message, refreshed, but retained dtor's original
 authorship ]

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20220518150150.1.Ie8ea0e945a9c15066237014be219eed60066d493@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dmitry Torokhov authored and Greg Kroah-Hartman committed May 19, 2022
1 parent 26ae2c9 commit 69a1c9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/host/ehci-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ static struct platform_driver ehci_platform_driver = {
.pm = pm_ptr(&ehci_platform_pm_ops),
.of_match_table = vt8500_ehci_ids,
.acpi_match_table = ACPI_PTR(ehci_acpi_match),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
}
};

Expand Down
1 change: 1 addition & 0 deletions drivers/usb/host/ohci-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ static struct platform_driver ohci_platform_driver = {
.name = "ohci-platform",
.pm = &ohci_platform_pm_ops,
.of_match_table = ohci_platform_ids,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
}
};

Expand Down

0 comments on commit 69a1c9a

Please sign in to comment.