From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> 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-Type: text/plain; charset="us-ascii" Sender: linux-pci-owner@vger.kernel.org List-ID: 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