]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb: hub: Clear BH reset status change for a 3.0 hub
authorBin Meng <bmeng.cn@gmail.com>
Mon, 18 Sep 2017 13:40:46 +0000 (06:40 -0700)
committerMarek Vasut <marex@denx.de>
Sun, 1 Oct 2017 14:32:54 +0000 (16:32 +0200)
USB 3.0 hubs report bit[5] in the port status change response as BH
reset. The hub shall set the C_BH_PORT_RESET field for this port.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
common/usb_hub.c

index a9d21bca5e32e07f716d6fe7ea9e5971cbe55140..325d16dfc8682d3b5cc0e950e04d80d24ab0861e 100644 (file)
@@ -494,6 +494,12 @@ static int usb_scan_port(struct usb_device_scan *usb_scan)
                usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_RESET);
        }
 
+       if ((portchange & USB_SS_PORT_STAT_C_BH_RESET) &&
+           usb_hub_is_superspeed(dev)) {
+               debug("port %d BH reset change\n", i + 1);
+               usb_clear_port_feature(dev, i + 1, USB_SS_PORT_FEAT_C_BH_RESET);
+       }
+
        /* A new USB device is ready at this point */
        debug("devnum=%d port=%d: USB dev found\n", dev->devnum, i + 1);