On 2019-01-29 10:47 a.m., jgli...@redhat.com wrote: > +bool pci_test_p2p(struct device *devA, struct device *devB) > +{ > + struct pci_dev *pciA, *pciB; > + bool ret; > + int tmp; > + > + /* > + * For now we only support PCIE peer to peer but other inter-connect > + * can be added. > + */ > + pciA = find_parent_pci_dev(devA); > + pciB = find_parent_pci_dev(devB); > + if (pciA == NULL || pciB == NULL) { > + ret = false; > + goto out; > + } > + > + tmp = upstream_bridge_distance(pciA, pciB, NULL); > + ret = tmp < 0 ? false : true; > + > +out: > + pci_dev_put(pciB); > + pci_dev_put(pciA); > + return false; > +} > +EXPORT_SYMBOL_GPL(pci_test_p2p); This function only ever returns false.... Logan
- [RFC PATCH 0/5] Device peer to peer (p2p) through vma jglisse
- [RFC PATCH 1/5] pci/p2p: add a function to test pe... jglisse
- Re: [RFC PATCH 1/5] pci/p2p: add a function to... Logan Gunthorpe
- Re: [RFC PATCH 1/5] pci/p2p: add a functio... Greg Kroah-Hartman
- Re: [RFC PATCH 1/5] pci/p2p: add a fun... Jerome Glisse
- Re: [RFC PATCH 1/5] pci/p2p: add a fun... Logan Gunthorpe
- Re: [RFC PATCH 1/5] pci/p2p: add ... Jerome Glisse
- Re: [RFC PATCH 1/5] pci/p2p: add a function to... Alex Deucher
- Re: [RFC PATCH 1/5] pci/p2p: add a functio... Jerome Glisse
- Re: [RFC PATCH 1/5] pci/p2p: add a functio... Logan Gunthorpe
- Re: [RFC PATCH 1/5] pci/p2p: add a fun... Alex Deucher
- Re: [RFC PATCH 1/5] pci/p2p: add a fun... Christian König
- [RFC PATCH 2/5] drivers/base: add a function to te... jglisse