aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/device.py
diff options
context:
space:
mode:
authorMatthias Kaehlcke <[email protected]>2023-01-10 17:32:52 +0000
committerGreg Kroah-Hartman <[email protected]>2023-01-17 17:06:50 +0100
commite5854355d76b8d768cea8e4fc3ce6dfdba25518a (patch)
treeef8b090102f51e0f8a6e678b1f2924855d13a236 /scripts/gdb/linux/device.py
parentfac4b8633fd682ecc8e9cff61cb3e33374a1c7e5 (diff)
usb: misc: onboard_hub: Invert driver registration order
The onboard_hub 'driver' consists of two drivers, a platform driver and a USB driver. Currently when the onboard hub driver is initialized it first registers the platform driver, then the USB driver. This results in a race condition when the 'attach' work is executed, which is scheduled when the platform device is probed. The purpose of fhe 'attach' work is to bind elegible USB hub devices to the onboard_hub USB driver. This fails if the work runs before the USB driver has been registered. Register the USB driver first, then the platform driver. This increases the chances that the onboard_hub USB devices are probed before their corresponding platform device, which the USB driver tries to locate in _probe(). The driver already handles this situation and defers probing if the onboard hub platform device doesn't exist yet. Cc: [email protected] Fixes: 8bc063641ceb ("usb: misc: Add onboard_usb_hub driver") Link: https://lore.kernel.org/lkml/[email protected]/T/#m0d64295f017942fd988f7c53425db302d61952b4 Reported-by: Alexander Stein <[email protected]> Signed-off-by: Matthias Kaehlcke <[email protected]> Tested-by: Stefan Wahren <[email protected]> Link: https://lore.kernel.org/r/20230110172954.v2.1.I75494ebee7027a50235ce4b1e930fa73a578fbe2@changeid Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions