Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Add usbd_get_port_status_ext
details: https://anonhg.NetBSD.org/src/rev/3bad5fcefc90
branches: nick-nhusb
changeset: 334223:3bad5fcefc90
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jun 07 08:04:36 2015 +0000
description:
Add usbd_get_port_status_ext
>From t-hash
diffstat:
sys/dev/usb/usbdi_util.c | 19 +++++++++++++++++--
sys/dev/usb/usbdi_util.h | 4 +++-
2 files changed, 20 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r c8590f96b433 -r 3bad5fcefc90 sys/dev/usb/usbdi_util.c
--- a/sys/dev/usb/usbdi_util.c Sun Jun 07 07:55:30 2015 +0000
+++ b/sys/dev/usb/usbdi_util.c Sun Jun 07 08:04:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi_util.c,v 1.63.2.9 2015/06/06 15:27:38 skrll Exp $ */
+/* $NetBSD: usbdi_util.c,v 1.63.2.10 2015/06/07 08:04:36 skrll Exp $ */
/*
* Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.63.2.9 2015/06/06 15:27:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.63.2.10 2015/06/07 08:04:36 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -190,6 +190,21 @@
return usbd_do_request(dev, &req, ps);
}
+/* USB 3.1 10.16.2.6, 10.16.2.6.3 */
+usbd_status
+usbd_get_port_status_ext(struct usbd_device *dev, int port,
+ usb_port_status_ext_t *pse)
+{
+ usb_device_request_t req;
+
+ req.bmRequestType = UT_READ_CLASS_OTHER;
+ req.bRequest = UR_GET_STATUS;
+ USETW2(req.wValue, 0, UR_PST_EXT_PORT_STATUS);
+ USETW(req.wIndex, port);
+ USETW(req.wLength, sizeof *pse);
+ return (usbd_do_request(dev, &req, pse));
+}
+
usbd_status
usbd_clear_hub_feature(struct usbd_device *dev, int sel)
{
diff -r c8590f96b433 -r 3bad5fcefc90 sys/dev/usb/usbdi_util.h
--- a/sys/dev/usb/usbdi_util.h Sun Jun 07 07:55:30 2015 +0000
+++ b/sys/dev/usb/usbdi_util.h Sun Jun 07 08:04:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi_util.h,v 1.45.6.7 2015/06/06 15:27:38 skrll Exp $ */
+/* $NetBSD: usbdi_util.h,v 1.45.6.8 2015/06/07 08:04:36 skrll Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -48,6 +48,8 @@
usbd_status usbd_set_address(struct usbd_device *, int);
usbd_status usbd_get_port_status(struct usbd_device *,
int, usb_port_status_t *);
+usbd_status usbd_get_port_status_ext(struct usbd_device *,
+ int, usb_port_status_ext_t *);
usbd_status usbd_set_hub_feature(struct usbd_device *, int);
usbd_status usbd_clear_hub_feature(struct usbd_device *, int);
usbd_status usbd_set_port_feature(struct usbd_device *, int, int);
Home |
Main Index |
Thread Index |
Old Index