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

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