Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonathan Lemon <jonathan.lemon@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, richardcochran@gmail.com
Cc: netdev@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH net-next 6/6] ptp: ocp: Remove pending_image indicator from devlink
Date: Thu,  5 Aug 2021 12:52:48 -0700	[thread overview]
Message-ID: <20210805195248.35665-7-jonathan.lemon@gmail.com> (raw)
In-Reply-To: <20210805195248.35665-1-jonathan.lemon@gmail.com>

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 --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);
 
-- 
2.31.1


  parent reply	other threads:[~2021-08-05 19:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 19:52 [PATCH net-next 0/6] ptp: ocp: assorted fixes Jonathan Lemon
2021-08-05 19:52 ` [PATCH net-next 1/6] ptp: ocp: Fix the error handling path for the class device Jonathan Lemon
2021-08-05 19:52 ` [PATCH net-next 2/6] ptp: ocp: Add the mapping for the external PPS registers Jonathan Lemon
2021-08-05 19:52 ` [PATCH net-next 3/6] ptp: ocp: Remove devlink health and unused parameters Jonathan Lemon
2021-08-05 19:52 ` [PATCH net-next 4/6] ptp: ocp: Use 'gnss' naming instead of 'gps' Jonathan Lemon
2021-08-05 19:52 ` [PATCH net-next 5/6] ptp: ocp: Rename version string shown by devlink Jonathan Lemon
2021-08-05 19:52 ` Jonathan Lemon [this message]
2021-08-06 10:00 ` [PATCH net-next 0/6] ptp: ocp: assorted fixes patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210805195248.35665-7-jonathan.lemon@gmail.com \
    --to=jonathan.lemon@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --subject='Re: [PATCH net-next 6/6] ptp: ocp: Remove pending_image indicator from devlink' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).