Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2567975pxb; Tue, 12 Oct 2021 09:09:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYDDsBqPlpptA2jTQPMJj/mCKzV0l+dZQZjVpVRq2yIBC9jA8JScH2AB9QV36QTXL8PTki X-Received: by 2002:a17:906:5950:: with SMTP id g16mr34494108ejr.149.1634054954791; Tue, 12 Oct 2021 09:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634054954; cv=none; d=google.com; s=arc-20160816; b=G7Auk0EaSYzK2iKV0vXlpo39SE3AYm2FdPh9+nYzc9IpGYNzDnuVFcGZdz2i02RCaF 25TA6XHbLH7MrTZfqzoLS3I7quzEPyFqrJcTHQGeOimC7EgZ8F+/ob5KhjU6FLmgNjLF At/4lC6hS3MHQKDxK3dUPsiq/SxN/4Tj2FGFy6zIexTyPsc1/zegslvVsQMrkbqSelqu O0VqEZx8DP9pM/noVU8srmE1384pU0wobEBgSKCjSo1qZLzb1Bk0teHAp5Uz2O22UVSH 5xJBx4KryouK3kDDI9UQsfiAGkJknPjWU09g/XjdP2QvQmYuySCNBBRQTFg6YcRiQ+4a 8uVQ== 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=mMOxU6+YA/sNdOBxrd9xR6DIR92SPqX/cAtPGdDmVKU=; b=f380mzTI+UrtVRpgUY/OhqCcuSE9l0Zpk6GydpCzsVmaWn/BZShTTk/ZZA7x/RTGeF h8sAa30LC4KV7auMGYxsTlaGslNFEcdaI/aAfxKKVB3fVwqi4kBFjhIwQtX4jWJSGtHc djIOcNWj8AE+XyosB/37Hqas9jQG7VrSlv7cg7RBAAATq89TaUx0lJUBqzlQi5GqWpp8 XcGJB2Q/0y7CK50wDq6N+g6RmahH8P7GCmpg2PQ3y3+GRcktd+aft/9ecDoYNk9CRxLp tdXPq71J1CstCc2P9rtIHUYwJQkQmG3HWYT+TiR1tqNtXaDGef4OE2o7tus+8uww993N flgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bDwa7qIk; 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 10si16469852ejx.649.2021.10.12.09.08.40; Tue, 12 Oct 2021 09:09:14 -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=bDwa7qIk; 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 S229677AbhJLQHb (ORCPT + 99 others); Tue, 12 Oct 2021 12:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbhJLQHb (ORCPT ); Tue, 12 Oct 2021 12:07:31 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF263C061570; Tue, 12 Oct 2021 09:05:29 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id 187so17941496pfc.10; Tue, 12 Oct 2021 09:05:29 -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=mMOxU6+YA/sNdOBxrd9xR6DIR92SPqX/cAtPGdDmVKU=; b=bDwa7qIkxxY4j1mjJTPYMU69RjYrf7BqhXHN8j96S+Q1bdbHT0UGhaGhYsTUiJzcgW Q+h23U6lvfXttX1Xr5f4SLw+YP6GMI8ma5BcESwFQjnv19d5Pzkx+Nf0QYEODQ4eEgJM 5eEeI8PtE9M6SItS3znLiYEW5weFDD26ChmXer5Ekg1TKqcfTRSTZYQ1a1pv4TQLck5V znNWK4tc3AIMqY1oL4iNthKN5YOrxIq7RNDXuI1p9eWy6AjxderpQclUoKUtMnKWpIT+ XYfzMq2vtlyWT7YiLP0mG+SqRjbsaj9tPcfTahwelLVbv5cjqooIZZTyX26bKICf8NhH ZyKA== 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=mMOxU6+YA/sNdOBxrd9xR6DIR92SPqX/cAtPGdDmVKU=; b=iKLUIRWCUGYZc1up70e98hsslut4TZqHfOXquf4sb+SXDvgKD9nZT2PAa6eah3dzh0 LgO3xkis0dCq7nTt1PsB07UgxfcGQehB31N/7CD77kQUMKQeJTDLu14lERN9puKTe60K Nd+BQ8dvJgdS4nA+cPs+jWHKVCigfVHXxK8+cJNpJqwDfox0MiI5ZwCAgYZfi04Xs7GR EmVwsWc0U+Lt1t3ppP7TIMZ+jP4+5WamP+gpAy3GO1kuL3Wv9PvXwRu1RltmCigSSfao eY7GWsC9NyvVCChaQ0k0jZ3TvXPBDrljmzc1TjrYq4P9/TnPoGuTYxSbEsr1qtP+/U9Z /08Q== X-Gm-Message-State: AOAM530uO/lUIEXQgiSHdZy/yk6ssfevVyD9t3LuDG7YCjyqRupSRPGe vg2S+87pV0/jKM7IUlfWs0e7IkbEZvem5Iwo X-Received: by 2002:a63:2b4b:: with SMTP id r72mr23056190pgr.57.1634054728858; Tue, 12 Oct 2021 09:05:28 -0700 (PDT) Received: from theprophet ([2406:7400:63:cada:3b09:6c3b:61f5:2cfd]) by smtp.gmail.com with ESMTPSA id m186sm11857248pfb.165.2021.10.12.09.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:05:27 -0700 (PDT) Date: Tue, 12 Oct 2021 21:35:13 +0530 From: Naveen Naidu To: Lukas Wunner 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: <20211012160505.3dov6gjnmxdq5lz6@theprophet> References: <36c7c3005c4d86a6884b270807d84433a86c0953.1633972263.git.naveennaidu479@gmail.com> <20211011194740.GA14357@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211011194740.GA14357@wunner.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10, Lukas Wunner wrote: > 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. > Ah! yes. Now that I look at it, RESPONSE_IS_PCI_TIMEOUT() does indeed seem like a better option to RESPONSE_IS_PCI_ERROR(), since it's more specfic and depicts the actual condition. I'll wait for sometime and see if others have any objection/a better name for the macro and then redo the patch with that. Thank you very much for the review ^^ > 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