diff options
author | hselasky <hselasky@FreeBSD.org> | 2011-06-24 19:02:56 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2011-06-24 19:02:56 +0000 |
commit | ccf732af88ac42a2b291b4e8139c70efbca3494f (patch) | |
tree | cb34baffb300a43390547a84494a2cac20d5e664 /sys/dev/usb | |
parent | a551321476aed54765a889e3b29a2a3781561950 (diff) | |
download | FreeBSD-src-ccf732af88ac42a2b291b4e8139c70efbca3494f.zip FreeBSD-src-ccf732af88ac42a2b291b4e8139c70efbca3494f.tar.gz |
- Ensure that we get all the required nomatch devd events.
MFC after: 3 days
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_device.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 76c976b..932c022 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -1358,17 +1358,18 @@ usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index) uaa.info.bIfaceIndex, uaa.info.bIfaceNum); - if (usb_probe_and_attach_sub(udev, &uaa)) { - /* ignore */ - } - } + usb_probe_and_attach_sub(udev, &uaa); - if (uaa.temp_dev) { - /* remove the last created child; it is unused */ - - if (device_delete_child(udev->parent_dev, uaa.temp_dev)) { + /* + * Remove the leftover child, if any, to enforce that + * a new nomatch devd event is generated for the next + * interface if no driver is found: + */ + if (uaa.temp_dev == NULL) + continue; + if (device_delete_child(udev->parent_dev, uaa.temp_dev)) DPRINTFN(0, "device delete child failed\n"); - } + uaa.temp_dev = NULL; } done: if (do_unlock) |