Blame SOURCES/0069-ndctl-docs-Clarify-update-firwmware-activation-overf.patch

26ccd9
From 475cb041a97d3c7140efd1b0cda820fb22b69d11 Mon Sep 17 00:00:00 2001
26ccd9
From: Dan Williams <dan.j.williams@intel.com>
26ccd9
Date: Wed, 5 Jan 2022 13:31:44 -0800
26ccd9
Subject: [PATCH 069/217] ndctl/docs: Clarify update-firwmware activation
26ccd9
 'overflow' conditions
26ccd9
26ccd9
Give examples and remediation for "overflow" events, i.e. where the
26ccd9
estimated time to complete activation exceeds the platform advertised
26ccd9
maximum. When that happens forced activation can lead to undefined results.
26ccd9
26ccd9
Link: https://lore.kernel.org/r/164141830490.3990253.6263569501446070716.stgit@dwillia2-desk3.amr.corp.intel.com
26ccd9
Tested-by: Alison Schofield <alison.schofield@intel.com>
26ccd9
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.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/ndctl/ndctl-update-firmware.txt | 64 ++++++++++++++++++-
26ccd9
 1 file changed, 63 insertions(+), 1 deletion(-)
26ccd9
26ccd9
diff --git a/Documentation/ndctl/ndctl-update-firmware.txt b/Documentation/ndctl/ndctl-update-firmware.txt
26ccd9
index 1080d62..6166457 100644
26ccd9
--- a/Documentation/ndctl/ndctl-update-firmware.txt
26ccd9
+++ b/Documentation/ndctl/ndctl-update-firmware.txt
26ccd9
@@ -58,7 +58,69 @@ include::xable-bus-options.txt[]
26ccd9
 	Arm a device for firmware activation. This is enabled by default
26ccd9
 	when a firmware image is specified. Specify --no-arm to disable
26ccd9
 	this default. Otherwise, without a firmware image, this option can be
26ccd9
-	used to manually arm a device for firmware activate.
26ccd9
+	used to manually arm a device for firmware activate. When a
26ccd9
+	device transitions from unarmed to armed the platform recalculates the
26ccd9
+	firmware activation time and compares it against the maximum platform
26ccd9
+	supported time. If the activation time would exceed the platform maximum the
26ccd9
+	arm attempt is aborted:
26ccd9
+
26ccd9
+[verse]
26ccd9
+ndctl update-firmware --arm --bus=nfit_test.0 all
26ccd9
+  Error: update firmware: nmem4: arm aborted, tripped overflow
26ccd9
+[
26ccd9
+  {
26ccd9
+    "dev":"nmem1",
26ccd9
+    "id":"cdab-0a-07e0-ffffffff",
26ccd9
+    "handle":"0",
26ccd9
+    "phys_id":"0",
26ccd9
+    "security":"disabled",
26ccd9
+    "firmware":{
26ccd9
+      "current_version":"0",
26ccd9
+      "can_update":true
26ccd9
+    }
26ccd9
+  },
26ccd9
+  {
26ccd9
+    "dev":"nmem3",
26ccd9
+    "id":"cdab-0a-07e0-fffeffff",
26ccd9
+    "handle":"0x100",
26ccd9
+    "phys_id":"0x2",
26ccd9
+    "security":"disabled",
26ccd9
+    "firmware":{
26ccd9
+      "current_version":"0",
26ccd9
+      "can_update":true
26ccd9
+    }
26ccd9
+  },
26ccd9
+  {
26ccd9
+    "dev":"nmem2",
26ccd9
+    "id":"cdab-0a-07e0-feffffff",
26ccd9
+    "handle":"0x1",
26ccd9
+    "phys_id":"0x1",
26ccd9
+    "security":"disabled",
26ccd9
+    "firmware":{
26ccd9
+      "current_version":"0",
26ccd9
+      "can_update":true
26ccd9
+    }
26ccd9
+  }
26ccd9
+]
26ccd9
+updated 3 nmems.
26ccd9
+
26ccd9
+	It is possible, but not recommended, to ignore timeout overflows
26ccd9
+	with the --force option. At any point to view the 'armed' state of the
26ccd9
+	bus do:
26ccd9
+
26ccd9
+[verse]
26ccd9
+ndctl list -BF -b nfit_test.0
26ccd9
+[
26ccd9
+  {
26ccd9
+    "provider":"nfit_test.0",
26ccd9
+    "dev":"ndbus2",
26ccd9
+    "scrub_state":"idle",
26ccd9
+    "firmware":{
26ccd9
+      "activate_method":"suspend",
26ccd9
+      "activate_state":"overflow"
26ccd9
+    }
26ccd9
+  }
26ccd9
+]
26ccd9
 
26ccd9
 -D::
26ccd9
 --disarm::
26ccd9
-- 
26ccd9
2.27.0
26ccd9