Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6391433rwb; Mon, 12 Dec 2022 00:55:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf6gM25DC/HpcBQxfFK2rjEslYUNMTSHikQyQGD5MNaemeivK3Pg7nA+BUK5gXBCWHIvTLYx X-Received: by 2002:a17:90a:eb0e:b0:21a:67f:5d34 with SMTP id j14-20020a17090aeb0e00b0021a067f5d34mr15294138pjz.16.1670835318623; Mon, 12 Dec 2022 00:55:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670835318; cv=none; d=google.com; s=arc-20160816; b=eubzF5xJdixaWxfyprmgqYAiLz8eZzf0BYRSHgnWNdj/Tph6aONQHKxbwqTaK0BSws AaMnf9QrDxrwEIsJmXROKNUBhkSwDTY/beKdelJ7h8fNhY4CUIhpQUwQLUlGqhaATms7 2NOwmfdj6m8SauK6ieEU7d2iGeSlWAbyJvA3GODsZAUys2p/r2VXUaGo36L+Pc/of8L+ 2mguJsiARG/fFAtThMcPnJtlJnSY8DM26opU3i831VighHlLGg67tqQUp+RhSFB+3ARE wNMJeS/2xSbHaFs+/yYmZJdU8JOzfcw1TPl4VwF4+L6cW0ioj9TEK01zTohZn1HSObj6 ANMA== 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=Mxg+fh7pNzG+kVo8QoQhPU2/hUVVhX3u+IZZMCkcybA=; b=S0N8uyaVVPf8K2F8OJfxDo2NTpekE9DbWQjUw+NNM93izPxUkSToGX8E8ZzyYlDvvT Gcq7PAQ0dnZJFjbwiIJT8OqeEteunAzCs/h0wsET3JQ00xaDcH3FUSH/jLDBUsBgBXmq a2BmZadroKQLtiGzp4D7IBCkzP4CeNIlZRgQwBOtvci1rC3gdRWNwaeylh31UbGhGLeK QAgkSP2G/Bkhoamg9Lb1cKREAm2v2AEBv90Eeasu1nRQ0S6FllyQrNBWOtDMVDz3CjxA sm3VyLLETaFNjSFOVkCP1PYYAiDgDBJ/CyKjFlDLNqgTuFFy0KsA2p0FWNO7SRpSgwKu Cd0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=QFtwNfwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx4-20020a17090b46c400b00218d3ce2332si8634132pjb.163.2022.12.12.00.55.08; Mon, 12 Dec 2022 00:55:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=QFtwNfwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbiLLIqP (ORCPT + 75 others); Mon, 12 Dec 2022 03:46:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiLLIqN (ORCPT ); Mon, 12 Dec 2022 03:46:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC96DFD5; Mon, 12 Dec 2022 00:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Mxg+fh7pNzG+kVo8QoQhPU2/hUVVhX3u+IZZMCkcybA=; b=QFtwNfwmTpLHGd/3xxmNtCSJ0r qROU/jxGS7Ij5QY1t/9B6FtMH7+XMla6iqD4uOPci4wxrals7fMOZyWIQuIC6c01AMzIrZHvcWDjq TmOd2hjgDCpWjr+dpqYWrqKqHW2a3ILuXHEn2De1frl4Nc06Y9vcxCaJ2G2URepKe6oRprvanravj fplOeoVWY49aPwFLZ5BfwM1PjYPoLe5hvaj/7ZtT0FAR2nsniovMAAemFllhA4BplYuMnmGsaKbpw 7tr0+epMoRl7y2TqyOZtOpFr9ZEMo9v9yJ2BjbDTxyOOAe6ZlXGUeU5yJYICH4YwZLT7T1LIga8dH 4tSlgTxg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4eRv-00AWB5-BG; Mon, 12 Dec 2022 08:46:11 +0000 Date: Mon, 12 Dec 2022 00:46:11 -0800 From: Christoph Hellwig To: Bjorn Helgaas Cc: Mika Westerberg , Sathyanarayanan Kuppuswamy , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH v3] PCI/portdrv: Allow AER service only for Root Ports & RCECs Message-ID: References: <20221210002922.1749403-1-helgaas@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221210002922.1749403-1-helgaas@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 09, 2022 at 06:29:22PM -0600, Bjorn Helgaas wrote: > + if ((pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT || > + pci_pcie_type(dev) == PCI_EXP_TYPE_RC_EC) && > + dev->aer_cap && pci_aer_available() && > (pcie_ports_native || host->native_aer)) Eww, this is really hard to follow. Can you split this out into a little helper, that actually documents the decisions based on some of the wording you have in the current comit message?