Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp485497imj; Thu, 7 Feb 2019 07:19:06 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib0LkpBAeIt+bwpb1qvgYBSbwJjE1Oaw28dntKShY/lW0B4M6gQJ1qGlzGDlm2GRrPgjkNK X-Received: by 2002:a63:2209:: with SMTP id i9mr15358415pgi.325.1549552746838; Thu, 07 Feb 2019 07:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549552746; cv=none; d=google.com; s=arc-20160816; b=ISP3yiRg90vZvs6ncGTHmc2tzrBbJcvBhRTWY5+o+PdUg1Kdk0AuFcmoG8QI/VoS2c vAEsQYTFaVGXyaEtNuivLuUercpspR+FiAcfyhD2CsHk30Ro4T74QR5/Kawyr7qHdUvb kglPbP8wnhFvOARXv8dY9bYk5bylcUms8N6yqBd/KYjUNC1Y+1ltDSmilsFkkIpsrY71 MLgRQO+az320OtXp56+QaAN5nlIWvoQplqbYnqF086Zs5yNEZAfDLRU2cXiZnCCI/P93 4Y3fULCr0gDXmAXhP7B1leVAi2ALcSyjfAYeRaEY4hdmbRE5CCbf3oBhGKUD5NW1jNZT JCtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=g+0uzRZI5ZhCoB6esAEBqUI2DkOvYciTPtwxJ9Z8Sl4=; b=XWMeC1Sdc7GcCDAQloHTLqycBkXhKbrPbnPmeZ7FR912NLAI+iV7cFcYhL8rLd/Qr9 wgHEMgNuQ+zpgt2Duc+7qlMZovpPwrr0cnK/Ume/bBWtGeB0ofDt1B25Ecs2/Bs4NZrF xtmx7H7QVIwtVgWS+f9v0K8v8FgoUNLhXRIg9ro8CbWp47SCePWsxzZrpsrde/G1RkIG sJnDItS3iVBHP/oWnnu3nuWlproLLyiYnQvSMA9jOwNXsXx/Hoc16N6Bopz3nS4oOzQG dg+i0u2IQBwNRsRl/leZm/JDZHoPoTObmLRDpUoo+KaUUSF9/DiPhGpk1q+0ROiNUil+ W2Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=10qs5coc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si9058097pgb.402.2019.02.07.07.18.50; Thu, 07 Feb 2019 07:19:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=10qs5coc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727076AbfBGPSS (ORCPT + 99 others); Thu, 7 Feb 2019 10:18:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:49288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbfBGPSS (ORCPT ); Thu, 7 Feb 2019 10:18:18 -0500 Received: from localhost (173-25-63-173.client.mchsi.com [173.25.63.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B16BA2190A; Thu, 7 Feb 2019 15:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549552697; bh=xCDG12FYokW29hwSl6SqhHgSTnAUY4toDR6JhbOvZzA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=10qs5cocQJwHmFhGGwPcpH3vssYdS3YokAcnZxy8HcKWr7tQ18ebTvHwSnfQCbDyL B5ZgM63v823jDw/7tcOrAQ3NoHefUnx4jhD+cWZNu5JI8HUC43juE5NPuNMz4+GGbT IU2aKsM0FywynFHu3YF15cIVuuHGSGY5PXED6Lwc= Date: Thu, 7 Feb 2019 09:18:16 -0600 From: Bjorn Helgaas To: honghui.zhang@mediatek.com Cc: lorenzo.pieralisi@arm.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ryder.lee@mediatek.com, matthias.bgg@gmail.com, youlin.pei@mediatek.com, poza@codeaurora.org, fred@fredlawl.com, rafael.j.wysocki@intel.com, jianjun.wang@mediatek.com Subject: Re: [RFC PATCH] PCI/portdrv: Support for subtractive decode bridge Message-ID: <20190207151816.GI7268@google.com> References: <1544758829-10327-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1544758829-10327-1-git-send-email-honghui.zhang@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Honghui, On Fri, Dec 14, 2018 at 11:40:29AM +0800, honghui.zhang@mediatek.com wrote: > From: Honghui Zhang > > The Class Code for subtractive decode PCI-to-PCI bridge is 060401h, > change the class_mask values to make portdrv support this type bridge. I assume you have a Root Port or Switch Port that supports subtractive decode? I'm trying to understand how such a device would work. Out of curiosity, can you show the "lspci -vv" output for the device and the downstream devices of interest? Do you happen to know whether this functionality is configurable, e.g., is there some way software can enable or disable subtractive decode? I assume this would be some device-specific thing, because I can't find anything in the Bridge Control register or similar. The PCIe spec doesn't even contain the word "subtractive". The "PCI Express to PCI/PCI-X Bridge Specification", r1.0, says a PCI Express bridge (which would include Root Ports and Switch Ports) has a Class Code of 0x060400 (Non-Subtractive PCI-PCI Bridge) (sec 1.1). Sec 1.3.4 says subtractive decode on the primary interface is "not applicable or outside the scope of this spec". Bjorn > Signed-off-by: Honghui Zhang > --- > drivers/pci/pcie/portdrv_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c > index eef22dc..86926ea 100644 > --- a/drivers/pci/pcie/portdrv_pci.c > +++ b/drivers/pci/pcie/portdrv_pci.c > @@ -179,7 +179,7 @@ static void pcie_portdrv_err_resume(struct pci_dev *dev) > */ > static const struct pci_device_id port_pci_ids[] = { { > /* handle any PCI-Express port */ > - PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), > + PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0x01), > }, { /* end: all zeroes */ } > }; > > -- > 2.6.4 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel