usb: xhci: Initialize dev_state to 0 in the input slot context
authorBin Meng <bmeng.cn@gmail.com>
Thu, 24 May 2018 06:40:48 +0000 (23:40 -0700)
committerMarek Vasut <marex@denx.de>
Wed, 30 May 2018 09:59:10 +0000 (11:59 +0200)
Per xHCI spec chapter 6.2.2 table 6-7, as input, software shall
initialize the dev_state field to '0'. Though this does not seem
to cause any issue with most xHC implementations, let's do this
to conform with the spec.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
drivers/usb/host/xhci.c

index 565948c1199748083da2f2f488bc775b386acf20..8c1126e79dd8944d8e2d8b1f938636e51e81e0e4 100644 (file)
@@ -1452,6 +1452,7 @@ static int xhci_update_hub_device(struct udevice *dev, struct usb_device *udev)
                think_time = (think_time / 666) - 1;
        if (udev->speed == USB_SPEED_HIGH)
                slot_ctx->tt_info |= cpu_to_le32(TT_THINK_TIME(think_time));
+       slot_ctx->dev_state = 0;
 
        return xhci_configure_endpoints(udev, false);
 }