--- v10
+++ v11
@@ -1,12 +1,15 @@
+The P2PDMA mapping should fail if a device with 10-Bit Tag Requester
+interact with a device that does not support 10-Bit Tag Completer.
+
Add a 10-Bit Tag check in the P2PDMA code to ensure that a device with
10-Bit Tag Requester doesn't interact with a device that does not
support 10-Bit Tag Completer. Before that happens, the kernel should
emit a warning.
-"echo 0 > /sys/bus/pci/devices/.../10bit_tag" to disable 10-Bit Tag
+"echo 0 > /sys/bus/pci/devices/.../tags" to disable 10-Bit Tag
Requester for PF device.
-"echo 0 > /sys/bus/pci/devices/.../sriov_vf_10bit_tag_ctl" to disable
+"echo 0 > /sys/bus/pci/devices/.../sriov_vf_tags_ctl" to disable
10-Bit Tag Requester for VF device.
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
@@ -16,7 +19,7 @@
1 file changed, 48 insertions(+)
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
-index 50cdde3e9a8b..804e390f4c22 100644
+index 50cdde3e9a8b..1565a31183af 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -19,6 +19,7 @@
@@ -38,7 +41,7 @@
+ bool req;
+ bool comp;
+ u16 ctl;
-+ const char *str = "10bit_tag";
++ const char *str = "tags";
+
+ if (a->is_virtfn) {
+#ifdef CONFIG_PCI_IOV
@@ -67,7 +70,7 @@
+ pci_name(b));
+
+ if (a->is_virtfn)
-+ str = "sriov_vf_10bit_tag_ctl";
++ str = "sriov_vf_tags_ctl";
+
+ pci_warn(a, "to disable 10-Bit Tag Requester for this device, echo 0 > /sys/bus/pci/devices/%s/%s\n",
+ pci_name(a), str);