Module Name: src
Committed By: skrll
Date: Wed Dec 3 22:40:55 UTC 2014
Modified Files:
src/sys/arch/mips/adm5120/dev [nick-nhusb]: ahci.c
src/sys/dev/ic [nick-nhusb]: sl811hs.c
src/sys/dev/usb [nick-nhusb]: ehci.c ohci.c uhci.c usb.h xhci.c
src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c
src/sys/rump/dev/lib/libugenhc [nick-nhusb]: ugenhc.c
Log Message:
Provide a USETWD macro for use with USB words designated
initialisers.
To generate a diff of this commit:
cvs rdiff -u -r1.12.6.8 -r1.12.6.9 src/sys/arch/mips/adm5120/dev/ahci.c
cvs rdiff -u -r1.47.6.7 -r1.47.6.8 src/sys/dev/ic/sl811hs.c
cvs rdiff -u -r1.234.2.10 -r1.234.2.11 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.254.2.9 -r1.254.2.10 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.264.4.9 -r1.264.4.10 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.111.2.4 -r1.111.2.5 src/sys/dev/usb/usb.h
cvs rdiff -u -r1.28.2.9 -r1.28.2.10 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.32.2.6 -r1.32.2.7 src/sys/external/bsd/dwc2/dwc2.c
cvs rdiff -u -r1.22.4.4 -r1.22.4.5 src/sys/rump/dev/lib/libugenhc/ugenhc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/adm5120/dev/ahci.c
diff -u src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.8 src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.9
--- src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.8 Wed Dec 3 14:18:07 2014
+++ src/sys/arch/mips/adm5120/dev/ahci.c Wed Dec 3 22:40:54 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ahci.c,v 1.12.6.8 2014/12/03 14:18:07 skrll Exp $ */
+/* $NetBSD: ahci.c,v 1.12.6.9 2014/12/03 22:40:54 skrll Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.8 2014/12/03 14:18:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.9 2014/12/03 22:40:54 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -554,11 +554,10 @@ usb_device_descriptor_t ahci_devd = {
usb_config_descriptor_t ahci_confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = {
- USB_CONFIG_DESCRIPTOR_SIZE +
- USB_INTERFACE_DESCRIPTOR_SIZE +
- USB_ENDPOINT_DESCRIPTOR_SIZE,
- },
+ .wTotalLength = USETWD(
+ USB_CONFIG_DESCRIPTOR_SIZE +
+ USB_INTERFACE_DESCRIPTOR_SIZE +
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -583,7 +582,7 @@ usb_endpoint_descriptor_t ahci_endpd = {
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | AHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {8},
+ .wMaxPacketSize = USETWD(8),
.bInterval = 255
};
@@ -591,7 +590,7 @@ usb_hub_descriptor_t ahci_hubd = {
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 2,
- .wHubCharacteristics = { 0, 0 },
+ .wHubCharacteristics = USETWD(0),
.bPwrOn2PwrGood = 0,
.bHubContrCurrent = 0,
.DeviceRemovable = { 0x00 },
Index: src/sys/dev/ic/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.47.6.7 src/sys/dev/ic/sl811hs.c:1.47.6.8
--- src/sys/dev/ic/sl811hs.c:1.47.6.7 Wed Dec 3 14:18:07 2014
+++ src/sys/dev/ic/sl811hs.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: sl811hs.c,v 1.47.6.7 2014/12/03 14:18:07 skrll Exp $ */
+/* $NetBSD: sl811hs.c,v 1.47.6.8 2014/12/03 22:40:55 skrll Exp $ */
/*
* Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.7 2014/12/03 14:18:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.8 2014/12/03 22:40:55 skrll Exp $");
#include "opt_slhci.h"
@@ -2957,11 +2957,10 @@ static const struct slhci_confd_t {
.confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = {
- USB_CONFIG_DESCRIPTOR_SIZE +
- USB_INTERFACE_DESCRIPTOR_SIZE +
- USB_ENDPOINT_DESCRIPTOR_SIZE
- },
+ .wTotalLength = USETWD(
+ USB_CONFIG_DESCRIPTOR_SIZE +
+ USB_INTERFACE_DESCRIPTOR_SIZE +
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -2984,7 +2983,7 @@ static const struct slhci_confd_t {
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | ROOT_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {240, 0},
+ .wMaxPacketSize = USETWD(240),
.bInterval = 255
}
};
@@ -2993,10 +2992,7 @@ static const usb_hub_descriptor_t slhci_
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
- .wHubCharacteristics = {
- UHD_PWR_INDIVIDUAL | UHD_OC_NONE,
- 0
- },
+ .wHubCharacteristics = USETWD(UHD_PWR_INDIVIDUAL | UHD_OC_NONE),
.bPwrOn2PwrGood = 50,
.bHubContrCurrent = 0,
.DeviceRemovable = { 0x00 },
Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.10 src/sys/dev/usb/ehci.c:1.234.2.11
--- src/sys/dev/usb/ehci.c:1.234.2.10 Wed Dec 3 13:19:38 2014
+++ src/sys/dev/usb/ehci.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.234.2.10 2014/12/03 13:19:38 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.234.2.11 2014/12/03 22:40:55 skrll Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.10 2014/12/03 13:19:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.11 2014/12/03 22:40:55 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -2286,11 +2286,10 @@ Static const usb_device_qualifier_t ehci
Static const usb_config_descriptor_t ehci_confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = {
+ .wTotalLength = USETWD(
USB_CONFIG_DESCRIPTOR_SIZE +
USB_INTERFACE_DESCRIPTOR_SIZE +
- USB_ENDPOINT_DESCRIPTOR_SIZE
- },
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -2315,7 +2314,7 @@ Static const usb_endpoint_descriptor_t e
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | EHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {8, 0},
+ .wMaxPacketSize = USETWD(8),
.bInterval = 12
};
@@ -2323,7 +2322,7 @@ Static const usb_hub_descriptor_t ehci_h
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 0,
- .wHubCharacteristics = {0,0},
+ .wHubCharacteristics = USETWD(0),
.bPwrOn2PwrGood = 0,
.bHubContrCurrent = 0,
.DeviceRemovable = {""},
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.9 src/sys/dev/usb/ohci.c:1.254.2.10
--- src/sys/dev/usb/ohci.c:1.254.2.9 Wed Dec 3 13:19:38 2014
+++ src/sys/dev/usb/ohci.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.254.2.9 2014/12/03 13:19:38 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.254.2.10 2014/12/03 22:40:55 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.9 2014/12/03 13:19:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.10 2014/12/03 22:40:55 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2414,11 +2414,10 @@ Static usb_device_descriptor_t ohci_devd
Static const usb_config_descriptor_t ohci_confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = {
- USB_CONFIG_DESCRIPTOR_SIZE +
- USB_INTERFACE_DESCRIPTOR_SIZE +
- USB_ENDPOINT_DESCRIPTOR_SIZE
- },
+ .wTotalLength = USETWD(
+ USB_CONFIG_DESCRIPTOR_SIZE +
+ USB_INTERFACE_DESCRIPTOR_SIZE +
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -2443,7 +2442,7 @@ Static const usb_endpoint_descriptor_t o
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | OHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {8, 0},
+ .wMaxPacketSize = USETWD(8),
.bInterval = 255,
};
Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.9 src/sys/dev/usb/uhci.c:1.264.4.10
--- src/sys/dev/usb/uhci.c:1.264.4.9 Wed Dec 3 13:19:38 2014
+++ src/sys/dev/usb/uhci.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.264.4.9 2014/12/03 13:19:38 skrll Exp $ */
+/* $NetBSD: uhci.c,v 1.264.4.10 2014/12/03 22:40:55 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.9 2014/12/03 13:19:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.10 2014/12/03 22:40:55 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3346,11 +3346,10 @@ usb_device_descriptor_t uhci_devd = {
const usb_config_descriptor_t uhci_confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = {
- USB_CONFIG_DESCRIPTOR_SIZE +
- USB_INTERFACE_DESCRIPTOR_SIZE +
- USB_ENDPOINT_DESCRIPTOR_SIZE
- },
+ .wTotalLength = USETWD(
+ USB_CONFIG_DESCRIPTOR_SIZE +
+ USB_INTERFACE_DESCRIPTOR_SIZE +
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -3375,7 +3374,7 @@ const usb_endpoint_descriptor_t uhci_end
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | UHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {8},
+ .wMaxPacketSize = USETWD(8),
.bInterval = 255
};
@@ -3383,10 +3382,7 @@ const usb_hub_descriptor_t uhci_hubd_pii
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 2,
- .wHubCharacteristics = {
- UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL,
- 0
- },
+ .wHubCharacteristics = USETWD(UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL),
.bPwrOn2PwrGood = 50,
.bHubContrCurrent = 0,
.DeviceRemovable = { 0x00 },
Index: src/sys/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.111.2.4 src/sys/dev/usb/usb.h:1.111.2.5
--- src/sys/dev/usb/usb.h:1.111.2.4 Wed Dec 3 14:18:07 2014
+++ src/sys/dev/usb/usb.h Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.h,v 1.111.2.4 2014/12/03 14:18:07 skrll Exp $ */
+/* $NetBSD: usb.h,v 1.111.2.5 2014/12/03 22:40:55 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */
/*
@@ -78,6 +78,7 @@ typedef uint8_t uDWord[4];
#define UGETW(w) ((w)[0] | ((w)[1] << 8))
#define USETW(w,v) ((w)[0] = (uint8_t)(v), (w)[1] = (uint8_t)((v) >> 8))
+#define USETWD(val) { (uint8_t)(val), (uint8_t)((val) >> 8) }
#define UGETDW(w) ((w)[0] | ((w)[1] << 8) | ((w)[2] << 16) | ((w)[3] << 24))
#define USETDW(w,v) ((w)[0] = (uint8_t)(v), \
(w)[1] = (uint8_t)((v) >> 8), \
Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.28.2.9 src/sys/dev/usb/xhci.c:1.28.2.10
--- src/sys/dev/usb/xhci.c:1.28.2.9 Wed Dec 3 22:33:56 2014
+++ src/sys/dev/usb/xhci.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.28.2.9 2014/12/03 22:33:56 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.28.2.10 2014/12/03 22:40:55 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.9 2014/12/03 22:33:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.10 2014/12/03 22:40:55 skrll Exp $");
#include "opt_usb.h"
@@ -2030,11 +2030,10 @@ static const usb_device_qualifier_t xhci
static const usb_config_descriptor_t xhci_confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = {
- USB_CONFIG_DESCRIPTOR_SIZE +
- USB_INTERFACE_DESCRIPTOR_SIZE +
- USB_ENDPOINT_DESCRIPTOR_SIZE
- },
+ .wTotalLength = USETWD(
+ USB_CONFIG_DESCRIPTOR_SIZE +
+ USB_INTERFACE_DESCRIPTOR_SIZE +
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -2059,7 +2058,7 @@ static const usb_endpoint_descriptor_t x
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | XHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {8, 0},
+ .wMaxPacketSize = USETWD(8),
.bInterval = 12
};
@@ -2067,7 +2066,7 @@ static const usb_hub_descriptor_t xhci_h
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 0,
- .wHubCharacteristics = {0,0},
+ .wHubCharacteristics = USETWD(0),
.bPwrOn2PwrGood = 0,
.bHubContrCurrent = 0,
.DeviceRemovable = {""},
Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.32.2.6 src/sys/external/bsd/dwc2/dwc2.c:1.32.2.7
--- src/sys/external/bsd/dwc2/dwc2.c:1.32.2.6 Wed Dec 3 12:52:07 2014
+++ src/sys/external/bsd/dwc2/dwc2.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.32.2.6 2014/12/03 12:52:07 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.32.2.7 2014/12/03 22:40:55 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.6 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.7 2014/12/03 22:40:55 skrll Exp $");
#include "opt_usb.h"
@@ -605,7 +605,7 @@ Static const struct dwc2_config_desc dwc
.confd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength[0] = sizeof(dwc2_confd),
+ .wTotalLength = USETWD(sizeof(dwc2_confd)),
.bNumInterface = 1,
.bConfigurationValue = 1,
.iConfiguration = 0,
@@ -628,19 +628,18 @@ Static const struct dwc2_config_desc dwc
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | DWC2_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {8, 0}, /* max packet */
+ .wMaxPacketSize = USETWD(8), /* max packet */
.bInterval = 255,
},
};
-#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) }
#if 0
/* appears to be unused */
Static const usb_hub_descriptor_t dwc2_hubd = {
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
- HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)),
+ .wHubCharacteristics = USETWD(UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL),
.bPwrOn2PwrGood = 50,
.bHubContrCurrent = 0,
.DeviceRemovable = {0}, /* port is removable */
Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c
diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.22.4.4 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.22.4.5
--- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.22.4.4 Wed Dec 3 12:52:07 2014
+++ src/sys/rump/dev/lib/libugenhc/ugenhc.c Wed Dec 3 22:40:55 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ugenhc.c,v 1.22.4.4 2014/12/03 12:52:07 skrll Exp $ */
+/* $NetBSD: ugenhc.c,v 1.22.4.5 2014/12/03 22:40:55 skrll Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.22.4.4 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.22.4.5 2014/12/03 22:40:55 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -149,9 +149,10 @@ static const usb_device_descriptor_t rum
static const usb_config_descriptor_t rumphub_ucd = {
.bLength = USB_CONFIG_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_CONFIG,
- .wTotalLength = { USB_CONFIG_DESCRIPTOR_SIZE
- + USB_INTERFACE_DESCRIPTOR_SIZE
- + USB_ENDPOINT_DESCRIPTOR_SIZE },
+ .wTotalLength = USETWD(
+ USB_CONFIG_DESCRIPTOR_SIZE +
+ USB_INTERFACE_DESCRIPTOR_SIZE +
+ USB_ENDPOINT_DESCRIPTOR_SIZE),
.bNumInterface = 1,
.bmAttributes = UC_SELF_POWERED | UC_ATTR_MBO,
};
@@ -170,7 +171,7 @@ static const usb_endpoint_descriptor_t r
.bLength = USB_ENDPOINT_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_ENDPOINT,
.bmAttributes = UE_INTERRUPT,
- .wMaxPacketSize = {64, 0},
+ .wMaxPacketSize = USETWD(64),
};
static const usb_hub_descriptor_t rumphub_hdd = {