diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2002-06-17 20:57:54 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2002-06-17 20:57:54 +0000 |
commit | ba0c1d407b5f3469a8026b32d1ea0c5605c9018a (patch) | |
tree | 5149633b62d8a3d12b3d24fb0a97b9a7120683cf /sys | |
parent | 14e9ee2b51b1197865e6df33d91c1155b977790e (diff) | |
download | FreeBSD-src-ba0c1d407b5f3469a8026b32d1ea0c5605c9018a.zip FreeBSD-src-ba0c1d407b5f3469a8026b32d1ea0c5605c9018a.tar.gz |
Avoid reprobing on loading a driver. This does not work as the ivars set
during the previous probe are stale.
What really should be done is route the probe through
device_probe_and_attach bit this is one of those ICBBATIASS (I can't be
bothered as there is a simpler solution). The user can easily replug the
device after kldloading a new device driver.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uhub.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 3fbc572..8be236b 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -85,6 +85,7 @@ Static usbd_status uhub_explore(usbd_device_handle hub); Static void uhub_intr(usbd_xfer_handle, usbd_private_handle,usbd_status); #if defined(__FreeBSD__) +Static bus_driver_added_t uhub_driver_added; Static bus_child_detached_t uhub_child_detached; #endif @@ -105,6 +106,7 @@ struct cfattach uhub_uhub_ca = { }; #elif defined(__FreeBSD__) USB_DECLARE_DRIVER_INIT(uhub, + DEVMETHOD(bus_driver_added, uhub_driver_added), DEVMETHOD(bus_child_detached, uhub_child_detached), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), @@ -598,6 +600,19 @@ uhub_child_detached(device_t self, device_t child) } } } + +Static void +uhub_driver_added(device_t _dev, driver_t *_driver) +{ + /* Don't do anything, as reprobing does not work currently. We should + * really call through to usbd_new_device or a function along those + * lines that reinitialises the device if it is not owned by any + * driver. But this is complicated. Manual replugging by the user is + * easier. + */ + + ; +} #endif |