{"id":814925,"url":"http://patchwork.ozlabs.org/api/patches/814925/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1505742050-5697-4-git-send-email-bmeng.cn@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1505742050-5697-4-git-send-email-bmeng.cn@gmail.com>","list_archive_url":null,"date":"2017-09-18T13:40:39","name":"[U-Boot,03/14] usb: xhci: Don't assume LS/FS devices are always behind a HS hub","commit_ref":"8a0e6d83070a977442aaba2c5a74cbe34e157012","pull_url":null,"state":"accepted","archived":false,"hash":"7b5873424938f38af38f2894d44f7112281f38aa","submitter":{"id":64981,"url":"http://patchwork.ozlabs.org/api/people/64981/?format=json","name":"Bin Meng","email":"bmeng.cn@gmail.com"},"delegate":{"id":1699,"url":"http://patchwork.ozlabs.org/api/users/1699/?format=json","username":"marex","first_name":"Marek","last_name":"Vasut","email":"marek.vasut@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1505742050-5697-4-git-send-email-bmeng.cn@gmail.com/mbox/","series":[{"id":3647,"url":"http://patchwork.ozlabs.org/api/series/3647/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=3647","date":"2017-09-18T13:40:36","name":"usb: xhci: Add interrupt transfer support and full speed device support","version":1,"mbox":"http://patchwork.ozlabs.org/series/3647/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/814925/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/814925/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"JsjJHqv7\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwnCt4CXmz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 23:39:06 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 574E9C21E61; Mon, 18 Sep 2017 13:37:37 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id E8DA9C21F4D;\n\tMon, 18 Sep 2017 13:36:51 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 25A45C21E73; Mon, 18 Sep 2017 13:36:36 +0000 (UTC)","from mail-io0-f194.google.com (mail-io0-f194.google.com\n\t[209.85.223.194])\n\tby lists.denx.de (Postfix) with ESMTPS id 080F9C21F2C\n\tfor <u-boot@lists.denx.de>; Mon, 18 Sep 2017 13:36:33 +0000 (UTC)","by mail-io0-f194.google.com with SMTP id d16so1093413ioj.2\n\tfor <u-boot@lists.denx.de>; Mon, 18 Sep 2017 06:36:32 -0700 (PDT)","from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com.\n\t[147.11.156.139]) by smtp.gmail.com with ESMTPSA id\n\t193sm2528740ion.83.2017.09.18.06.36.30\n\t(version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 18 Sep 2017 06:36:31 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=8zANgsFgFeXefouAmNBhC7dTu6MEv4+WxxdwiVHIUew=;\n\tb=JsjJHqv7CY3+rJuooQNOXqnYqMKrAo7h1BoTVQ4tFZPB/Ttw2TxTj4ce13MfF4b17g\n\tvxUr1ZJoK7eSxrnW5rkWDKy7Nl2Y4x4E+/SeAn+Pr0kYemf0PRv0he94SMQlcOLZfu3Q\n\tz+ohHjZQByUMSwp7czlfoyi1hk3h2a66fvW8A8Q2t3F8FvWiWuIJCnNKrs0VaVTcqtdf\n\tVZ3muNRREEhP1G7b0OLjz0Gz/wI7D6pxLSkabuDze2SkEHFw4CYl3GFJ8/cDWGMaha7+\n\t7rJ+X1p/kIH4I65DpbkZDY+a7sltFx2dOMHRAZAZaZdTE/8cHZazk9u8xFoCvqvbL3Ac\n\t9DGQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=8zANgsFgFeXefouAmNBhC7dTu6MEv4+WxxdwiVHIUew=;\n\tb=Q6lm+px2mKWWRDuPlnymho3shA22Nh2kIxyw6X+kbaJMWJCpsGXqVR+k/OByZU7aCa\n\tPXMFiO77sscnT0od/Z2WAJOmPGjxS/lmVXKcwtnDgQOheU/Q/OqTM+LL5shLTQb1jPyE\n\tbG5TRp0k21/kDNn73YVh0uyR37VwfnOMZ9wMDyihDjFqRvLABpxqyZzzXUcsdsiir/uj\n\tkxqiZFNjaRCQjh5+HHf1YZ1Qa9G5QfNNgo2ENX61WFcbN+0aAmMBmsYdQBxrfbHimueA\n\t6lusxXPbquCaUcSjm+P3uQzm8P2VEpHMnicl7LMafKBW/cSSbKtMmq+1QDzCI5UYN8Nb\n\tBq1g==","X-Gm-Message-State":"AHPjjUgJ/cl09TzXWIuVxeuK6HAt1f9UiPq3aJ4x3y/nia1KlbEnCfZS\n\tmhwWwYzty/LcxA==","X-Google-Smtp-Source":"AOwi7QCvd+XyypWm6/yCj5i3vQ6h7TpzR3bcvTbf0i/advB90J4vrLFvkk75qFKnsAN6yNwNfh45zQ==","X-Received":"by 10.107.68.6 with SMTP id r6mr17283272ioa.282.1505741791971;\n\tMon, 18 Sep 2017 06:36:31 -0700 (PDT)","From":"Bin Meng <bmeng.cn@gmail.com>","To":"Marek Vasut <marex@denx.de>, U-Boot Mailing List <u-boot@lists.denx.de>","Date":"Mon, 18 Sep 2017 06:40:39 -0700","Message-Id":"<1505742050-5697-4-git-send-email-bmeng.cn@gmail.com>","X-Mailer":"git-send-email 1.7.9.5","In-Reply-To":"<1505742050-5697-1-git-send-email-bmeng.cn@gmail.com>","References":"<1505742050-5697-1-git-send-email-bmeng.cn@gmail.com>","Cc":"Stefan Roese <sr@denx.de>","Subject":"[U-Boot] [PATCH 03/14] usb: xhci: Don't assume LS/FS devices are\n\talways behind a HS hub","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"At present xHCI driver assumes LS/FS devices are attached directly\nto a HS hub. If they are connected to a LS/FS hub, the driver will\nfail to perform the USB enumeration process on such devices.\n\nThis is fixed by looking from the device itself all the way up to\nthe HS hub where the TT that serves the device is located.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\n drivers/usb/host/xhci-mem.c | 18 ++++++++++++++----\n 1 file changed, 14 insertions(+), 4 deletions(-)","diff":"diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c\nindex d5eab3a..84982a9 100644\n--- a/drivers/usb/host/xhci-mem.c\n+++ b/drivers/usb/host/xhci-mem.c\n@@ -786,12 +786,22 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,\n #ifdef CONFIG_DM_USB\n \t/* Set up TT fields to support FS/LS devices */\n \tif (speed == USB_SPEED_LOW || speed == USB_SPEED_FULL) {\n-\t\tdev = dev_get_parent_priv(udev->dev);\n-\t\tif (dev->speed == USB_SPEED_HIGH) {\n-\t\t\thub = dev_get_uclass_priv(udev->dev);\n+\t\tstruct udevice *parent = udev->dev;\n+\n+\t\tdev = udev;\n+\t\tdo {\n+\t\t\tport_num = dev->portnr;\n+\t\t\tdev = dev_get_parent_priv(parent);\n+\t\t\tif (usb_hub_is_root_hub(dev->dev))\n+\t\t\t\tbreak;\n+\t\t\tparent = dev->dev->parent;\n+\t\t} while (dev->speed != USB_SPEED_HIGH);\n+\n+\t\tif (!usb_hub_is_root_hub(dev->dev)) {\n+\t\t\thub = dev_get_uclass_priv(dev->dev);\n \t\t\tif (hub->tt.multi)\n \t\t\t\tslot_ctx->dev_info |= cpu_to_le32(DEV_MTT);\n-\t\t\tslot_ctx->tt_info |= cpu_to_le32(TT_PORT(udev->portnr));\n+\t\t\tslot_ctx->tt_info |= cpu_to_le32(TT_PORT(port_num));\n \t\t\tslot_ctx->tt_info |= cpu_to_le32(TT_SLOT(dev->slot_id));\n \t\t}\n \t}\n","prefixes":["U-Boot","03/14"]}