Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-03 Thread Yijing Wang
On 2015/3/3 11:03, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: >> Now we have weak functions like pcibios_root_bridge_prepare() >> to setup pci host bridge, We could introduce pci_host_bridge_ops >> which contain host bridge specific ops to setup

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-03 Thread Yijing Wang
>> +if (host->ops && host->ops->phb_prepare) { >> +error = host->ops->phb_prepare(host); >> +if(error) { > > Whitespace error. Will fix. > >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -400,6 +400,13 @@ static inline int pci_channel_offline(struct

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-03 Thread Yijing Wang
+if (host-ops host-ops-phb_prepare) { +error = host-ops-phb_prepare(host); +if(error) { Whitespace error. Will fix. --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -400,6 +400,13 @@ static inline int pci_channel_offline(struct pci_dev *pdev)

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-03 Thread Yijing Wang
On 2015/3/3 11:03, Bjorn Helgaas wrote: On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: Now we have weak functions like pcibios_root_bridge_prepare() to setup pci host bridge, We could introduce pci_host_bridge_ops which contain host bridge specific ops to setup pci_host_bridge.

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-02 Thread Bjorn Helgaas
On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: > Now we have weak functions like pcibios_root_bridge_prepare() > to setup pci host bridge, We could introduce pci_host_bridge_ops > which contain host bridge specific ops to setup pci_host_bridge. > Then host bridge driver could add

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-02 Thread Bjorn Helgaas
On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: > Now we have weak functions like pcibios_root_bridge_prepare() > to setup pci host bridge, We could introduce pci_host_bridge_ops > which contain host bridge specific ops to setup pci_host_bridge. > Then host bridge driver could add

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-02 Thread Bjorn Helgaas
On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: Now we have weak functions like pcibios_root_bridge_prepare() to setup pci host bridge, We could introduce pci_host_bridge_ops which contain host bridge specific ops to setup pci_host_bridge. Then host bridge driver could add

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-02 Thread Bjorn Helgaas
On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: Now we have weak functions like pcibios_root_bridge_prepare() to setup pci host bridge, We could introduce pci_host_bridge_ops which contain host bridge specific ops to setup pci_host_bridge. Then host bridge driver could add

[PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-02-26 Thread Yijing Wang
Now we have weak functions like pcibios_root_bridge_prepare() to setup pci host bridge, We could introduce pci_host_bridge_ops which contain host bridge specific ops to setup pci_host_bridge. Then host bridge driver could add pci_host_bridge_ops hooks intead of weak function to setup

[PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-02-26 Thread Yijing Wang
Now we have weak functions like pcibios_root_bridge_prepare() to setup pci host bridge, We could introduce pci_host_bridge_ops which contain host bridge specific ops to setup pci_host_bridge. Then host bridge driver could add pci_host_bridge_ops hooks intead of weak function to setup