usb: Probe EHCI, OHCI controllers asynchronously
authorDmitry Torokhov <dtor@chromium.org>
Wed, 18 May 2022 22:02:51 +0000 (15:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2022 16:11:25 +0000 (18:11 +0200)
commit69a1c9a9b273271f2a2674bcc117336a9bb0a4b4
tree64a8e003f4b1a3811528e68f965d9c84f7a1ec73
parent26ae2c942b5702f2e43d36b2a4389cfb7d616b6a
usb: Probe EHCI, OHCI controllers asynchronously

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>
drivers/usb/host/ehci-platform.c
drivers/usb/host/ohci-platform.c