diff options
author | hselasky <hselasky@FreeBSD.org> | 2012-01-12 21:21:20 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2012-01-12 21:21:20 +0000 |
commit | 6c85604246f379ee4bb4d0701a1f85b5b1cdf10f (patch) | |
tree | 38f3d90c8fddf434631d370481d287f6ba079ccb /sys/dev/usb/usb_request.c | |
parent | 0238379b18c22577e791b322bb2f68d9447a5b12 (diff) | |
download | FreeBSD-src-6c85604246f379ee4bb4d0701a1f85b5b1cdf10f.zip FreeBSD-src-6c85604246f379ee4bb4d0701a1f85b5b1cdf10f.tar.gz |
- Try to fix support for USB 3.0 HUBs.
- Try to fix support for USB 3.0 suspend and resume.
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/usb_request.c')
-rw-r--r-- | sys/dev/usb/usb_request.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index d692b93..f95f883 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -2164,3 +2164,27 @@ usbd_req_clear_tt_buffer(struct usb_device *udev, struct mtx *mtx, USETW(req.wLength, 0); return (usbd_do_request(udev, mtx, &req, 0)); } + +/*------------------------------------------------------------------------* + * usbd_req_set_port_link_state + * + * USB 3.0 specific request + * + * Returns: + * 0: Success + * Else: Failure + *------------------------------------------------------------------------*/ +usb_error_t +usbd_req_set_port_link_state(struct usb_device *udev, struct mtx *mtx, + uint8_t port, uint8_t link_state) +{ + struct usb_device_request req; + + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_SET_FEATURE; + USETW(req.wValue, UHF_PORT_LINK_STATE); + req.wIndex[0] = port; + req.wIndex[1] = link_state; + USETW(req.wLength, 0); + return (usbd_do_request(udev, mtx, &req, 0)); +} |