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

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