diff mbox series

[net-next,6/6] ptp: ocp: Remove pending_image indicator from devlink

Message ID 20210805195248.35665-7-jonathan.lemon@gmail.com (mailing list archive)
State Accepted
Commit 8ef8ccbc69677e663925f3e758b077d1ad3cd836
Delegated to: Netdev Maintainers
Headers show
Series ptp: ocp: assorted fixes. | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 2 of 2 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 28 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Jonathan Lemon Aug. 5, 2021, 7:52 p.m. UTC
After writing an image blob to the flash memory, a reboot is required
to reload the FPGA.  There is no versioning prsent in the FPGA image
file, so only a running version is available.  The 'stored version'
was set to 'pending' in order to indicate a reboot was needed.

This isn't reliable, as the module could be unloaded/loaded, losing
the "reboot needed" indicator.  Also, the devlink 'stored version'
information is designed to refer to the actual image version.

Unfortunately, there is no method to determine the flash image version
other than booting it, so remove the devlink stored version setting.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
---
 drivers/ptp/ptp_ocp.c | 10 ----------
 1 file changed, 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 1412015fd261..6b9c14586987 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -171,7 +171,6 @@  struct ptp_ocp {
 	u8			serial[6];
 	int			flash_start;
 	bool			has_serial;
-	bool			pending_image;
 };
 
 struct ocp_resource {
@@ -836,8 +835,6 @@  ptp_ocp_devlink_flash_update(struct devlink *devlink,
 	msg = err ? "Flash error" : "Flash complete";
 	devlink_flash_update_status_notify(devlink, msg, NULL, 0, 0);
 
-	bp->pending_image = true;
-
 	put_device(dev);
 	return err;
 }
@@ -854,13 +851,6 @@  ptp_ocp_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,
 	if (err)
 		return err;
 
-	if (bp->pending_image) {
-		err = devlink_info_version_stored_put(req,
-						      "timecard", "pending");
-		if (err)
-			return err;
-	}
-
 	if (bp->image) {
 		u32 ver = ioread32(&bp->image->version);