Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp299007pxx; Thu, 29 Oct 2020 03:00:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBCYzt96lLVZYfhGyuOYmHKJ2VlZG4I1+kWoRkzVYvpdJytwuFlq1cBxZWAFg8OTpXnGwZ X-Received: by 2002:a17:906:ad8c:: with SMTP id la12mr3277294ejb.450.1603965608103; Thu, 29 Oct 2020 03:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603965607; cv=none; d=google.com; s=arc-20160816; b=FOvCqjy+Q8Kv6jAyR90s5RGCS/1QN/Le9IrgawfYHcKVHx66L1nw+0YaOTz2JUqbs7 UyLGTyEtKaX/KJo2VNVM5k9yz7nP4cGKoBoVwNyTOErvH9aZvgFNAY9nYpJPLaiQIVck b5+cw9+3R6qFMMzJ9hbRGdWY7lu1GJPgszH7a3H4Xkk4RnVhshnr3U1azAhf7XhsIp0l 3jtf3C48oXITpiS2Iymu8Y4+6hQ2VG/3CSp6VAaXzcCZ/hRtfKpZckcJmEpKb8EUWzM6 Tegfv4JvsYz19Oz6FAc/vEoRgczGQMOZyXDIOuEHeUTfFrh7Rd+HynQwlCEM0Yr04tN7 mPnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7YoJO1zoQ5E1C2GRnvBh7fUEKY8vwjJF0oG7GALEVY0=; b=hcXRDo+CYSTZheLZ/85F6J3drUl61c2FsG7FYNwJLCRJVsQeB9DLP/XmLIyl9z7EZq m7dMxvi1pZt+oPp/SWTh1Sp2gexDtvt5ccSHa+G1600oUNSLtVnZEnPnn6AzJVNeM5Wb lf6mHbvprj3JVedAlBuWSIoM+7LeUlSmJZDG1/q0zzFXRwywm2UMrXSK2eDg1uhZ/3Bi 1SPfOZRcbr//m+5OKuvSbd9NpGGO5xsWqX7HSJoqqecS3xv7Zp9SFm2leVmUhN9Qp/yf VUaRSKvHQOuUAjEhfFSF7m3eBhpkOe9xjIZ8cXNFa/85O6Ib9dlhzXzQVHiPocdwmvS4 tPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oRtUjZ5C; 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 u8si1771671edy.179.2020.10.29.02.59.44; Thu, 29 Oct 2020 03:00:07 -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=20161025 header.b=oRtUjZ5C; 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 S1727197AbgJ1XKd (ORCPT + 99 others); Wed, 28 Oct 2020 19:10:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732861AbgJ1XJr (ORCPT ); Wed, 28 Oct 2020 19:09:47 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB91BC0613CF; Wed, 28 Oct 2020 16:09:46 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id w25so1256509edx.2; Wed, 28 Oct 2020 16:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7YoJO1zoQ5E1C2GRnvBh7fUEKY8vwjJF0oG7GALEVY0=; b=oRtUjZ5CnjY/48rMe/NEbC0601bsZl2A3wiNu2a5e7ToPMOCvBJ6ZgV5Nnj7FjF9ca o91eqOwvIAhK62mVawC1oOOoQ4WHz+UhbGDXqoxTP3dKTGZagY1UmjHfbadg7kneq9fV HL2B/sCLF5RILV/VLiEmSBX5KpXtdacWuJTmacD+IBENgjwhr7D5LuwxrLLvRuxX9I5k UxuI7nDGj2nYhNk3Kf5zWcefDTPC7WfKYbJQfJmbHk5PAuz2TyLMJVz97870kZPH/Ku4 TMthHDKuEIBysoI6ERyDlabriQPvblnUKUZ8gGPC+WuwBZDD9eXlRuLzyUZT9HsD5siV qTYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7YoJO1zoQ5E1C2GRnvBh7fUEKY8vwjJF0oG7GALEVY0=; b=O2AaW5kBHtM/3FzY+CUq89YG6QNsiuRHNayoZDTQAPieCBo+TxV/Q0/WnoMwS6b5W7 YxEtNNqQ77nGi6nQRvNDsP8i/mRiSyEe4ZNi13WziCKtXGHsRUXIQEnYvZ3YbmsGJvFY owOjbLrFszyl8oCpeLsEJUppc8NKyQeKxnv9t/umiogNZY/5HIIoyAEsAMPaIym7NFjA mMkG2FV0vXNC9iOjRicUqxgkZILoy8H8S9VDb9VDpFUiXGMUIivczwueC0pfwQYh6gV9 ia8cwkj+I35GxcH5TkzpzI0P6xQUjk1YvcliGq1TyIoDrZWP+acCySzT/KP55Ju+rTkA gX+w== X-Gm-Message-State: AOAM532FVUGLBQ4UPQBTWoh4jJbMHYxciM8qVfIOw9WkbSCZbHDeg59z zRZ/bFSsdN9Vb5qnIc/gC7t53gOlKMHvVOZkm/UEyKbB X-Received: by 2002:aa7:cd42:: with SMTP id v2mr5902125edw.151.1603863789273; Tue, 27 Oct 2020 22:43:09 -0700 (PDT) MIME-Version: 1.0 References: <3cb6923f879b64a80df3670facdee327bcc39a4c.1603738449.git.sathyanarayanan.kuppuswamy@linux.intel.com> In-Reply-To: <3cb6923f879b64a80df3670facdee327bcc39a4c.1603738449.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Ethan Zhao Date: Wed, 28 Oct 2020 13:42:57 +0800 Message-ID: Subject: Re: [PATCH v10 5/5] PCI/DPC: Move AER/DPC dependency checks out of DPC driver To: Kuppuswamy Sathyanarayanan Cc: Bjorn Helgaas , linux-pci , Linux Kernel Mailing List , Ashok Raj , knsathya@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 11:12 AM Kuppuswamy Sathyanarayanan wrote: > > Currently, AER and DPC Capabilities dependency checks is > distributed between DPC and portdrv service drivers. So move > them out of DPC driver. > > Also, since services & PCIE_PORT_SERVICE_AER check already > ensures AER native ownership, no need to add additional > pcie_aer_is_native() check. > > Signed-off-by: Kuppuswamy Sathyanarayanan > --- > drivers/pci/pcie/dpc.c | 4 ---- > drivers/pci/pcie/portdrv_core.c | 1 + > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c > index 21f77420632b..a8b922044447 100644 > --- a/drivers/pci/pcie/dpc.c > +++ b/drivers/pci/pcie/dpc.c > @@ -283,14 +283,10 @@ void pci_dpc_init(struct pci_dev *pdev) > static int dpc_probe(struct pcie_device *dev) > { > struct pci_dev *pdev = dev->port; > - struct pci_host_bridge *host = pci_find_host_bridge(pdev->bus); > struct device *device = &dev->device; > int status; > u16 ctl, cap; > > - if (!pcie_aer_is_native(pdev) && !host->native_dpc) > - return -ENOTSUPP; > - > status = devm_request_threaded_irq(device, dev->irq, dpc_irq, > dpc_handler, IRQF_SHARED, > "pcie-dpc", pdev); > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c > index e257a2ca3595..ffa1d9fc458e 100644 > --- a/drivers/pci/pcie/portdrv_core.c > +++ b/drivers/pci/pcie/portdrv_core.c > @@ -252,6 +252,7 @@ static int get_port_device_capability(struct pci_dev *dev) > * permission to use AER. > */ > if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) && > + host->native_dpc && What hell the logic is here ? > (host->native_dpc || (services & PCIE_PORT_SERVICE_AER))) > services |= PCIE_PORT_SERVICE_DPC; > > -- > 2.17.1 >