Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Various usb 3 related changes from Takahiro HAYASHI
details: https://anonhg.NetBSD.org/src/rev/fa8258812a22
branches: trunk
changeset: 336882:fa8258812a22
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Mar 26 08:08:27 2015 +0000
description:
Various usb 3 related changes from Takahiro HAYASHI
diffstat:
sys/dev/usb/usb.h | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diffs (90 lines):
diff -r a116c3760bc9 -r fa8258812a22 sys/dev/usb/usb.h
--- a/sys/dev/usb/usb.h Thu Mar 26 04:38:17 2015 +0000
+++ b/sys/dev/usb/usb.h Thu Mar 26 08:08:27 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.h,v 1.111 2014/11/08 16:20:23 skrll Exp $ */
+/* $NetBSD: usb.h,v 1.112 2015/03/26 08:08:27 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */
/*
@@ -260,6 +260,7 @@
#define UC_REMOTE_WAKEUP 0x20
uByte bMaxPower; /* max current in 2 mA units */
#define UC_POWER_FACTOR 2
+#define UC_POWER_FACTOR_SS 8
} UPACKED usb_config_descriptor_t;
#define USB_CONFIG_DESCRIPTOR_SIZE 9
@@ -330,6 +331,7 @@
} UPACKED usb_endpoint_ss_comp_descriptor_t;
#define USB_ENDPOINT_SS_COMP_DESCRIPTOR_SIZE 6
+/* USB 3.0 9.6.2, Table 9-12 */
typedef struct {
uByte bLength;
uByte bDescriptorType;
@@ -338,10 +340,12 @@
} UPACKED usb_bos_descriptor_t;
#define USB_BOS_DESCRIPTOR_SIZE 5
+/* common members of device capability descriptors */
typedef struct {
uByte bLength;
uByte bDescriptorType;
uByte bDevCapabilityType;
+/* Table 9-14 */
#define USB_DEVCAP_RESERVED 0x00
#define USB_DEVCAP_WUSB 0x01
#define USB_DEVCAP_USB2EXT 0x02
@@ -357,17 +361,19 @@
#define USB_DEVCAP_WUSB_EXT 0x0c
/* data ... */
} UPACKED usb_device_capability_descriptor_t;
-#define USB_DEVICE_CAPABILITY_DESCRIPTOR_SIZE 3 /* variable length */
+#define USB_DEVICE_CAPABILITY_DESCRIPTOR_SIZE 3 /* at least */
+/* 9.6.2.1 */
typedef struct {
uByte bLength;
uByte bDescriptorType;
uByte bDevCapabilityType;
uDWord bmAttributes;
#define USB_DEVCAP_USB2EXT_LPM __BIT(1)
-} UPACKED usb_usb2ext_descriptor_t;
+} UPACKED usb_devcap_usb2ext_descriptor_t;
#define USB_DEVCAP_USB2EXT_DESCRIPTOR_SIZE 7
+/* 9.6.2.2 */
typedef struct {
uByte bLength;
uByte bDescriptorType;
@@ -375,16 +381,17 @@
uByte bmAttributes;
#define USB_DEVCAP_SS_LTM __BIT(1)
uWord wSpeedsSupported;
-#define USB_DEVCAP_SS_SPEED_SS __BIT(0)
+#define USB_DEVCAP_SS_SPEED_LS __BIT(0)
#define USB_DEVCAP_SS_SPEED_FS __BIT(1)
#define USB_DEVCAP_SS_SPEED_HS __BIT(2)
-#define USB_DEVCAP_SS_SPEED_LS __BIT(3)
+#define USB_DEVCAP_SS_SPEED_SS __BIT(3)
uByte bFunctionalitySupport;
uByte bU1DevExitLat;
uWord wU2DevExitLat;
} UPACKED usb_devcap_ss_descriptor_t;
#define USB_DEVCAP_SS_DESCRIPTOR_SIZE 10
+/* 9.6.2.4 */
typedef struct {
uByte bLength;
uByte bDescriptorType;
@@ -749,7 +756,9 @@
#endif
#define USB_MIN_POWER 100 /* mA */
+#define USB_MIN_POWER_SS 150 /* mA */
#define USB_MAX_POWER 500 /* mA */
+#define USB_MAX_POWER_SS 900 /* mA */
#define USB_BUS_RESET_DELAY 100 /* ms XXX?*/
Home |
Main Index |
Thread Index |
Old Index