Hi,

    bmAttributes         0x40
        (Missing must-be-set bit!)
        Self Powered

diff below fixes this visual-only "bug".

-Artturi


diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c
index 1c0ccba0e25..676fd5a98df 100644
--- a/sys/dev/usb/dwc2/dwc2.c
+++ b/sys/dev/usb/dwc2/dwc2.c
@@ -642,7 +642,7 @@ STATIC const struct dwc2_config_desc dwc2_confd = {
                .bNumInterface = 1,
                .bConfigurationValue = 1,
                .iConfiguration = 0,
-               .bmAttributes = UC_SELF_POWERED,
+               .bmAttributes = UC_BUS_POWERED | UC_SELF_POWERED,
                .bMaxPower = 0,
        },
        .ifcd = {
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index b75c47db7cc..2d89e44593c 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1733,7 +1733,7 @@ usb_config_descriptor_t ehci_confd = {
        1,
        1,
        0,
-       UC_SELF_POWERED,
+       UC_BUS_POWERED | UC_SELF_POWERED,
        0                       /* max power */
 };
 
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 9313dc382df..ae409e7367d 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -2187,7 +2187,7 @@ usb_config_descriptor_t ohci_confd = {
        1,
        1,
        0,
-       UC_SELF_POWERED,
+       UC_BUS_POWERED | UC_SELF_POWERED,
        0                       /* max power */
 };
 
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 5c499cbe69f..ab8982934b4 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -2708,7 +2708,7 @@ usb_config_descriptor_t uhci_confd = {
        1,
        1,
        0,
-       UC_SELF_POWERED,
+       UC_BUS_POWERED | UC_SELF_POWERED,
        0                       /* max power */
 };
 
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index efa46ad674a..1ad1713a482 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1983,7 +1983,7 @@ const usb_config_descriptor_t xhci_confd = {
        1,
        1,
        0,
-       UC_SELF_POWERED,
+       UC_BUS_POWERED | UC_SELF_POWERED,
        0                      /* max power */
 };
 

Reply via email to