Blob Blame History Raw
From 475cb041a97d3c7140efd1b0cda820fb22b69d11 Mon Sep 17 00:00:00 2001
From: Dan Williams <dan.j.williams@intel.com>
Date: Wed, 5 Jan 2022 13:31:44 -0800
Subject: [PATCH 069/217] ndctl/docs: Clarify update-firwmware activation
 'overflow' conditions

Give examples and remediation for "overflow" events, i.e. where the
estimated time to complete activation exceeds the platform advertised
maximum. When that happens forced activation can lead to undefined results.

Link: https://lore.kernel.org/r/164141830490.3990253.6263569501446070716.stgit@dwillia2-desk3.amr.corp.intel.com
Tested-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 Documentation/ndctl/ndctl-update-firmware.txt | 64 ++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/Documentation/ndctl/ndctl-update-firmware.txt b/Documentation/ndctl/ndctl-update-firmware.txt
index 1080d62..6166457 100644
--- a/Documentation/ndctl/ndctl-update-firmware.txt
+++ b/Documentation/ndctl/ndctl-update-firmware.txt
@@ -58,7 +58,69 @@ include::xable-bus-options.txt[]
 	Arm a device for firmware activation. This is enabled by default
 	when a firmware image is specified. Specify --no-arm to disable
 	this default. Otherwise, without a firmware image, this option can be
-	used to manually arm a device for firmware activate.
+	used to manually arm a device for firmware activate. When a
+	device transitions from unarmed to armed the platform recalculates the
+	firmware activation time and compares it against the maximum platform
+	supported time. If the activation time would exceed the platform maximum the
+	arm attempt is aborted:
+
+[verse]
+ndctl update-firmware --arm --bus=nfit_test.0 all
+  Error: update firmware: nmem4: arm aborted, tripped overflow
+[
+  {
+    "dev":"nmem1",
+    "id":"cdab-0a-07e0-ffffffff",
+    "handle":"0",
+    "phys_id":"0",
+    "security":"disabled",
+    "firmware":{
+      "current_version":"0",
+      "can_update":true
+    }
+  },
+  {
+    "dev":"nmem3",
+    "id":"cdab-0a-07e0-fffeffff",
+    "handle":"0x100",
+    "phys_id":"0x2",
+    "security":"disabled",
+    "firmware":{
+      "current_version":"0",
+      "can_update":true
+    }
+  },
+  {
+    "dev":"nmem2",
+    "id":"cdab-0a-07e0-feffffff",
+    "handle":"0x1",
+    "phys_id":"0x1",
+    "security":"disabled",
+    "firmware":{
+      "current_version":"0",
+      "can_update":true
+    }
+  }
+]
+updated 3 nmems.
+
+	It is possible, but not recommended, to ignore timeout overflows
+	with the --force option. At any point to view the 'armed' state of the
+	bus do:
+
+[verse]
+ndctl list -BF -b nfit_test.0
+[
+  {
+    "provider":"nfit_test.0",
+    "dev":"ndbus2",
+    "scrub_state":"idle",
+    "firmware":{
+      "activate_method":"suspend",
+      "activate_state":"overflow"
+    }
+  }
+]
 
 -D::
 --disarm::
-- 
2.27.0