summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.c
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2008-11-13 21:34:34 +0000
committern_hibma <n_hibma@FreeBSD.org>2008-11-13 21:34:34 +0000
commit5e5f99e12aa2af18f2a02c849339c37c965f53a5 (patch)
tree66955ea4201561ea436ef1799772498b3608a06d /sys/dev/usb/usbdi.c
parent1c998c296e7f4c398c2fc177d3648a7c1f6d46c1 (diff)
downloadFreeBSD-src-5e5f99e12aa2af18f2a02c849339c37c965f53a5.zip
FreeBSD-src-5e5f99e12aa2af18f2a02c849339c37c965f53a5.tar.gz
Add a reset device command to ugen.c.
This is needed to make some devices work that require a firmware upload and a USB reset afterwards.
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r--sys/dev/usb/usbdi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 59bcf4b..8f0ce0f 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1235,6 +1235,15 @@ usbd_set_polling(usbd_device_handle dev, int on)
dev->bus->methods->soft_intr(dev->bus);
}
+usbd_status
+usbd_reset_device(usbd_device_handle dev)
+{
+ usbd_device_handle parent = dev->myhub;
+ struct usbd_port *up = dev->powersrc;
+
+ return usbd_reset_port(parent, up->portno, &up->status);
+}
+
usb_endpoint_descriptor_t *
usbd_get_endpoint_descriptor(usbd_interface_handle iface, u_int8_t address)
OpenPOWER on IntegriCloud