summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usbdi_util.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-07-09 15:47:55 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-07-09 15:47:55 +0000
commit2670b664800e3af0d1f17d6d3c2a828d75b03cae (patch)
tree6369a7a71c8cd85c9e2b4927315d74b5ae91b952 /sys/dev/usb/usbdi_util.c
parent66a321f8929826c820a40140fffacb73732ef86f (diff)
Adds an optional bus function to set the address of a new device and
explicitly set it when required. Right now xhci(4) does not need such function because it assigns addresses when the first pipe of a device is opened. ok yuo@, pirofti@
Diffstat (limited to 'sys/dev/usb/usbdi_util.c')
-rw-r--r--sys/dev/usb/usbdi_util.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c
index d80c7612bd0..50629ab82c3 100644
--- a/sys/dev/usb/usbdi_util.c
+++ b/sys/dev/usb/usbdi_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi_util.c,v 1.36 2014/04/24 09:40:28 mpi Exp $ */
+/* $OpenBSD: usbdi_util.c,v 1.37 2014/07/09 15:47:54 mpi Exp $ */
/* $NetBSD: usbdi_util.c,v 1.40 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi_util.c,v 1.14 1999/11/17 22:33:50 n_hibma Exp $ */
@@ -114,19 +114,6 @@ usbd_get_hub_descriptor(struct usbd_device *dev, usb_hub_descriptor_t *hd,
}
usbd_status
-usbd_set_address(struct usbd_device *dev, int addr)
-{
- usb_device_request_t req;
-
- req.bmRequestType = UT_WRITE_DEVICE;
- req.bRequest = UR_SET_ADDRESS;
- USETW(req.wValue, addr);
- USETW(req.wIndex, 0);
- USETW(req.wLength, 0);
- return usbd_do_request(dev, &req, 0);
-}
-
-usbd_status
usbd_get_port_status(struct usbd_device *dev, int port, usb_port_status_t *ps)
{
usb_device_request_t req;