From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9BF4C433EF for ; Sun, 26 Sep 2021 18:40:46 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0300B6108E for ; Sun, 26 Sep 2021 18:40:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0300B6108E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1F4AE835C8; Sun, 26 Sep 2021 20:40:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="H33djENK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 48F42835FF; Sun, 26 Sep 2021 20:40:26 +0200 (CEST) Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E6904835D8 for ; Sun, 26 Sep 2021 20:40:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ua1-x929.google.com with SMTP id 10so10584275uae.10 for ; Sun, 26 Sep 2021 11:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:in-reply-to:references:date:message-id :subject:to:cc:content-transfer-encoding; bh=ldJyD2GgU+U5wK0L+Q4vByZi0vbKIACI2Snc0sIC+oA=; b=H33djENKOuueA95rtj7sqZ9WMRAz2DMJsQ3gU6uKbdGQ4rVhztSrgjwMktkQinCdZH 8SbaP6Ih1QJKUxyGtYa+DyLO3nHIlmx/0rFe4TuSP0s/RRd6qU7Nr0e44NoIVhv2rXQi VHRllACev5AyraraAflusCdrANrzb9hmeWj+E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:sender:from:in-reply-to:references :date:message-id:subject:to:cc:content-transfer-encoding; bh=ldJyD2GgU+U5wK0L+Q4vByZi0vbKIACI2Snc0sIC+oA=; b=WBN+8WYPZNYTNW2c7qDguTikp+6dkrCIrg6CoLl1jB5oyky8Q9/DCCLzKT7NcKf0cd xtTrGhBdjO5pPC1rPixy4vRI/fTGdSaKolMGnhpnOcMe+SJ1oXxjAOiQxu0KUw34f/9J fWCaR2hYM7tTGpqZFXfVAPxtt3p9AQMOpS9WAENmaQoBnG7PkuAdbStb+0LrB0SVnVeU uwVIhwhusfbGrS2MKWrFk7p8QrPJp/OeEQJabWAYoIedjG0yW+kDQV9WoLbMMTjPxRLt EHrqKvMtX9rzmMRWmdiGlynyTK6eSHoDJjJ0w/kZYXkGQSWItgeB6NgZqlP6PKmarryp jlQw== X-Gm-Message-State: AOAM5312Z7tQetuueQHC9Loc7t/ZRuNHZEQO4wwbBcKcjc4I0dtvKYNe SWAjNqnIdY5tsprIdroGiVQhxFOM1Rf2hS/CYFnINQ== X-Google-Smtp-Source: ABdhPJzd+mHmimAg4eDEVBHhTRjSWqsXKPRCqcPXjgEf70D8rXqqh/Zsak54YQ7Bci5fJLtyVpmF4b405rL41u7OrEY= X-Received: by 2002:ab0:14a7:: with SMTP id d36mr16374754uae.96.1632681618532; Sun, 26 Sep 2021 11:40:18 -0700 (PDT) Received: from 480794996271 named unknown by gmailapi.google.com with HTTPREST; Sun, 26 Sep 2021 18:40:17 +0000 MIME-Version: 1.0 From: Simon Glass In-Reply-To: <1f88ba42-49a9-1c54-db55-8b02963b6c99@denx.de> References: <1f88ba42-49a9-1c54-db55-8b02963b6c99@denx.de> <20210907160708.31547-1-marek.behun@nic.cz> Date: Sun, 26 Sep 2021 18:40:17 +0000 X-Google-Sender-Auth: R_HNoUwRQyq4uE3Glyu84bWg_2w Message-ID: Subject: Re: [PATCH u-boot] dm: pci: Fix handling of errors when scanning device To: Stefan Roese Cc: u-boot@lists.denx.de, =?UTF-8?Q?Pali_Roh=C3=A1r?= , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Simon Glass Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 07.09.21 18:07, Marek Beh=C3=BAn wrote: > From: Pali Roh=C3=A1r > > Some PCIe controller's read_config() method support indicating error > directly via return value, but some cannot distinguish all-ones (or > all-zeros) read response from an error. > > The current code in pci_bind_bus_devices() interprets all-ones / > all-zeros in PCI_VENDOR_ID register as "nothing connected", and > continues the cycle, but an error returned via return value breaks the > cycle. > > This is wrong for the PCIe controllers which return this error via > return value. > > Handle all errors when reading PCI_VENDOR_ID the same way. > > This fixes enumeration of PCI devices for example when there is a PCI > bridge connected behind another PCI bridge and not all ports are > connected to a device, and the controller (for example Aardvark) > translates the UR error (Unsupported Request) as -EOPNOTSUPP. > > Signed-off-by: Pali Roh=C3=A1r > Signed-off-by: Marek Beh=C3=BAn Reviewed-by: Stefan Roese Thanks, Stefan > --- > drivers/pci/pci-uclass.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > Applied to u-boot-dm/next, thanks!