[{"id":3688558,"web_url":"http://patchwork.ozlabs.org/comment/3688558/","msgid":"<CAFLszTgdhUO4nTd57atF__z_ox2VSROdxFKP93kr+f4FyW=5Jw@mail.gmail.com>","list_archive_url":null,"date":"2026-05-08T15:42:40","subject":"Re: [RFC PATCH v2 00/64] drivers: usb: dwc3: sync code with Linux\n v6.16-rc7","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Jens,\n\nOn Thu, 7 May 2026 at 03:28, Jens Wiklander <jens.wiklander@linaro.org> wrote:\n>\n> Hi,\n>\n> This is a follow-up to Jerome's patchset [1], addressing previous feedback\n> regarding the monolithic nature of the driver update.\n>\n> The DWC3 USB driver was forked from the Linux kernel v3.19-rc1 eleven years\n> ago by commit 85d5e7075f33 (\"usb: dwc3: add dwc3 folder from linux kernel\n> to u-boot\"). Since then, not many kernel changes have been ported back into\n> U-Boot.\n>\n> This series synchronizes the DWC3 core with Linux v6.16-rc7. To provide\n> a clear audit trail and maintain bisectability, I have structured the\n> series as follows:\n>\n> 1. Restore to Baseline: The first commit reverts U-Boot-specific changes\n>    to drivers/usb/dwc3 to return the directory to a clean v3.19-rc1 state.\n> 2. Milestone Imports: A sequence of 50+ commits follows, each performing\n>    a \"snapshot\" import of the drivers/usb/dwc3 directory for every major\n>    kernel version (v3.19 through v6.16-rc7).\n> 3. U-Boot Adaptation: The final commits (based on Jerome's original work)\n>    re-introduce the necessary glue code, XHCI/UDC updates, and build fixes\n>    required for U-Boot integration.\n>\n> The final diff is identical to [1]. I decided to stick with that for now to\n> focus on the method of how we import or update the code.\n>\n> Note that this is compile-tested only. The CI pipeline on source.denx.de\n> was used as an OK/NOK indicator [2].\n>\n> The previous patchset was tested on xilinx_zynqmp_kria_defconfig and since\n> this diff is identical to the previous, it should still work on that\n> platform. With the help of a custom build script [3] and with an additional\n> patch [4], I could boot the Kria KV260 board and make it detect a USB SSD\n> plugged into one of its USB 3.0 ports. It certainly doesn't mean all\n> platforms using the DWC3 driver are still OK, but at least there is some\n> hope. If this breaks your platform I'd like to know, and if you can send a\n> fix it's even better.\n>\n> I tried cherry-picking all the 1000+ patches in v3.19-rc1..v6.16-rc7. There\n> were a few conflicts, even when backing out the original U-Boot patches on\n> top of the original v3.19-rc1 import. However, the resulting state still\n> diverged significantly from [1].\n>\n> Instead, I've imported each new kernel in a separate commit. That way it's\n> very clear which kernel patches are included. Since there aren't too many\n> patches for each kernel I'm listing the relevant commits in the U-Boot\n> commit message for easier reference. I did this with a script so it's easy\n> to make changes, if the approach is OK but we need to tune it. With this\n> approach it should be easy to tell if a Fixes patch for the kernel might\n> also be needed here.\n>\n> Thanks,\n> Jens\n>\n> [1] https://lore.kernel.org/all/20251121153812.2076440-1-jerome.forissier@linaro.org/\n> [2] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/30004\n> [3] https://source.denx.de/u-boot/u-boot-extras/-/raw/master/contrib/jforissier/zynqmp_kv260_build.sh\n> [4] https://gitlab.com/Linaro/trustedsubstrate/meta-ts/-/raw/master/meta-trustedsubstrate/recipes-bsp/u-boot/u-boot/zynqmp-kria-starter/0001-kv260-fix-usb.patch\n>\n> RFC v1 -> RFC v2:\n> - Split the v1 (\"usb: dwc3: re-import from kernel v6.16-rc7\") into (\"usb:\n>   dwc3: restore to original v3.19-rc1 kernel import\"),  (\"usb: dwc3: import\n>   from kernel v3.19)..(\"usb: dwc3: import from kernel v6.16-rc7\")\n>\n> Jens Wiklander (60):\n>   usb: dwc3: restore to original v3.19-rc1 kernel import\n>   usb: dwc3: import from kernel v3.19\n>   usb: dwc3: import from kernel v4.0\n>   usb: dwc3: import from kernel v4.1\n>   usb: dwc3: import from kernel v4.2\n>   usb: dwc3: import from kernel v4.3\n>   usb: dwc3: import from kernel v4.4\n>   usb: dwc3: import from kernel v4.5\n>   usb: dwc3: import from kernel v4.6\n>   usb: dwc3: import from kernel v4.7\n>   usb: dwc3: import from kernel v4.8\n>   usb: dwc3: import from kernel v4.9\n>   usb: dwc3: import from kernel v4.10\n>   usb: dwc3: import from kernel v4.11\n>   usb: dwc3: import from kernel v4.12\n>   usb: dwc3: import from kernel v4.13\n>   usb: dwc3: import from kernel v4.14\n>   usb: dwc3: import from kernel v4.15\n>   usb: dwc3: import from kernel v4.16\n>   usb: dwc3: import from kernel v4.17\n>   usb: dwc3: import from kernel v4.18\n>   usb: dwc3: import from kernel v4.19\n>   usb: dwc3: import from kernel v4.20\n>   usb: dwc3: import from kernel v5.0\n>   usb: dwc3: import from kernel v5.1\n>   usb: dwc3: import from kernel v5.2\n>   usb: dwc3: import from kernel v5.3\n>   usb: dwc3: import from kernel v5.4\n>   usb: dwc3: import from kernel v5.5\n>   usb: dwc3: import from kernel v5.6\n>   usb: dwc3: import from kernel v5.7\n>   usb: dwc3: import from kernel v5.8\n>   usb: dwc3: import from kernel v5.9\n>   usb: dwc3: import from kernel v5.10\n>   usb: dwc3: import from kernel v5.11\n>   usb: dwc3: import from kernel v5.12\n>   usb: dwc3: import from kernel v5.13\n>   usb: dwc3: import from kernel v5.14\n>   usb: dwc3: import from kernel v5.15\n>   usb: dwc3: import from kernel v5.16\n>   usb: dwc3: import from kernel v5.17\n>   usb: dwc3: import from kernel v5.18\n>   usb: dwc3: import from kernel v5.19\n>   usb: dwc3: import from kernel v6.0\n>   usb: dwc3: import from kernel v6.1\n>   usb: dwc3: import from kernel v6.2\n>   usb: dwc3: import from kernel v6.3\n>   usb: dwc3: import from kernel v6.4\n>   usb: dwc3: import from kernel v6.5\n>   usb: dwc3: import from kernel v6.6\n>   usb: dwc3: import from kernel v6.7\n>   usb: dwc3: import from kernel v6.8\n>   usb: dwc3: import from kernel v6.9\n>   usb: dwc3: import from kernel v6.10\n>   usb: dwc3: import from kernel v6.11\n>   usb: dwc3: import from kernel v6.12\n>   usb: dwc3: import from kernel v6.13\n>   usb: dwc3: import from kernel v6.14\n>   usb: dwc3: import from kernel v6.15\n>   usb: dwc3: import from kernel v6.16-rc7\n>\n> Jerome Forissier (4):\n>   usb: host: re-import xhci-ext-caps.h from kernel v6.16-rc7\n>   usb: gadget: re-import epautoconf.c from kernel v6.16-rc7\n>   usb: udc: re-import udc-core.c from kernel v6.16-rc7\n>   usb: fix build after resync of DWC3 with kernel v6.16-rc7\n>\n>  drivers/usb/cdns3/ep0.c                |    8 +-\n>  drivers/usb/common/common.c            |   23 +\n>  drivers/usb/dwc3/Makefile              |   57 +-\n>  drivers/usb/dwc3/core.c                | 1780 ++++++----\n>  drivers/usb/dwc3/core.h                | 1120 +++++--\n>  drivers/usb/dwc3/debug.h               |  432 +++\n>  drivers/usb/dwc3/dwc3-omap.c           |    2 -\n>  drivers/usb/dwc3/ep0.c                 |  737 +++--\n>  drivers/usb/dwc3/gadget.c              | 4152 ++++++++++++++++--------\n>  drivers/usb/dwc3/gadget.h              |  124 +-\n>  drivers/usb/dwc3/glue.h                |   36 +\n>  drivers/usb/dwc3/io.h                  |   29 +-\n>  drivers/usb/dwc3/linux-compat.h        |   16 -\n>  drivers/usb/dwc3/samsung_usb_phy.c     |   77 -\n>  drivers/usb/dwc3/ti_usb_phy.c          |    2 -\n>  drivers/usb/gadget/at91_udc.c          |   46 -\n>  drivers/usb/gadget/atmel_usba_udc.c    |  102 +-\n>  drivers/usb/gadget/ci_udc.c            |  419 ---\n>  drivers/usb/gadget/composite.c         |    2 +-\n>  drivers/usb/gadget/dwc2_udc_otg.c      |  174 +-\n>  drivers/usb/gadget/epautoconf.c        |  289 +-\n>  drivers/usb/gadget/ether.c             |   21 +-\n>  drivers/usb/gadget/f_acm.c             |   20 +-\n>  drivers/usb/gadget/f_fastboot.c        |   10 +-\n>  drivers/usb/gadget/f_mass_storage.c    |    5 +-\n>  drivers/usb/gadget/f_rockusb.c         |   11 +-\n>  drivers/usb/gadget/f_sdp.c             |   12 +-\n>  drivers/usb/gadget/f_thor.c            |   19 +-\n>  drivers/usb/gadget/udc/Makefile        |    1 +\n>  drivers/usb/gadget/udc/udc-core.c      | 1096 ++++++-\n>  drivers/usb/host/xhci-dwc3.c           |    4 +-\n>  drivers/usb/host/xhci-ext-caps.h       |  158 +\n>  drivers/usb/host/xhci-exynos5.c        |    2 +-\n>  drivers/usb/mtu3/mtu3_gadget_ep0.c     |   16 +-\n>  drivers/usb/musb-new/musb_gadget_ep0.c |   24 +-\n>  drivers/usb/musb-new/musb_uboot.c      |   39 -\n>  include/dm/device_compat.h             |   13 +\n>  include/dm/read.h                      |   46 +\n>  include/linux/compat.h                 |   15 +\n>  include/linux/usb/ch9.h                |   25 +-\n>  include/linux/usb/gadget.h             |  520 +--\n>  include/linux/usb/otg.h                |   10 +\n>  include/linux/usb/phy.h                |   56 +\n>  43 files changed, 7659 insertions(+), 4091 deletions(-)\n>  create mode 100644 drivers/usb/dwc3/debug.h\n>  create mode 100644 drivers/usb/dwc3/glue.h\n>  delete mode 100644 drivers/usb/dwc3/linux-compat.h\n>  delete mode 100644 drivers/usb/dwc3/samsung_usb_phy.c\n>  create mode 100644 drivers/usb/host/xhci-ext-caps.h\n>\n>\n> base-commit: 0f865ab5d68484b4dc1724809de1be06edc85df1\n> --\n> 2.43.0\n>\n\nThis makes me wonder what USB tests we have. Some boards use USB for\nEthernet, but are there any storage tests, etc.?\n\nRegards,\nSimon","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=GBlMF/ip;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"GBlMF/ip\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBtgJ3NfYz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 01:43:08 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B0ACB84D74;\n\tFri,  8 May 2026 17:42:57 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 6A5F184D5B; Fri,  8 May 2026 17:42:56 +0200 (CEST)","from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com\n [IPv6:2a00:1450:4864:20::52f])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0019E84D72\n for <u-boot@lists.denx.de>; Fri,  8 May 2026 17:42:53 +0200 (CEST)","by mail-ed1-x52f.google.com with SMTP id\n 4fb4d7f45d1cf-67c566cb519so4059249a12.3\n for <u-boot@lists.denx.de>; Fri, 08 May 2026 08:42:53 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","ARC-Seal":"i=1; a=rsa-sha256; t=1778254973; cv=none;\n d=google.com; s=arc-20240605;\n b=gs1x73g9VNgxRk6cCQz9QWdTWQbPWbkZxfLfjXS7vKMDZp+FCqL9m6tHUNT9ZjB0wC\n HX7zVRZ5EWr7s09Ct8+H0vb71WM+IR8sjNea/N/75LzphwcDpVnT1O+Jwcru9Mkj4o+6\n dKhuTAGRYLzAON+Y1TbqWGVXOSvJi6CSJ7HJSBzVZWr48RhTHvr+sOBffoUVFcO01zOG\n vRTXzg81hcAC/bQyAFPcj3T7KqKMOTq6yBkg9W92s6twRzJtdSgQ9fYeVY534TCLpGQ8\n 76+S2I49O2PRTQReN9lbZv71wch1PxEoBOf4a9O9TNSasL6jq/qebg4/P7u+085XTg6+\n kS3g==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:dkim-signature;\n bh=iZduXr8LEdP88Qov0PBUBX7+MGgX9w1A+fFRq0n7Pjw=;\n fh=4lIJf7IXnpn8Qc1JkkQ3SnyT4EfQxAlWF2VBwUzxZM0=;\n b=EzeqIcC2seXZ4Z0G4uDv651y8v+r0QRoiZFIOphBk1bIuA2d9Y2Dzyg8hUV5cUJdgN\n FQ/O2B8o/pKSvyI7UEt/WnxLBy3aeh9/oJSb4YdwYpbTAiUAL36HFCRdmLqIXg9UAi8n\n 1T0JNAG1pkz+rZJse3VmBBxNlLc26AN5vpwUFUDAnfb+QY5wVVVvUMyoRRxWRGH4OVKu\n mD+mOuoiqi7VUOit9Dq40Sg3c0vrW2R8w/BQ8wBJ/Td7lWj5mdaNngnHx6W/7sUEE/T+\n 320NK583/S0kERhCHIWLQCY5SExuC6lcrl9GNYohK9tmf4msMhKNY0DoygBJAcpF2RnN\n xwXw==; darn=lists.denx.de","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=chromium.org; s=google; t=1778254973; x=1778859773; darn=lists.denx.de;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:from:to:cc:subject:date:message-id:reply-to;\n bh=iZduXr8LEdP88Qov0PBUBX7+MGgX9w1A+fFRq0n7Pjw=;\n b=GBlMF/ipHBD2nsnBmtiX7U0rqww5JS3/tUjveqS+wIkG6qTYKP/aS+KW4/3MQ0TMmN\n KX6WvpuQCL4vysjzokocyoROH6tK1/y2FhJ4fT37i/NP3oauj/g6UArpPS5ir3fpAbOa\n or6A0Bp3mTIxKNWCq5O5t+P+yGTEC0Pz5JS1A=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778254973; x=1778859773;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=iZduXr8LEdP88Qov0PBUBX7+MGgX9w1A+fFRq0n7Pjw=;\n b=GqoDocmaqrE/qBCXekj03PuQ8Dn7ZlN6D4Q6TLkTThsy1UCO4gW1OiGnr/EgnLwLoL\n WBCOnkpW539BQfjBCk0aehhUwXtxXe14ZAqVORhrekAXxod68WBuG79S4WAZtTuYm1mN\n 1s6d2Pc0zNW2lN27ZUU7raKr9YN3QNC4sqBjAKQcNILjWnvRRDXD/yu4Ap3pT1YgfTmx\n 95R9GqBTPCtrVfEdx5RpKup3uO7Jww7tiy5j0vjaPkzmnZoTOYbFml5sBEIrY4PpMMdh\n 5jiNdgkpE3aFT1ChBN9TI/qed67Q7qhr6oMuH4rStgrkNB38pteFmwK5DGaJ3L3SELYx\n 9Icw==","X-Gm-Message-State":"AOJu0Yxr5INHK0NL0b2s2lJWCMpCQCahIuuAfvlSHWY9n/wx+IaSFxRg\n VLvQ8mQxd/1TT5Q6Ye7aL99H2KVqKSMLi0O2LO87p+0Odn7aOlH2PAxiVqDVUjEVPjXzYXM8lfz\n ntZM/6JU6o/qr2PPcbDze83Ya2ytvtS7MtKdrPIfN","X-Gm-Gg":"Acq92OHSSYKc6PTdXDUtm/8BL8sZr+U92+HFe1NrEHcviAlVw9ynq1hi6Dy89gmvwrh\n tYL4hlydj5c6nbBVH9JqLemFVXrv9qcmYC+J8xNDjDmdTjeSjzZYrLJiLGzUZ6q7bUL1ButdkBz\n 1kIngrUNDFx0bGjcIncUyRZ61RzulFue1gKSDMUwhOI4UuR3FkBjPfJCuXWhCNU3FK+r1qcImO6\n tq1MWsIth9jbPAnXeEZDc2kB+uXra6fCdoaUgBndaJU9e77oU7MyhNdEqXjIWjsYEflaJTa5ic1\n EYqxdGxSCpP57ceB","X-Received":"by 2002:a17:907:1685:b0:bc6:221d:da7e with SMTP id\n a640c23a62f3a-bc6221de068mr716297066b.2.1778254973348; Fri, 08 May 2026\n 08:42:53 -0700 (PDT)","MIME-Version":"1.0","References":"<20260507092843.358908-1-jens.wiklander@linaro.org>","In-Reply-To":"<20260507092843.358908-1-jens.wiklander@linaro.org>","From":"Simon Glass <sjg@chromium.org>","Date":"Fri, 8 May 2026 09:42:40 -0600","X-Gm-Features":"AVHnY4Iuhfiab0ui-p1vXT71JhEG4QWjlboAvPiqijjxQ1Ql62IhUyUaCo9qPwU","Message-ID":"\n <CAFLszTgdhUO4nTd57atF__z_ox2VSROdxFKP93kr+f4FyW=5Jw@mail.gmail.com>","Subject":"Re: [RFC PATCH v2 00/64] drivers: usb: dwc3: sync code with Linux\n v6.16-rc7","To":"Jens Wiklander <jens.wiklander@linaro.org>","Cc":"u-boot@lists.denx.de, Marek Vasut <marex@denx.de>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Andre Przywara <andre.przywara@arm.com>,\n Andrew Goodbody <andrew.goodbody@linaro.org>, Anshul Dalal <anshuld@ti.com>,\n Bin Meng <bmeng.cn@gmail.com>, Casey Connolly <casey.connolly@linaro.org>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Eddie Cai <eddie.cai.linux@gmail.com>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Ion Agorria <ion@agorria.com>, Junhui Liu <junhui.liu@pigmoral.tech>,\n Kongyang Liu <seashell11234455@gmail.com>,\n Lukasz Majewski <lukma@denx.de>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Patrice Chotard <patrice.chotard@foss.st.com>,\n Quentin Schulz <quentin.schulz@cherry.de>, Rasmus Villemoes <ravi@prevas.dk>,\n Ryder Lee <ryder.lee@mediatek.com>,\n Stephan Gerhold <stephan.gerhold@linaro.org>,\n Svyatoslav Ryhel <clamor95@gmail.com>, Tom Rini <trini@konsulko.com>,\n Varadarajan Narayanan <quic_varada@quicinc.com>,\n Weijie Gao <weijie.gao@mediatek.com>,\n Zixun LI <admin@hifiphile.com>, Jerome Forissier <jerome.forissier@arm.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://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 <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}},{"id":3688572,"web_url":"http://patchwork.ozlabs.org/comment/3688572/","msgid":"<20260508160302.GV1614990@bill-the-cat>","list_archive_url":null,"date":"2026-05-08T16:03:02","subject":"Re: [RFC PATCH v2 00/64] drivers: usb: dwc3: sync code with Linux\n v6.16-rc7","submitter":{"id":65875,"url":"http://patchwork.ozlabs.org/api/people/65875/","name":"Tom Rini","email":"trini@konsulko.com"},"content":"On Fri, May 08, 2026 at 09:42:40AM -0600, Simon Glass wrote:\n> Hi Jens,\n> \n> On Thu, 7 May 2026 at 03:28, Jens Wiklander <jens.wiklander@linaro.org> wrote:\n> >\n> > Hi,\n> >\n> > This is a follow-up to Jerome's patchset [1], addressing previous feedback\n> > regarding the monolithic nature of the driver update.\n> >\n> > The DWC3 USB driver was forked from the Linux kernel v3.19-rc1 eleven years\n> > ago by commit 85d5e7075f33 (\"usb: dwc3: add dwc3 folder from linux kernel\n> > to u-boot\"). Since then, not many kernel changes have been ported back into\n> > U-Boot.\n> >\n> > This series synchronizes the DWC3 core with Linux v6.16-rc7. To provide\n> > a clear audit trail and maintain bisectability, I have structured the\n> > series as follows:\n> >\n> > 1. Restore to Baseline: The first commit reverts U-Boot-specific changes\n> >    to drivers/usb/dwc3 to return the directory to a clean v3.19-rc1 state.\n> > 2. Milestone Imports: A sequence of 50+ commits follows, each performing\n> >    a \"snapshot\" import of the drivers/usb/dwc3 directory for every major\n> >    kernel version (v3.19 through v6.16-rc7).\n> > 3. U-Boot Adaptation: The final commits (based on Jerome's original work)\n> >    re-introduce the necessary glue code, XHCI/UDC updates, and build fixes\n> >    required for U-Boot integration.\n> >\n> > The final diff is identical to [1]. I decided to stick with that for now to\n> > focus on the method of how we import or update the code.\n> >\n> > Note that this is compile-tested only. The CI pipeline on source.denx.de\n> > was used as an OK/NOK indicator [2].\n> >\n> > The previous patchset was tested on xilinx_zynqmp_kria_defconfig and since\n> > this diff is identical to the previous, it should still work on that\n> > platform. With the help of a custom build script [3] and with an additional\n> > patch [4], I could boot the Kria KV260 board and make it detect a USB SSD\n> > plugged into one of its USB 3.0 ports. It certainly doesn't mean all\n> > platforms using the DWC3 driver are still OK, but at least there is some\n> > hope. If this breaks your platform I'd like to know, and if you can send a\n> > fix it's even better.\n> >\n> > I tried cherry-picking all the 1000+ patches in v3.19-rc1..v6.16-rc7. There\n> > were a few conflicts, even when backing out the original U-Boot patches on\n> > top of the original v3.19-rc1 import. However, the resulting state still\n> > diverged significantly from [1].\n> >\n> > Instead, I've imported each new kernel in a separate commit. That way it's\n> > very clear which kernel patches are included. Since there aren't too many\n> > patches for each kernel I'm listing the relevant commits in the U-Boot\n> > commit message for easier reference. I did this with a script so it's easy\n> > to make changes, if the approach is OK but we need to tune it. With this\n> > approach it should be easy to tell if a Fixes patch for the kernel might\n> > also be needed here.\n> >\n> > Thanks,\n> > Jens\n> >\n> > [1] https://lore.kernel.org/all/20251121153812.2076440-1-jerome.forissier@linaro.org/\n> > [2] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/30004\n> > [3] https://source.denx.de/u-boot/u-boot-extras/-/raw/master/contrib/jforissier/zynqmp_kv260_build.sh\n> > [4] https://gitlab.com/Linaro/trustedsubstrate/meta-ts/-/raw/master/meta-trustedsubstrate/recipes-bsp/u-boot/u-boot/zynqmp-kria-starter/0001-kv260-fix-usb.patch\n> >\n> > RFC v1 -> RFC v2:\n> > - Split the v1 (\"usb: dwc3: re-import from kernel v6.16-rc7\") into (\"usb:\n> >   dwc3: restore to original v3.19-rc1 kernel import\"),  (\"usb: dwc3: import\n> >   from kernel v3.19)..(\"usb: dwc3: import from kernel v6.16-rc7\")\n> >\n> > Jens Wiklander (60):\n> >   usb: dwc3: restore to original v3.19-rc1 kernel import\n> >   usb: dwc3: import from kernel v3.19\n> >   usb: dwc3: import from kernel v4.0\n> >   usb: dwc3: import from kernel v4.1\n> >   usb: dwc3: import from kernel v4.2\n> >   usb: dwc3: import from kernel v4.3\n> >   usb: dwc3: import from kernel v4.4\n> >   usb: dwc3: import from kernel v4.5\n> >   usb: dwc3: import from kernel v4.6\n> >   usb: dwc3: import from kernel v4.7\n> >   usb: dwc3: import from kernel v4.8\n> >   usb: dwc3: import from kernel v4.9\n> >   usb: dwc3: import from kernel v4.10\n> >   usb: dwc3: import from kernel v4.11\n> >   usb: dwc3: import from kernel v4.12\n> >   usb: dwc3: import from kernel v4.13\n> >   usb: dwc3: import from kernel v4.14\n> >   usb: dwc3: import from kernel v4.15\n> >   usb: dwc3: import from kernel v4.16\n> >   usb: dwc3: import from kernel v4.17\n> >   usb: dwc3: import from kernel v4.18\n> >   usb: dwc3: import from kernel v4.19\n> >   usb: dwc3: import from kernel v4.20\n> >   usb: dwc3: import from kernel v5.0\n> >   usb: dwc3: import from kernel v5.1\n> >   usb: dwc3: import from kernel v5.2\n> >   usb: dwc3: import from kernel v5.3\n> >   usb: dwc3: import from kernel v5.4\n> >   usb: dwc3: import from kernel v5.5\n> >   usb: dwc3: import from kernel v5.6\n> >   usb: dwc3: import from kernel v5.7\n> >   usb: dwc3: import from kernel v5.8\n> >   usb: dwc3: import from kernel v5.9\n> >   usb: dwc3: import from kernel v5.10\n> >   usb: dwc3: import from kernel v5.11\n> >   usb: dwc3: import from kernel v5.12\n> >   usb: dwc3: import from kernel v5.13\n> >   usb: dwc3: import from kernel v5.14\n> >   usb: dwc3: import from kernel v5.15\n> >   usb: dwc3: import from kernel v5.16\n> >   usb: dwc3: import from kernel v5.17\n> >   usb: dwc3: import from kernel v5.18\n> >   usb: dwc3: import from kernel v5.19\n> >   usb: dwc3: import from kernel v6.0\n> >   usb: dwc3: import from kernel v6.1\n> >   usb: dwc3: import from kernel v6.2\n> >   usb: dwc3: import from kernel v6.3\n> >   usb: dwc3: import from kernel v6.4\n> >   usb: dwc3: import from kernel v6.5\n> >   usb: dwc3: import from kernel v6.6\n> >   usb: dwc3: import from kernel v6.7\n> >   usb: dwc3: import from kernel v6.8\n> >   usb: dwc3: import from kernel v6.9\n> >   usb: dwc3: import from kernel v6.10\n> >   usb: dwc3: import from kernel v6.11\n> >   usb: dwc3: import from kernel v6.12\n> >   usb: dwc3: import from kernel v6.13\n> >   usb: dwc3: import from kernel v6.14\n> >   usb: dwc3: import from kernel v6.15\n> >   usb: dwc3: import from kernel v6.16-rc7\n> >\n> > Jerome Forissier (4):\n> >   usb: host: re-import xhci-ext-caps.h from kernel v6.16-rc7\n> >   usb: gadget: re-import epautoconf.c from kernel v6.16-rc7\n> >   usb: udc: re-import udc-core.c from kernel v6.16-rc7\n> >   usb: fix build after resync of DWC3 with kernel v6.16-rc7\n> >\n> >  drivers/usb/cdns3/ep0.c                |    8 +-\n> >  drivers/usb/common/common.c            |   23 +\n> >  drivers/usb/dwc3/Makefile              |   57 +-\n> >  drivers/usb/dwc3/core.c                | 1780 ++++++----\n> >  drivers/usb/dwc3/core.h                | 1120 +++++--\n> >  drivers/usb/dwc3/debug.h               |  432 +++\n> >  drivers/usb/dwc3/dwc3-omap.c           |    2 -\n> >  drivers/usb/dwc3/ep0.c                 |  737 +++--\n> >  drivers/usb/dwc3/gadget.c              | 4152 ++++++++++++++++--------\n> >  drivers/usb/dwc3/gadget.h              |  124 +-\n> >  drivers/usb/dwc3/glue.h                |   36 +\n> >  drivers/usb/dwc3/io.h                  |   29 +-\n> >  drivers/usb/dwc3/linux-compat.h        |   16 -\n> >  drivers/usb/dwc3/samsung_usb_phy.c     |   77 -\n> >  drivers/usb/dwc3/ti_usb_phy.c          |    2 -\n> >  drivers/usb/gadget/at91_udc.c          |   46 -\n> >  drivers/usb/gadget/atmel_usba_udc.c    |  102 +-\n> >  drivers/usb/gadget/ci_udc.c            |  419 ---\n> >  drivers/usb/gadget/composite.c         |    2 +-\n> >  drivers/usb/gadget/dwc2_udc_otg.c      |  174 +-\n> >  drivers/usb/gadget/epautoconf.c        |  289 +-\n> >  drivers/usb/gadget/ether.c             |   21 +-\n> >  drivers/usb/gadget/f_acm.c             |   20 +-\n> >  drivers/usb/gadget/f_fastboot.c        |   10 +-\n> >  drivers/usb/gadget/f_mass_storage.c    |    5 +-\n> >  drivers/usb/gadget/f_rockusb.c         |   11 +-\n> >  drivers/usb/gadget/f_sdp.c             |   12 +-\n> >  drivers/usb/gadget/f_thor.c            |   19 +-\n> >  drivers/usb/gadget/udc/Makefile        |    1 +\n> >  drivers/usb/gadget/udc/udc-core.c      | 1096 ++++++-\n> >  drivers/usb/host/xhci-dwc3.c           |    4 +-\n> >  drivers/usb/host/xhci-ext-caps.h       |  158 +\n> >  drivers/usb/host/xhci-exynos5.c        |    2 +-\n> >  drivers/usb/mtu3/mtu3_gadget_ep0.c     |   16 +-\n> >  drivers/usb/musb-new/musb_gadget_ep0.c |   24 +-\n> >  drivers/usb/musb-new/musb_uboot.c      |   39 -\n> >  include/dm/device_compat.h             |   13 +\n> >  include/dm/read.h                      |   46 +\n> >  include/linux/compat.h                 |   15 +\n> >  include/linux/usb/ch9.h                |   25 +-\n> >  include/linux/usb/gadget.h             |  520 +--\n> >  include/linux/usb/otg.h                |   10 +\n> >  include/linux/usb/phy.h                |   56 +\n> >  43 files changed, 7659 insertions(+), 4091 deletions(-)\n> >  create mode 100644 drivers/usb/dwc3/debug.h\n> >  create mode 100644 drivers/usb/dwc3/glue.h\n> >  delete mode 100644 drivers/usb/dwc3/linux-compat.h\n> >  delete mode 100644 drivers/usb/dwc3/samsung_usb_phy.c\n> >  create mode 100644 drivers/usb/host/xhci-ext-caps.h\n> >\n> >\n> > base-commit: 0f865ab5d68484b4dc1724809de1be06edc85df1\n> > --\n> > 2.43.0\n> >\n> \n> This makes me wonder what USB tests we have. Some boards use USB for\n> Ethernet, but are there any storage tests, etc.?\n\nWe've had test/py/tests/test_usb.py for two years now, and so yes, we\nhave some hardware tests for USB functionality. I haven't tried getting\nthem enabled in the sage labe, but it's on the TODO list. Along with our\nDFU tests, again.","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256\n header.s=google header.b=LXzpfSRn;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=konsulko.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=konsulko.com header.i=@konsulko.com\n header.b=\"LXzpfSRn\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=konsulko.com","phobos.denx.de;\n spf=pass smtp.mailfrom=trini@konsulko.com"],"Received":["from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBv6k49M4z1yKd\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 02:03:26 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 9E88784D5B;\n\tFri,  8 May 2026 18:03:21 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 6E25E84D66; Fri,  8 May 2026 18:03:20 +0200 (CEST)","from mail-oi1-x243.google.com (mail-oi1-x243.google.com\n [IPv6:2607:f8b0:4864:20::243])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id B430784CAD\n for <u-boot@lists.denx.de>; Fri,  8 May 2026 18:03:17 +0200 (CEST)","by mail-oi1-x243.google.com with SMTP id\n 5614622812f47-45f053b7b90so1295526b6e.0\n for <u-boot@lists.denx.de>; Fri, 08 May 2026 09:03:17 -0700 (PDT)","from bill-the-cat (fixed-189-203-106-235.totalplay.net.\n [189.203.106.235]) by smtp.gmail.com with ESMTPSA id\n 5614622812f47-47c769ca2a6sm14702861b6e.18.2026.05.08.09.03.04\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 08 May 2026 09:03:06 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=konsulko.com; s=google; t=1778256196; x=1778860996; darn=lists.denx.de;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;\n bh=mwgfAGt64TXHU2LW2ya0pgji9+5KUB4Xehtu4KOO24I=;\n b=LXzpfSRnHLW/4vP2IS4xIfHATCbX24Tq6h6iD89ESn6YZrTpIFzjLYskcWhx4xNcgq\n ljBCYSddwlz/hk29Cuna8+XjUoWavpZy8jJB+sOivz7k7uchjH1evWzTHQOkpnEc1eLH\n dfjeGEHCTRdyUlwQfCgwczSercMaAun+q5Qbg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778256196; x=1778860996;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=mwgfAGt64TXHU2LW2ya0pgji9+5KUB4Xehtu4KOO24I=;\n b=HmOouKZhl2vRdcFlj14paKc/iqKuFVMwo6nsYYuYj5WKPIWWesIxxADutSRc/d2m3t\n gcX/TsieNMcubisnXT7RgzEOQTC+p1E1sWhJ85jppxx0ZHUrWw6ZehPboFtKvSAfSAEg\n 4khAvGQz3TOFX1B/KilBCq327QrthMgjoQHG6zczp9sVCj4tWpXuelEVamvXHMCIByeS\n ybbgqegx0nGDyqakmHl62qbdSIMTLH00fF5ZLO68QXjLcxbz6toS6bnv3GGV8N/BSDpP\n XBDzC4GKM5ytVCOTAGct0pQVWK6lM6X35V8cp6wxhPfqLddGDm3WhInb413dW96ObxU4\n 8blA==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9OkyVcp7/gdECDDn8AGGOb192jWzKBul4pGqz+ea58YLoWLH4UvRkTW9Z9GKyxBlX1OludSKc=@lists.denx.de","X-Gm-Message-State":"AOJu0YxTe7BbWhVSvxzmmHx0in5+PS0/Y2immvL0jZp8f+G1vqj6eyZC\n dPO3y0SF/RUc18dJ/Pt4ZS1hWWK7+2bOQ7caSvh2TfUBFTXIuhZVYFz04PtwP92Xs/E=","X-Gm-Gg":"AeBDievSaVX7YnWzNcboErgyIjf8btwbhtvEHhn0iYIpOQiU9ChSg7D4UVykS02J8p+\n HUfAtNP9U3JCGYRYb2rTUIgMUelVoqyV2iQeHCxldnbDLi0dCOo8JyFnon3EJV0hvQoycZqn5Au\n B7hnEMOtq3dCM5YbFsl+eSC5kxA/zyGtCKtVnhAM4pCRfo5bcccAaLQK1wRDN1E31yi6280IEPf\n DGwLgjSgUMcfZzhQAZeMlTHX13I97ppVp+tqVQOvvbUABBz/Mretv1F2pp2/SjP9rMtttWN+Sxc\n +QA9BC/tQ2QTwAQw3PNCCYHS2VEiGZCb2vBj1aHqrOrZ0ZaUUwd4BPewsh3V509M2xl57GtZggB\n LhIObMKOkPSsFGruHK1KpNO/ewffg32GpJ44ff802ldLm7FDpMWpejZ1Dao6gT5WMpEelah9GHc\n f4K+OhR1LInNOb+bZdirynfQfPkOPl8Uf3Q0RAO6IdUwESzLe9QS0e9EM31TCE9QgJeTwnKGTYQ\n 25+1dWsbsvY99BBkFBKLdoGkpHKkvKJozu1/SylUgmICL9ohk9jobt8Q6Uj6A==","X-Received":"by 2002:a05:6808:178d:b0:467:49c0:5f6d with SMTP id\n 5614622812f47-4804247a9d2mr7151398b6e.23.1778256187577;\n Fri, 08 May 2026 09:03:07 -0700 (PDT)","Date":"Fri, 8 May 2026 10:03:02 -0600","From":"Tom Rini <trini@konsulko.com>","To":"Simon Glass <sjg@chromium.org>","Cc":"Jens Wiklander <jens.wiklander@linaro.org>, u-boot@lists.denx.de,\n Marek Vasut <marex@denx.de>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Andre Przywara <andre.przywara@arm.com>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Anshul Dalal <anshuld@ti.com>, Bin Meng <bmeng.cn@gmail.com>,\n Casey Connolly <casey.connolly@linaro.org>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Eddie Cai <eddie.cai.linux@gmail.com>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Ion Agorria <ion@agorria.com>, Junhui Liu <junhui.liu@pigmoral.tech>,\n Kongyang Liu <seashell11234455@gmail.com>, Lukasz Majewski <lukma@denx.de>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Patrice Chotard <patrice.chotard@foss.st.com>,\n Quentin Schulz <quentin.schulz@cherry.de>,\n Rasmus Villemoes <ravi@prevas.dk>, Ryder Lee <ryder.lee@mediatek.com>,\n Stephan Gerhold <stephan.gerhold@linaro.org>,\n Svyatoslav Ryhel <clamor95@gmail.com>,\n Varadarajan Narayanan <quic_varada@quicinc.com>,\n Weijie Gao <weijie.gao@mediatek.com>, Zixun LI <admin@hifiphile.com>,\n Jerome Forissier <jerome.forissier@arm.com>","Subject":"Re: [RFC PATCH v2 00/64] drivers: usb: dwc3: sync code with Linux\n v6.16-rc7","Message-ID":"<20260508160302.GV1614990@bill-the-cat>","References":"<20260507092843.358908-1-jens.wiklander@linaro.org>\n <CAFLszTgdhUO4nTd57atF__z_ox2VSROdxFKP93kr+f4FyW=5Jw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha512;\n protocol=\"application/pgp-signature\"; boundary=\"60WiFT3YqM9KKBN7\"","Content-Disposition":"inline","In-Reply-To":"\n <CAFLszTgdhUO4nTd57atF__z_ox2VSROdxFKP93kr+f4FyW=5Jw@mail.gmail.com>","X-Clacks-Overhead":"GNU Terry Pratchett","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://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 <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]