Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: davem@davemloft.net, richardcochran@gmail.com,
	kernel-team@fb.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4] ptp: ocp: Expose various resources on the timecard.
Date: Thu, 5 Aug 2021 11:55:28 -0700	[thread overview]
Message-ID: <20210805115528.2308fed6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20210805172623.mwyh4wt3gupfiurd@bsd-mbp.dhcp.thefacebook.com>

On Thu, 5 Aug 2021 10:26:23 -0700 Jonathan Lemon wrote:
> > > 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..

      reply	other threads:[~2021-08-05 18:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  3:33 Jonathan Lemon
2021-08-04 14:16 ` Richard Cochran
2021-08-04 21:09 ` Jakub Kicinski
2021-08-04 23:52   ` Jonathan Lemon
2021-08-05 13:03     ` Jakub Kicinski
2021-08-05 17:26       ` Jonathan Lemon
2021-08-05 18:55         ` Jakub Kicinski [this message]

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=20210805115528.2308fed6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=jonathan.lemon@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --subject='Re: [PATCH net-next v4] ptp: ocp: Expose various resources on the timecard.' \
    /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).