Thread (7 messages) flat view 7 messages, 3 authors, 2021-08-05

Re: [PATCH net-next v4] ptp: ocp: Expose various resources on the timecard.

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-08-05 18:55:31

On Thu, 5 Aug 2021 10:26:23 -0700 Jonathan Lemon wrote:
quoted
quoted
We're not talking to the flash yet.  We're writing a new image, but don't
know the image version, since it's not accessible from the FPGA blob.  So
since we're don't know what the stored image is until we reboot, I've set
it to 'pending' here - aka "pending reboot".  Could also be "unknown".  
Having the driver remember that the device was flashed is not a solid
indication that the image is actually different. It may be that user
flashed the same version, driver may get reloaded and lose the
indication.. Let's not make a precedent for (ab) use of the version
field to indicate reset required.  
I'd like to have some way to remind/tell the user that a reset is required.

Right now, I can only get the running version from the FPGA register, so
after flashing, there's no way for me to know what's on the flash (or if 
the flash write failed).  Setting "pending" or "reboot" works for most
cases - but obviously fails if the driver is reloaded. 

But most users won't do rmmod/insmod, just a reboot.
I appreciate the problem of knowing if FW activation is required exists
but the way devlink API is intending to solve it is by displaying the
actual versions. Version entries are for carrying versions, not
arbitrary information.

If we assume driver does not get re-initialized / kernel kexeced etc.
we can assume other things, like for example that nothing will mess
with the filesystem. Ergo the flashing process can create a file in 
a well known location on the FS to indicate that reset is pending..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help