Blame SOURCES/0188-cxl-list-Clarify-B-vs-P-p-root.patch

2eb93d
From db55c5254d932d8d1be1fc082ea7a919def47a5d Mon Sep 17 00:00:00 2001
2eb93d
From: Dan Williams <dan.j.williams@intel.com>
2eb93d
Date: Tue, 26 Jul 2022 18:54:54 -0700
2eb93d
Subject: [PATCH 188/217] cxl/list: Clarify "-B" vs "-P -p root"
2eb93d
2eb93d
Matthew notes that 'cxl list' documentation claims that 'cxl list -B' and
2eb93d
'cxl list -P -p root' are equivalent. Which they are not:
2eb93d
2eb93d
$ cxl list -B
2eb93d
[
2eb93d
  {
2eb93d
    "bus":"root0",
2eb93d
    "provider":"ACPI.CXL"
2eb93d
  }
2eb93d
]
2eb93d
2eb93d
$ cxl list -P -p root
2eb93d
[
2eb93d
  {
2eb93d
    "bus":"root0",
2eb93d
    "provider":"ACPI.CXL",
2eb93d
    "ports:root0":[
2eb93d
      {
2eb93d
        "port":"port1",
2eb93d
        "host":"ACPI0016:00"
2eb93d
      }
2eb93d
    ]
2eb93d
  }
2eb93d
]
2eb93d
2eb93d
Clarify that '--single' needs to be appended to '-P -p root' to make it
2eb93d
equivalent to 'cxl list -B'. This is due to the behavior that listing ports
2eb93d
includes all descendants of a port that matches the filter. In the case of
2eb93d
'-P -p root' that results in all enabled ports.
2eb93d
2eb93d
$ cxl list -P -p root -S
2eb93d
[
2eb93d
  {
2eb93d
    "bus":"root0",
2eb93d
    "provider":"ACPI.CXL"
2eb93d
  }
2eb93d
]
2eb93d
2eb93d
Link: https://lore.kernel.org/r/165888675979.3375698.5785835464908538946.stgit@dwillia2-xfh.jf.intel.com
2eb93d
Cc: Adam Manzanares <a.manzanares@samsung.com>
2eb93d
Reported-by: Matthew Ho <sunfishho12@gmail.com>
2eb93d
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2eb93d
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2eb93d
---
2eb93d
 Documentation/cxl/cxl-list.txt | 20 ++++++++++++++------
2eb93d
 1 file changed, 14 insertions(+), 6 deletions(-)
2eb93d
2eb93d
diff --git a/Documentation/cxl/cxl-list.txt b/Documentation/cxl/cxl-list.txt
2eb93d
index f6aba0c..088ea70 100644
2eb93d
--- a/Documentation/cxl/cxl-list.txt
2eb93d
+++ b/Documentation/cxl/cxl-list.txt
2eb93d
@@ -255,19 +255,27 @@ OPTIONS
2eb93d
 --port=::
2eb93d
 	Specify CXL Port device name(s), device id(s), and or port type
2eb93d
 	names to filter the listing. The supported port type names are "root"
2eb93d
-	and "switch". Note that since a bus object is also a port, the following
2eb93d
-	two syntaxes are equivalent:
2eb93d
+	and "switch". Note that a bus object is also a port, so the
2eb93d
+	following two syntaxes are equivalent:
2eb93d
 ----
2eb93d
 # cxl list -B
2eb93d
-# cxl list -P -p root
2eb93d
+# cxl list -P -p root -S
2eb93d
 ----
2eb93d
-	Additionally, endpoint objects are also ports so the following commands
2eb93d
-	are also equivalent.
2eb93d
+	...where the '-S/--single' is required since descendant ports are always
2eb93d
+	included in a port listing and '-S/--single' stops after listing the
2eb93d
+	bus.  Additionally, endpoint objects are ports so the following commands
2eb93d
+	are equivalent, and no '-S/--single' is required as endpoint ports are
2eb93d
+	terminal:
2eb93d
 ----
2eb93d
 # cxl list -E
2eb93d
 # cxl list -P -p endpoint
2eb93d
 ----
2eb93d
-	By default, only 'switch' ports are listed.
2eb93d
+	By default, only 'switch' ports are listed, i.e.
2eb93d
+----
2eb93d
+# cxl list -P
2eb93d
+# cxl list -P -p switch
2eb93d
+----
2eb93d
+	...are equivalent.
2eb93d
 
2eb93d
 -S::
2eb93d
 --single::
2eb93d
-- 
2eb93d
2.27.0
2eb93d