Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1776292pxb; Mon, 11 Oct 2021 12:53:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyABUjE/VFmmuwTzd5Z5HKtNOLRvRF8BLLOKcZopX1TSmxHSRpFg6Z65RfqjwyuI1eSD9p X-Received: by 2002:a17:906:33d7:: with SMTP id w23mr13707273eja.154.1633982037773; Mon, 11 Oct 2021 12:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633982037; cv=none; d=google.com; s=arc-20160816; b=ySQBRi5utmrSCMBuysQiszWDU6UG0gTQYb1uMW80elsLVQlj2jX+v77QnOlRz9Mp5W 2YS14URjuP4CC3m638KTophhRGNFQe9W8u2Eb8MDHrKfZ4oBy9rsh8VmZ7ONkN5kFV5b /VtBNfPBb22F1udLrYlAncRtRSdSuXbdkFs6iIWCRGy+8XUZd5glV6sFqoSjLzyCmmpH 4HA3/u6QnngbN8zJs2x9EP1YHpTxDJvyWetU5WutlyRiH9ByThcC+DMI1wqnVdvzzgcF uw9Ppo5NGrsviRv66rfDOMDJo3fHAKp+EoONG5w74KzobW/qoa3uT7VsAoEpnD9dBYua T3sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1rlg2SROr4jpGMH3er+h+3nom9XnrD8RN8J2vOdLeBg=; b=IJn4dqSgATlzoMY5KRZAEHSD7ZOrD7Q9OoF/wO7B/Zb+GzSeIVcfrN0dlb+LSsGcyG 0R820BJ2SbM9fnU4i/Y6Bc+/Su4hzvL23HyjQy5tE805KUs2yC71zEiUASZUTkUzQuvJ g6WSMG3p3YrWjRMiZyz6Zw75ouQh+v5hX41OvtWIMZRVveU3eNiQkwCLhlEzH1efj/Mg PIi/pfwCOSuOBNS2mzC42RwS7FHWZMXL4PzS3ou0uTa3sEHs7GRb5Td0E7Xxi4h6VJId airjkAVNVBnafEPED5bLSsJEti+bJr63FrMFIk9/RDOt3PuhfiLRO2ZQeBdo1+QlCM+4 bh2A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si13521913ejk.215.2021.10.11.12.53.33; Mon, 11 Oct 2021 12:53:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234731AbhJKTtr (ORCPT + 99 others); Mon, 11 Oct 2021 15:49:47 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:56163 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234727AbhJKTtq (ORCPT ); Mon, 11 Oct 2021 15:49:46 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 7E740100FBFF2; Mon, 11 Oct 2021 21:47:40 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 5CED64A8C4; Mon, 11 Oct 2021 21:47:40 +0200 (CEST) Date: Mon, 11 Oct 2021 21:47:40 +0200 From: Lukas Wunner To: Naveen Naidu Cc: bhelgaas@google.com, linux-kernel-mentees@lists.linuxfoundation.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kuppuswamy Sathyanarayanan , Amey Narkhede Subject: Re: [PATCH 16/22] PCI: pciehp: Use RESPONSE_IS_PCI_ERROR() to check read from hardware Message-ID: <20211011194740.GA14357@wunner.de> References: <36c7c3005c4d86a6884b270807d84433a86c0953.1633972263.git.naveennaidu479@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <36c7c3005c4d86a6884b270807d84433a86c0953.1633972263.git.naveennaidu479@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2021 at 11:37:33PM +0530, 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. > > Use RESPONSE_IS_PCI_ERROR() to check the response we get when we read > data from hardware. Actually what happens is that PCI read transactions *time out*, so the host controller fabricates a response. By contrast, a PCI *error* usually denotes an Uncorrectable or Correctable Error as specified in section 6.2.2 of the PCIe Base Spec. Thus something like RESPONSE_IS_PCI_TIMEOUT() or IS_PCI_TIMEOUT() would probably be more appropriate. I'll leave the exact bikeshed color for others to decide. :-) > Signed-off-by: Naveen Naidu > --- > drivers/pci/hotplug/pciehp_hpc.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Acked-by: Lukas Wunner