From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 000DEC433F5 for ; Wed, 5 Jan 2022 15:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VsCBt8p3OiTLq8h9dZLEnS/8+BuAPgjJGz1EsLJkzMM=; b=Jx+LoZMTfSYiYG m/M3VLXMIxWV1JFsi6RY7+Kob6YFzLVHOnLgJbYZl5DH2GZKKNCuJsyJYtDglcnweS9bV8t2Ao7M8 HoT2eHJ+bi5/HJB7ct+vq407+2cvWQNgxIKfEAVD5+HEuz2yB6KB+IdzAhSZxPYGpgU5oT8/HDnNp 5XYyx55PHdxra+hlRPdr9lhWrXjiSlA0PaeF3DlwDhASdK9/HKtgGWXUM8OvD5Cm7x0aBAXPCNUR7 AM+dLjKwZquaBMnObGi8k++TY6zoO7dKr4wpauQoUcAud0kG+Ya5ZrTitUs/YY89u7OwD84HhyulW k8gdKscxht7GQAETB5DQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n58Y8-00FDrO-I8; Wed, 05 Jan 2022 15:50:04 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n58Y5-00FDoM-3o for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 15:50:02 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3B518B81C0F; Wed, 5 Jan 2022 15:49:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC910C36AE9; Wed, 5 Jan 2022 15:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641397798; bh=uDYG/IJoBKEoZh832BQxUsG+vyQ8MDYSgq+gprMQZjs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tWN45LEnYa4XxwE0cD1n4KegcPxZSM9z2lAbWG9UBdGAgXFBg+5YcpOPMGuJUIwMm xsL49YKwMER98DdIlcm30OeFOm0aW9xmE6nbry7vpR6aHBGPCxUCqlWCrV5ZPXYq5j s/xoe+ecZ0c5p9Fa/4WPcEP/4Ay6B7o0rhKD3ncYX+s/fB4b8ijsz+miGLJajeDvB5 0ibjN/pn3YIgO/qkvTkVFM4ilEa0MYQip2BPzqeQgy/1waafTPBbOHzu3oOE0oFnn2 ZckkEYN6Hw2V1yJZbjj4CK4Byiiy/25ISTChN8d2jsD45VsyXIkwCgc1hJT4SZagwo JbQYrVIRmW86A== Received: by pali.im (Postfix) id 5035782A; Wed, 5 Jan 2022 16:49:55 +0100 (CET) Date: Wed, 5 Jan 2022 16:49:55 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Rob Herring Cc: Lorenzo Pieralisi , Bjorn Helgaas , Thomas Petazzoni , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Marek =?utf-8?B?QmVow7pu?= , Russell King , PCI , "linux-kernel@vger.kernel.org" , linux-arm-kernel Subject: Re: [PATCH 08/11] PCI: mvebu: Use child_ops API Message-ID: <20220105154955.lxhnhjgjsiwhuffq@pali> References: <20220105150239.9628-1-pali@kernel.org> <20220105150239.9628-9-pali@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220105_075001_340694_063A9C1A X-CRM114-Status: GOOD ( 16.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wednesday 05 January 2022 09:41:51 Rob Herring wrote: > > @@ -347,6 +375,11 @@ static int mvebu_pcie_hw_wr_conf(struct mvebu_pcie_port *port, > > return PCIBIOS_SUCCESSFUL; > > } > > > > +static struct pci_ops mvebu_pcie_child_ops = { > > + .read = mvebu_pcie_child_rd_conf, > > + .write = mvebu_pcie_child_wr_conf, > > +}; > > + > > /* > > * Remove windows, starting from the largest ones to the smallest > > * ones. > > @@ -862,25 +895,12 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn, > > { > > struct mvebu_pcie *pcie = bus->sysdata; > > struct mvebu_pcie_port *port; > > - int ret; > > > > port = mvebu_pcie_find_port(pcie, bus, devfn); > > if (!port) > > return PCIBIOS_DEVICE_NOT_FOUND; > > It would be nice to go from 'bus' to 'bridge' ptr directly, but I > still had this in my version. I guess a standard RP struct as part of > decoupling host bridges from RPs would solve this issue. Hello! The problem is somewhere else. This driver is misusing bus 0 for doing non-transparent bus-bridging between multiple PCI domains by registering roots ports across all domains into domain 0, bus 0. All details are in this my patch which documents this strange driver behavior: https://lore.kernel.org/linux-pci/20211125124605.25915-12-pali@kernel.org/ So the correct solution is is split these multidomain mixing and then every domain would have exactly one root port (as it is designed in HW). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel