Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-03-01 Thread Wei Yang
On Fri, Feb 20, 2015 at 05:47:09PM -0600, Bjorn Helgaas wrote: >On Tue, Feb 10, 2015 at 07:14:45PM +1100, Benjamin Herrenschmidt wrote: >> On Tue, 2015-02-10 at 14:25 +0800, Wei Yang wrote: >> > PF's resource will be assigned first, including normal BARs and IOV >> > BARs. >> > >> > Then PF's driv

Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-02-20 Thread Bjorn Helgaas
On Tue, Feb 10, 2015 at 07:14:45PM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2015-02-10 at 14:25 +0800, Wei Yang wrote: > > PF's resource will be assigned first, including normal BARs and IOV > > BARs. > > > > Then PF's driver will create VFs, in virtfn_add(). In this function, > > VF's > > r

Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-02-10 Thread Benjamin Herrenschmidt
On Tue, 2015-02-10 at 14:25 +0800, Wei Yang wrote: > PF's resource will be assigned first, including normal BARs and IOV > BARs. > > Then PF's driver will create VFs, in virtfn_add(). In this function, > VF's > resources is calculated from its PF's IOV BAR. > > If you reset VF's resource as PFs,

Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-02-09 Thread Wei Yang
On Tue, Feb 10, 2015 at 01:14:11PM +1100, Benjamin Herrenschmidt wrote: >On Tue, 2015-02-10 at 09:51 +0800, Wei Yang wrote: >> On Tue, Feb 10, 2015 at 11:36:24AM +1100, Benjamin Herrenschmidt wrote: >> >On Thu, 2015-01-15 at 10:27 +0800, Wei Yang wrote: >> >> If we're going to reassign resources wi

Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-02-09 Thread Benjamin Herrenschmidt
On Tue, 2015-02-10 at 09:51 +0800, Wei Yang wrote: > On Tue, Feb 10, 2015 at 11:36:24AM +1100, Benjamin Herrenschmidt wrote: > >On Thu, 2015-01-15 at 10:27 +0800, Wei Yang wrote: > >> If we're going to reassign resources with flag PCI_REASSIGN_ALL_RSRC, all > >> resources will be cleaned out during

Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-02-09 Thread Wei Yang
On Tue, Feb 10, 2015 at 11:36:24AM +1100, Benjamin Herrenschmidt wrote: >On Thu, 2015-01-15 at 10:27 +0800, Wei Yang wrote: >> If we're going to reassign resources with flag PCI_REASSIGN_ALL_RSRC, all >> resources will be cleaned out during device header fixup time and then get >> reassigned by PCI

Re: [PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-02-09 Thread Benjamin Herrenschmidt
On Thu, 2015-01-15 at 10:27 +0800, Wei Yang wrote: > If we're going to reassign resources with flag PCI_REASSIGN_ALL_RSRC, all > resources will be cleaned out during device header fixup time and then get > reassigned by PCI core. However, the VF resources won't be reassigned and > thus, we shouldn'

[PATCH V11 07/17] powerpc/pci: Don't unset pci resources for VFs

2015-01-14 Thread Wei Yang
If we're going to reassign resources with flag PCI_REASSIGN_ALL_RSRC, all resources will be cleaned out during device header fixup time and then get reassigned by PCI core. However, the VF resources won't be reassigned and thus, we shouldn't clean them out. This patch adds a condition. If the pci_