netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Ivan Vecera <ivecera@redhat.com>
Cc: netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Prathosh Satish <Prathosh.Satish@microchip.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Schmidt <mschmidt@redhat.com>,
	Petr Oros <poros@redhat.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [PATCH net-next v3 5/5] dpll: zl3073x: Implement devlink flash callback
Date: Fri, 29 Aug 2025 16:56:38 -0700	[thread overview]
Message-ID: <20250829165638.3b50ea2a@kernel.org> (raw)
In-Reply-To: <e7a5ee37-993a-4bba-b69e-6c8a7c942af8@redhat.com>

On Fri, 29 Aug 2025 16:49:22 +0200 Ivan Vecera wrote:
> >> +		/* Leave flashing mode */
> >> +		zl3073x_flash_mode_leave(zldev, extack);
> >> +	}
> >> +
> >> +	/* Restart normal operation */
> >> +	rc = zl3073x_dev_start(zldev, true);
> >> +	if (rc)
> >> +		dev_warn(zldev->dev, "Failed to re-start normal operation\n");  
> > 
> > And also we can't really cleanly handle the failure case.
> > 
> > This is why I was speculating about implementing the down/up portion
> > in the devlink core. Add a flag that the driver requires reload_down
> > to be called before the flashing operation, and reload_up after.
> > This way not only core handles some of the error handling, but also
> > it can mark the device as reload_failed if things go sideways, which
> > is a nicer way to surface this sort of permanent error state.  
> 
> This makes sense... The question is if this should reuse existing
> .reload_down and .reload_up callbacks let's say with new devlink action
> DEVLINK_RELOAD_ACTION_FW_UPDATE or rather introduce new callbacks
> .flash_update_down/_up() to avoid confusions.

Whatever makes sense for your driver, for now. I'm assuming both ops
are the same, otherwise you wouldn't be asking? It should be trivial
for someone add the extra ops later, and just hook them both up to the
same functions in existing drivers.

  reply	other threads:[~2025-08-29 23:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 17:44 [PATCH net-next v3 0/5] dpll: zl3073x: Add support for devlink flash Ivan Vecera
2025-08-13 17:44 ` [PATCH net-next v3 1/5] dpll: zl3073x: Add functions to access hardware registers Ivan Vecera
2025-08-13 17:44 ` [PATCH net-next v3 2/5] dpll: zl3073x: Add low-level flash functions Ivan Vecera
2025-08-13 17:44 ` [PATCH net-next v3 3/5] dpll: zl3073x: Add firmware loading functionality Ivan Vecera
2025-08-19  2:22   ` Jakub Kicinski
2025-08-29 10:39     ` Ivan Vecera
2025-08-29 23:52       ` Jakub Kicinski
2025-08-20  6:40   ` Dan Carpenter
2025-08-29 10:31     ` Ivan Vecera
2025-08-13 17:44 ` [PATCH net-next v3 4/5] dpll: zl3073x: Refactor DPLL initialization Ivan Vecera
2025-08-13 17:44 ` [PATCH net-next v3 5/5] dpll: zl3073x: Implement devlink flash callback Ivan Vecera
2025-08-19  2:29   ` Jakub Kicinski
2025-08-29 14:49     ` Ivan Vecera
2025-08-29 23:56       ` Jakub Kicinski [this message]
2025-09-01 16:34         ` Ivan Vecera
2025-09-01 17:05           ` Jakub Kicinski
2025-08-14  9:30 ` [PATCH net-next v3 0/5] dpll: zl3073x: Add support for devlink flash Przemek Kitszel

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=20250829165638.3b50ea2a@kernel.org \
    --to=kuba@kernel.org \
    --cc=Prathosh.Satish@microchip.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).