Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2018467pxb; Sun, 17 Oct 2021 03:49:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyb8ej80Dje5nW9ZwFCkthx62WuAGfu+2kECsCpq1HVexeldf+CywyDXOePA67wS69piqs X-Received: by 2002:a05:6402:3554:: with SMTP id f20mr35036879edd.210.1634467795732; Sun, 17 Oct 2021 03:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634467795; cv=none; d=google.com; s=arc-20160816; b=YFdKMGx6QiTY91tMwAt44RQcx4sMbwuggg5duM1uaL1Jk9Woyk31opC+taHFcqIyu7 hfdpthkfJVevXl0523r7N+VSdSvCVXb5EOQFfLz6jSeAaF7rWfY/XNTlTd3SG0LrFs95 qUcOSAn4ath+85fcvGFsAuVTtBm3wB643qHUMmSqZG3c7V/2uNcWzhY2FGgZPVqbhmBG vrEDoGBAi4F3P+b1R7o/NeQ0uILA71GMKPpA91zDRy6dHrV5p+NuHK3+ga7eEruIvZQt rlnld5yQZz2c5PKa33EBfZaWF5cgMeq3qe7dxiPGG86bJ2+y649MbLmWFHWrffvl2K7A qBPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=xIMF2oCfYc/05OSgqYa8dIPs/drbGX/o7+WhRJXcH+M=; b=RRI2aycGRNjfYANk1hIlqHt16X2WojmQxvG+P+0minpTmPGwr9rJlviGaLbI4+0gFT UWHIV9qdbbAN3Em/x8FDDQ53rX3WFfwQb9QeprhLiYF2CWL5wgg761ftVfZBXtbc0gKK LowwAIxLDa2gkJTskmY3OhUV61SmRDZkxN6gGM/t0Q0/LxKrhxOL3blORgEcGSGmsKu7 13vv02Z2aseVAIn1tcWViMJr80rRCVigByg1WXXU4l2y+vZOdDtewn1/mhhBTgVSe48t z21tY42YpoXKh/z0/T9k3E725XE2GQ1H8OC7lJR/b1fcgZIRZu7DHqs8HL5HDuH5/HBb D/Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=RXoJXND8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj1si13857202edb.462.2021.10.17.03.49.18; Sun, 17 Oct 2021 03:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=RXoJXND8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241605AbhJOQvT (ORCPT + 99 others); Fri, 15 Oct 2021 12:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241603AbhJOQvS (ORCPT ); Fri, 15 Oct 2021 12:51:18 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 261B9C061762 for ; Fri, 15 Oct 2021 09:49:12 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id r2so9086124pgl.10 for ; Fri, 15 Oct 2021 09:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=xIMF2oCfYc/05OSgqYa8dIPs/drbGX/o7+WhRJXcH+M=; b=RXoJXND8tnIzvBvVqKgeGclA9uqQODnXW8IEUvMU17ChDXiQgPWjM3AKfbGT6VLUk5 FDc8GH7+ZeFGU+7Hg0f6OrYX7ieYOrTAtTorKCVx6oVbSy58tkhMesWlDWqTQIeVdhL8 mw5gzwcZ631QTveMK5VumTuZpQrCRrWUrJINc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=xIMF2oCfYc/05OSgqYa8dIPs/drbGX/o7+WhRJXcH+M=; b=FbVn97cMe9wzGVKzKYeUM6XOD7ZlKLN7M99B9Jp56IAxet8P/WVoM0UlMVUQcCk5hl tLhNJJI4I9bXJnNIUN5w5aJPbj+u5Q6uMxMoPuZvkW9kBr3UYEPUBQHXOZE/EDtmLobl u1PSaaaBWB2gZDJIOm6kSdPc0cX5csKNnCoxGobUmaqrkOyb1wXfifd1CCZuxAw6Hz5L pZ8tvqVP5afHulsTiopIZG1Ta6uumsB4m/9jYTJX+2nW8fgey6EDOtEitV4S0xsfmXY0 6aSpgZbl//WafeB1ZSNyIkU/ieBgetpbt9Lygz+KgIzw1STGj0FH4BdndJsYf9Wql+Cz Iq4w== X-Gm-Message-State: AOAM533iNiFXOS9cjX6cDK3MUFtMxJkvaJf3zjtHuxhJ74yIxdkuSFQY 0qzflxssNVX9MR/L6mrRjdWpiw== X-Received: by 2002:a63:9a12:: with SMTP id o18mr9927031pge.419.1634316551317; Fri, 15 Oct 2021 09:49:11 -0700 (PDT) Received: from [10.136.8.237] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id a67sm5372973pfa.128.2021.10.15.09.49.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Oct 2021 09:49:10 -0700 (PDT) Subject: Re: [PATCH v2 06/24] PCI: iproc: Remove redundant error fabrication when device read fails To: Naveen Naidu , bhelgaas@google.com Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Rob Herring , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Ray Jui , Scott Branden , "maintainer:BROADCOM IPROC ARM ARCHITECTURE" , "moderated list:BROADCOM IPROC ARM ARCHITECTURE" References: <71757601a719e2ff6ca27615183e322a7709ff65.1634306198.git.naveennaidu479@gmail.com> From: Ray Jui Message-ID: Date: Fri, 15 Oct 2021 09:49:01 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <71757601a719e2ff6ca27615183e322a7709ff65.1634306198.git.naveennaidu479@gmail.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000865acf05ce66f9ed" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000865acf05ce66f9ed Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/15/2021 7:38 AM, Naveen Naidu wrote: > An MMIO read from a PCI device that doesn't exist or doesn't respond > causes a PCI error. There's no real data to return to satisfy the > CPU read, so most hardware fabricates ~0 data. > > The host controller drivers sets the error response values (~0) and > returns an error when faulty hardware read occurs. But the error > response value (~0) is already being set in PCI_OP_READ and > PCI_USER_READ_CONFIG whenever a read by host controller driver fails. > > Thus, it's no longer necessary for the host controller drivers to > fabricate any error response. > > This helps unify PCI error response checking and make error check > consistent and easier to find. > > Signed-off-by: Naveen Naidu > --- > drivers/pci/controller/pcie-iproc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c > index 30ac5fbefbbf..e3d86416a4fb 100644 > --- a/drivers/pci/controller/pcie-iproc.c > +++ b/drivers/pci/controller/pcie-iproc.c > @@ -659,10 +659,8 @@ static int iproc_pci_raw_config_read32(struct iproc_pcie *pcie, > void __iomem *addr; > > addr = iproc_pcie_map_cfg_bus(pcie, 0, devfn, where & ~0x3); > - if (!addr) { > - *val = ~0; > + if (!addr) > return PCIBIOS_DEVICE_NOT_FOUND; > - } > > *val = readl(addr); > > I think it would be helpful if you include us in the review of the PCI core code change (pci.h and access.c) so we get the right context to review this change at the individual driver level. The driver change looks fine to me, as long as the change in the core is reviewed and approved. Thanks, Ray --000000000000865acf05ce66f9ed Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQXgYJKoZIhvcNAQcCoIIQTzCCEEsCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg21MIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPB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