[{"id":3680109,"web_url":"http://patchwork.ozlabs.org/comment/3680109/","msgid":"<CAFLszTj8SQuOzG6C9nhMdUHnXcDaA9eDomC9rQrdceaNBcHcjw@mail.gmail.com>","list_archive_url":null,"date":"2026-04-21T22:48:29","subject":"Re: [PATCH v2] pci: correct PCI device enumeration to include all\n functions on device 0","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Maximilian,\n\nOn 2026-04-20T12:03:35, Maximilian Brune <maximilian.brune@9elements.com> wrote:\n> pci: correct PCI device enumeration to include all functions on device 0\n>\n> Currently the implementation does not just skip all devices beside\n> device 0, it also skips all functions (besides 0) on device 0. This\n> broke basically all AMD platforms, since they have a lot of internal SOC\n> devices behind these functions.\n>\n> This was detected, because the XHCI controller and therefore the USB\n> devices were not found by u-boot on AMD/crater platform.\n>\n> PCI_MASK_BUS() returns both device and function bits, so it skipps any\n> bdf where either device > 0 or function > 0. Using PCI_DEV() extracts\n> only the device number, matching the intent in only_one_child().\n> It therefore now checks all functions on device 0 (Linux does the same).\n>\n> I build tested u-boot as coreboot payload and run it on a recent x86 AMD\n> platform. Devices like the XHCI controller are now found again.\n>\n> Fixes: fbde868ba4aa (\"pci: skip unnecessary PCIe scanning\")\n> Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>\n> [...]\n>\n> drivers/pci/pci-uclass.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\n> diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c\n> @@ -927,7 +927,7 @@ int pci_bind_bus_devices(struct udevice *bus)\n\nNit: \"skipps\" should be \"skips\" in the commit message.\n\nReviewed-by: Simon Glass <sjg@chromium.org>","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=EM0XJ8w0;\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=\"EM0XJ8w0\";\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 4g0cwL6mCcz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 08:48:50 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id CA37B841F2;\n\tWed, 22 Apr 2026 00:48:48 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 74DFB83936; Wed, 22 Apr 2026 00:48:47 +0200 (CEST)","from mail-ej1-x631.google.com (mail-ej1-x631.google.com\n [IPv6:2a00:1450:4864:20::631])\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 B1D5284258\n for <u-boot@lists.denx.de>; Wed, 22 Apr 2026 00:48:44 +0200 (CEST)","by mail-ej1-x631.google.com with SMTP id\n a640c23a62f3a-ba3115fe0d5so967532466b.1\n for <u-boot@lists.denx.de>; Tue, 21 Apr 2026 15:48:44 -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,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=1776811724; cv=none;\n d=google.com; s=arc-20240605;\n b=bpTRVCXnF2VYYPmdFKj5vJqmG2NUnMGEQ0fq4X10bLZwgJ34tBfdzBiTsM3/B8lkuH\n /H3xki0V+qQDufEFxEqaprsRiSLFnDFNoP1+2YN+VTSgdYvulHDasl0AvsUum8tpkoBS\n cME1wYr17yKdDuJRXF1kUE3C3syoNwY8BXKia74vsCNmiJUwD/QjVYmp96EaQX43dzRq\n iqdvEQcMfaY35MdfLn+O4z1MHiADS3g2qHeSQqD0UjP0MEy/csPlPMbsiJmtC5XvW/uQ\n oDYubF8E48U6+11o6DYOV4rm6b/r97Lg2V/h8MVeh68KP4DyWfHT4Z2xNZRraWzR4rGe\n zNfw==","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=ffII1dlKQ5AqTkn4dizjSfBs67fY4AsXe2Xbgyj5rH0=;\n fh=FjXpY7iTRt7Egx0uJJyJRM87tOzU0fjxaesNiszpBy8=;\n b=Mzi42Nt0kbL0XtYY2qaJf/kjOMRPY26nzFPep2NMzRi4RnaZpOS7NNsC2H9z/ZdZgT\n bjlGeA4QEN4htkmMUi6fGgfZ8gC4yn2sjOuzD7ToUopj35Fh4dw+zZFrRxNYLMW6VsWj\n 7yFelcnpzCMJ5zJTrF0oJXQ8U/GzXDXya0vL+AaSvvdhdpuk9mLyeo9PKXmQDpbIStgJ\n 78rvyMCQ2iMwxFUKYJ5yg6HAIpCuoCASaBypg1Ux4BsWXdWYWwStpbVpmv6l+csU6Lq7\n 5rrEoA7YeY3WlzSsCe3C9lVnfjB3KxhvhUrZ+11o4uAUSeFq7nhcBR2ZeJEpqobubfSc\n 1UFA==; 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=1776811724; x=1777416524; 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=ffII1dlKQ5AqTkn4dizjSfBs67fY4AsXe2Xbgyj5rH0=;\n b=EM0XJ8w0pFUT8HaG8dlE0k7LVtyhb9fgSvMFUdUkAmo5elbfd2tHvhyc01YwmH7UPC\n IaG4GXTKHJGjn/WVq0xuYqE3WcldN7L5MfBbd85W0jWGOmQzblhTuvghEvZdxeaP2Za4\n VXQ3138W4LqJzVfvAfex4PhAeECN1POXFDVFU=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776811724; x=1777416524;\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=ffII1dlKQ5AqTkn4dizjSfBs67fY4AsXe2Xbgyj5rH0=;\n b=dtNYvWDjtoDgxmG/lUcGo+Bg1yEIMRB5zXKKXIdyESEqUNBfJInWdRuFUQRGoRPrul\n yvGXawgIF+lhsp7wgM/FyJX5AiTSakOHy2rQcTd1YorGbxX+DC0fJ6b6Z8QfQoDvOwup\n xvd9Im25+eshGF7wkcxMJjh9td6Cbbo5uqclDaAIUPsVOkE2rm1Q5R2MG3X6D0qttS3g\n BdYQJlOZ33Ts/EVm7YUgcSf76SrRL/trxNR4Cm3K9Nm23QgIoiwrrg2wO+IQSXSUijDJ\n 6eMKAXChwGgGepn+rixE4aqoxkY32bgTzDvBiyyDAGyUIkDQIfyqA21fiTTosJFXYTcZ\n pfig==","X-Gm-Message-State":"AOJu0YwhhgoBPb7uti4zasv0H/ui2GlIIFm0W9hgdb/gb5c6GPAMOE3z\n leEb2IFbBVPZ8QUQzKEpZhAQCgkMtzGRK2eHM7JYYv8+cYZ+Lm5VBN0wRAqU3mMSGoZN/SUB6NI\n RjbZXE0VwyLJb+oqVdiWTb8+QK3f7QRUYS3jO5yuQ","X-Gm-Gg":"AeBDiestvQHVauQQ9J2+HvGRsRZNQ5sRzwrk/E3APq/aj02FL/KOB/aQkTcMObLhVVw\n 8XEM53i9ufCstYIDcovSIzoEAAs/SEt+X7MaePl1LEIBvM2QcpvU2XNsUvRosUE9yF5SPJ/cSJ4\n sbvXyt7U15KU0mXVWxepueEfRMZJSweYY+dKsUAlBfJfiwhCwHbuBWHuPUogxvmFuNJS6H+b7u/\n cCH1obbPJcm9c0mLsXIGeX4WJAKNJePqXeKosCOZyAdhXw1/Mermrj2ipXEeAVubKMc3vyxlv2m\n RzIP+CV/gMkwO9+evF6y","X-Received":"by 2002:a17:907:980b:b0:b9c:b178:36c3 with SMTP id\n a640c23a62f3a-ba420d2424dmr872986366b.2.1776811724116; Tue, 21 Apr 2026\n 15:48:44 -0700 (PDT)","MIME-Version":"1.0","References":"<20260416161305.24118-1-maximilian.brune@9elements.com>\n <20260420120335.10120-1-maximilian.brune@9elements.com>","In-Reply-To":"<20260420120335.10120-1-maximilian.brune@9elements.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Wed, 22 Apr 2026 10:48:29 +1200","X-Gm-Features":"AQROBzBFMBA_uMWyMHbXpnRlqCiWlh9xTkPXHOA9qrD_de8JLl3ILIlr2xifoPg","Message-ID":"\n <CAFLszTj8SQuOzG6C9nhMdUHnXcDaA9eDomC9rQrdceaNBcHcjw@mail.gmail.com>","Subject":"Re: [PATCH v2] pci: correct PCI device enumeration to include all\n functions on device 0","To":"maximilian.brune@9elements.com","Cc":"u-boot@lists.denx.de, trini@konsulko.com, andrew.goodbody@linaro.org,\n george.mccollister@konsulko.com, Simon Glass <sjg@chromium.org>","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"}}]