From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934053AbbJHPKo (ORCPT ); Thu, 8 Oct 2015 11:10:44 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:58782 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933554AbbJHPKm (ORCPT ); Thu, 8 Oct 2015 11:10:42 -0400 From: Arnd Bergmann To: Bjorn Helgaas Cc: David Daney , linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Will Deacon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Marc Zyngier , David Daney Subject: Re: [PATCH v4 3/5] PCI: generic: Quit clobbering our pci_ops. Date: Thu, 08 Oct 2015 17:09:56 +0200 Message-ID: <5128429.u9O5dh5qKB@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151008150215.GB3885@localhost> References: <1443811443-18878-1-git-send-email-ddaney.cavm@gmail.com> <1443811443-18878-4-git-send-email-ddaney.cavm@gmail.com> <20151008150215.GB3885@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:FmfZvKPqFmaqh/zFdbSw4tN96xNbk2922TM/1PWoGx/gMhCsVQO 5rF5jWLMxpb1O7xib1Sk88W+Hj72UeRJ4ukCvDvKQppq9WhEqQdeNCLohQUtL8Vu7wvRORX eaiwW258mvOnsNQO/5dKYXG8Rg1lTaUBCSANCDWp6OTyh3KXtm730pQNH+eTZPCfA2hheju l1iLHNG6gos0LTmjgBzng== X-UI-Out-Filterresults: notjunk:1;V01:K0:6X7IDiLt/ZU=:C04JyR4Vq515HKRx3RJ0aS SX/2sxb2jg6CknF7+HtR4MaVUcdiCCa8zHblsTxWJyYkBc4yn4GYWFaeVDL+P7TrLgchHzFHL Ji+1UP7X8K0AlrlQv4h+z/xDK7ISbsqtGylcMcSvEGQ+Syh2ARmYCrrtqR35QY0SP7If6tIp6 DW45luQrm+VNcuaC2oVwHusYL74wb9mMqnBuB8cjNWWZ92/+lgEAP24K5WuD1gUTsPKSvaWL2 q6NtQWqy6HU7EbUgiq+ywjD+aC8nP8XxlQnqRar9WbtAx/cfbZixnk2OghbhJwXD445eEf2Nb OEB+nmEpPpcM6YH4w8KjVY/sXf5UJOFIC/s7sXLSyWZBCyCoAOgmAx+lFyZWxibdRXUXI8vxy GD6vY/wwjn33bNMhQRORlCcCIx+c4qxs8UJnyKLZMIS5rAVhu2tqSD2+T2hcje/91ekCO2pNV NDasosy0J+/9nTWf8B3+Y7/vjX4fmVKDM17jhOLkJrHR7BICQZY5e0df5LZIGJz2/TZnV6CYV SSgSyhpFEq43hyjq2TvxfAuvjTzngTN3Rz+MoqlFfO0DcbnheHUSOzulqxXuOKvMCYfIjTaE/ jgMnqglJOAKyscAPiFdFycYxw4haUht3GNyoG+k3FzNWRgbwu8LLuxtcwxozKTXaSSZmKi6i0 WawwrwoJnJ1VeJ/7kGtU0b9+2YWau1wrbMCmVRVvRPCzjMBOR8IQsdy9uMRU8wKE7sHEL7iAA 15irmK+c4d1E+mb1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 08 October 2015 10:02:16 Bjorn Helgaas wrote: > [+cc Arnd] > > Arnd, you had comments on the previous version. What do you think of > this one? Looks good to me > On Fri, Oct 02, 2015 at 11:44:01AM -0700, David Daney wrote: > > From: David Daney > > > > The pci-host-generic driver keeps a global struct pci_ops which it > > then patches with the .map_bus method appropriate for the bus device. > > A problem arises when the driver is used for two different types of > > bus devices, the .map_bus method for the last device probed clobbers > > the method for all previous devices. The result, only the last bus > > device probed has the proper .map_bus, and the others fail. > > > > Move the struct pci_ops into the bus specific structure, and > > initialize a pointer to it when the bus device is probed. > > > > Acked-by: Will Deacon > > Signed-off-by: David Daney > Reviewed-by: Arnd Bergmann