Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2923244pxb; Mon, 18 Oct 2021 04:54:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWLneg4FdNEemuoOL03yZr59hS/A3IGjFC6f+YKYBzAxtEKSxET2YgC04d8N0JKAfXB6KP X-Received: by 2002:a50:9d8e:: with SMTP id w14mr43192452ede.74.1634558060987; Mon, 18 Oct 2021 04:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634558060; cv=none; d=google.com; s=arc-20160816; b=m7caHP9FdElk3b6mBJaxBkhTfCGgO90xXrndFwAG1zSjTxw9PAY6OQrxnTuYw7I+i+ 6q4hc799g1l2XOewx6PCn3scO1Zbu4rFdgFhJYfNBypK1PeeVFFNCrDUHSIiwt+uX900 uVVa8PXYnijjlNCIFcLJDY+v9eeRPbVQxg8V/4YespaDl0XcHLOaBQcn6riyw4SkSh1r PoJMCgwgwccq0g7MNNWzOz3Vq34hBJVnIGwrmxBq4MTd7fARVPNaYJqua6D91v+IQnyR OTx+cBRohwaupLTId3YcvbzzDR6nwNki/gdSJqXTrnBHHPsEcOy6jfg3BSktGoMiMZwH Yp8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uRAY4X8owdY8nPICo6sM8mmRScQ57odxEdrE5BZO3fg=; b=sByb/ZpY8rPKcIwCN7TsJMXOLpwDLbtWni+7Fg7W/gjhWvFKVj2P0yjLkqAcZ9Bzk4 cn1LiQvJZX0E3KJrVcnYSQXujY+06bwApccq3nXSUyYhyHeE6WB8AJRBeleW6U04o67h QAy2i9rvkshyxnzg4UwpcQpYtUV2ez6KhugGwmm3134wKVLnXrJmVzCdTZrk6ETp+B1f LeRrFBEI9MaUjkdOp1TXuYoD79jftNzowGqMg9oUCbl5cBKuQQDKc2Us0lEN5dWdlskx HXc8x3D5Dwa30yl8wKyHwoAUfMywiQAS9t2Eb4fJ8Kbcpcx9xX+ATcve5nbgM333HFxv 6BIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="lLW/sx9s"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ry8si19342687ejc.667.2021.10.18.04.53.57; Mon, 18 Oct 2021 04:54:20 -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=@gmail.com header.s=20210112 header.b="lLW/sx9s"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbhJRLyY (ORCPT + 99 others); Mon, 18 Oct 2021 07:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbhJRLyX (ORCPT ); Mon, 18 Oct 2021 07:54:23 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AFF8C06161C; Mon, 18 Oct 2021 04:52:12 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id k26so14529856pfi.5; Mon, 18 Oct 2021 04:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uRAY4X8owdY8nPICo6sM8mmRScQ57odxEdrE5BZO3fg=; b=lLW/sx9seF41ns6WqHqVgRo4ZIDaXamsZ+4e3CxEEI4Zzu6ej9A6NL0VFlxASZR37P pFABjVc76JTsA1lvjm6YgbvdMzD4cP5s5sucJcyqlc3qSS1IM3v20f6DfShDmdaqOcON BdzOgG0nUGA+XmA9qY5xk8mxkybUk8w21dprzQ9acSm72Yq8LeUO2DPhgo0YhkRYRh9t egt8GFz0s0i47ZeUQOpD+aPgn0SL5JIOo6Mi9yMkahq1cFS2gFPt+VF1eOXkJKJcJPfV sSx5WymcT0ty40x83D3Z8T2OwiTzWmuSO6RfUO78MpqoCOKp1YBvzb0v/fMHFu4BHXz+ OO/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uRAY4X8owdY8nPICo6sM8mmRScQ57odxEdrE5BZO3fg=; b=AK5cJZ9tAeoG7sXt0xCQyE+e9lnS9tlc6+EbLH1EZFnCfN+xd5fc0i+jl6XYLbetHa dJUszlIid6Gu3kB96pcPK13aWQv7117Zw6suNczj9I+Bm1/jGY/ICoFi5XWqC/5+JYZG bO/2K5qq+DSZZSMJzL6rfGkCJg+zN45hfOdN3rV4Mns2WjfiPV7GDAPYdy7UOrLC1+v0 0QMRqGzMudqk036VknCQvI9FRr9Yg++1pBaqsfKOuQk5Ll9JWHUk1L6Hm9N6dkEyl/C8 IdeHl8n/h69A1MrerhWTByGwHb/Ko57zFT/q+/FkzPXK+V2EFR57fnajpXZzsuyIaK2T ZJug== X-Gm-Message-State: AOAM530tYKdRD5+Y4+YAsP3MkLA0RtE95SQLZlawHPzWgNPUzqH6BW9p iSszPkhA3BYNzgUm+UPdsx0= X-Received: by 2002:a63:ed13:: with SMTP id d19mr23042349pgi.430.1634557932111; Mon, 18 Oct 2021 04:52:12 -0700 (PDT) Received: from theprophet ([2406:7400:63:eae8:5466:4cd4:63af:c661]) by smtp.gmail.com with ESMTPSA id m22sm13297924pfo.176.2021.10.18.04.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 04:52:11 -0700 (PDT) Date: Mon, 18 Oct 2021 17:21:48 +0530 From: Naveen Naidu To: Geert Uytterhoeven Cc: Bjorn Helgaas , linux-kernel-mentees@lists.linuxfoundation.org, linux-pci , Linux Kernel Mailing List , Marek Vasut , Yoshihiro Shimoda , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , "open list:PCI DRIVER FOR RENESAS R-CAR" Subject: Re: [PATCH v2 14/24] PCI: rcar: Remove redundant error fabrication when device read fails Message-ID: <20211018115148.iwhiknpd6o4okudq@theprophet> References: <2544a93bf8725eecbea510e7ddbff6b5a5593c84.1634306198.git.naveennaidu479@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/10, Geert Uytterhoeven wrote: > Hi Naveen, > > On Sat, Oct 16, 2021 at 5:33 PM 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 > > Thanks for your patch! > > > --- a/drivers/pci/controller/pcie-rcar-host.c > > +++ b/drivers/pci/controller/pcie-rcar-host.c > > @@ -161,10 +161,8 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn, > > > > ret = rcar_pcie_config_access(host, RCAR_PCI_ACCESS_READ, > > bus, devfn, where, val); > > - if (ret != PCIBIOS_SUCCESSFUL) { > > - *val = 0xffffffff; > > I don't see the behavior you describe in PCI_OP_READ(), so dropping > this will lead to returning an uninitialized value? > Hello Geert, Thank you for looking into the patch. The described behaviour for PCI_OP_READ is part of the 01/24 [1] patch of the series. [1]: https://lore.kernel.org/linux-pci/b913b4966938b7cad8c049dc34093e6c4b2fae68.1634306198.git.naveennaidu479@gmail.com/T/#u It looks like, I did not add proper receipients for that patch and hence is leading to confusion. I really apologize for that. I do not know what the right approach here should be, should I resend the entire patch series, adding proper receipients OR should I reply to each of the patches for the drivers and add the link to the patch. I did not want to spam people with a lot of mails so I was confused as to what the right option is. Thanks, Naveen > > + if (ret != PCIBIOS_SUCCESSFUL) > > return ret; > > - } > > > > if (size == 1) > > *val = (*val >> (BITS_PER_BYTE * (where & 3))) & 0xff; > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds