Skip to contentSkip to conversation

PCI/P2PDMA: Fix a source code comment

PATCH In review Bart Van Assche 2 participants 3 messages Aug 15, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI/P2PDMA: Fix a source code comment

Commit 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory"; v4.20) introduced the following text: "there's no way to determine whether the root complex supports forwarding between them." A later commit added a whitelist check in the function that comment applies to. Update the comment to reflect the addition of the whitelist check.

Cc Logan Gunthorpe <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Keith Busch <[email protected]>
---
 drivers/pci/p2pdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/p2pdma.c +2 -2
index 234476226529..f719adc2b826 100644
@@ -300,8 +300,8 @@ static bool root_complex_whitelist(struct pci_dev *dev)
  * Any two devices that don't have a common upstream bridge will return -1.
  * In this way devices on separate PCIe root ports will be rejected, which
  * is what we want for peer-to-peer seeing each PCIe root port defines a
- * separate hierarchy domain and there's no way to determine whether the root
- * complex supports forwarding between them.
+ * separate hierarchy domain and there's no way other than using a whitelist
+ * to determine whether the root complex supports forwarding between them.
  *
  * In the case where two devices are connected to different PCIe switches,
  * this function will still return a positive distance as long as both
Signature · 1 line
2.23.0.rc1.153.gdeed80330f-goog
maintainer
#1 lore raw
Quoted 5 lines · Bart Van Assche

Commit 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory"; v4.20) introduced the following text: "there's no way to determine whether the root complex supports forwarding between them." A later commit added a whitelist check in the function that comment applies to. Update the comment to reflect the addition of the whitelist check.

Thanks for the vigilant patch, but I've already got a series[1] that cleans up most of these commits. It looks like this patch will conflict with that series.

Logan

[1]
https://lore.kernel.org/linux-pci/[email protected]/

Quoted 24 lines
Cc Logan Gunthorpe <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Keith Busch <[email protected]>
---
 drivers/pci/p2pdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/p2pdma.c +2 -2
index 234476226529..f719adc2b826 100644
@@ -300,8 +300,8 @@ static bool root_complex_whitelist(struct pci_dev *dev)
  * Any two devices that don't have a common upstream bridge will return -1.
  * In this way devices on separate PCIe root ports will be rejected, which
  * is what we want for peer-to-peer seeing each PCIe root port defines a
- * separate hierarchy domain and there's no way to determine whether the root
- * complex supports forwarding between them.
+ * separate hierarchy domain and there's no way other than using a whitelist
+ * to determine whether the root complex supports forwarding between them.
  *
  * In the case where two devices are connected to different PCIe switches,
  * this function will still return a positive distance as long as both
#2 lore raw
Quoted 10 lines · Logan Gunthorpe
Quoted 5 lines · Bart Van Assche

Commit 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory"; v4.20) introduced the following text: "there's no way to determine whether the root complex supports forwarding between them." A later commit added a whitelist check in the function that comment applies to. Update the comment to reflect the addition of the whitelist check.

Thanks for the vigilant patch, but I've already got a series[1] that cleans up most of these commits. It looks like this patch will conflict with that series.

Hi Logan,

Thanks for the pointer. I'm fine with dropping this patch.

Bart.