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>
Signed-off-by: David S. Miller <davem@davemloft.net>
u8 serial[6];
int flash_start;
bool has_serial;
- bool pending_image;
};
struct ocp_resource {
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;
}
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);