netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elad Nachman <enachman@marvell.com>
To: "Köry Maincent" <kory.maincent@bootlin.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Taras Chornyi <taras.chornyi@plvision.eu>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: RE: [EXT] Prestera driver fail to probe twice
Date: Wed, 7 Feb 2024 10:56:29 +0000	[thread overview]
Message-ID: <BN9PR18MB42510F2EA6F4091E5CA3B409DB452@BN9PR18MB4251.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20240207112231.2d555d3e@kmaincent-XPS-13-7390>



> -----Original Message-----
> From: Köry Maincent <kory.maincent@bootlin.com>
> Sent: Wednesday, February 7, 2024 12:23 PM
> To: Elad Nachman <enachman@marvell.com>
> Cc: netdev@vger.kernel.org; Taras Chornyi <taras.chornyi@plvision.eu>;
> Thomas Petazzoni <thomas.petazzoni@bootlin.com>; Miquel Raynal
> <miquel.raynal@bootlin.com>
> Subject: Re: [EXT] Prestera driver fail to probe twice
> 
> On Tue, 6 Feb 2024 18:30:33 +0000
> Elad Nachman <enachman@marvell.com> wrote:
> 
> > Sorry, that's not how this works.
> >
> > The firmware CPU loader will only reload if the firmware crashed or exit.
> >
> > Hence, insmod on the host side will fail, as the firmware side loader
> > is not waiting For the host to send a new firmware, but first for the
> > existing firmware to exit.
> 
> With the current implementation we can't rmmod/insmod the driver.
> Also, in case of deferring probe the same problem appears and the driver will
> never probe. I don't think this is a good behavior.
> 
> Isn't it possible to verify that the firmware has already been sent and is
> working well at the probe time? Then we wouldn't try to flash it.

Everything is possible, but that is the way the firmware interface was initially designed.
Changing this will break compatibility with board already deployed in the field.

> 
> Or stop the firmware at remove time and in case of probe defer.
> 
> > By design, the way to load new firmware is by resetting both CPUs
> > (this should be covered by CPLD).
> 
> Are you saying the only way to stop the firmware is to shutdown the CPU?

Yes, that is the current design.

> As ask above, can't we know if the firmware has already been load?

Once again, this will break compatibility with boards deployed on the field.

> 
> > Can you please explain:
> >
> > 1. What kind of HW / board are you trying this on?
> > 2. Who is the customer requesting  this?
> > 3. What is the design purpose of this change?
> 
> I have no particular request for that.
> I was debugging a PoE controller driver that the prestera was depending on, I
> was playing with these in a module state to verify the kref free.
> 
> Regards,
> --
> Köry Maincent, Bootlin
> Embedded Linux and kernel engineering
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__bootlin.com&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=eTeNTLEK5-
> TxXczjOcKPhANIFtlB9pP4lq9qhdlFrwQ&m=piWh4FT_ehOSBh66-
> WPooytouhKWszNmhcmZntCWpXSN-
> bUQK8Rts1fLTasbqFlu&s=F4Le7TOKKleZMOYJWQtVbUOZlXRh9TeK9JP_hLDDln
> c&e=

  reply	other threads:[~2024-02-07 10:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 15:54 Prestera driver fail to probe twice Köry Maincent
2024-02-06 18:30 ` [EXT] " Elad Nachman
2024-02-07 10:22   ` Köry Maincent
2024-02-07 10:56     ` Elad Nachman [this message]
2024-02-07 11:28       ` Köry Maincent
2024-02-07 12:24         ` Elad Nachman
2024-02-07 14:31           ` Köry Maincent
2024-02-07 15:06             ` Elad Nachman
2024-02-07 18:31               ` Jakub Kicinski
2024-02-08  7:36                 ` Elad Nachman
2024-02-08 15:37                   ` Jakub Kicinski
2024-02-13  0:29                     ` Jakub Kicinski
2024-02-07 23:32 ` Andrew Lunn
2024-02-08  9:10   ` Köry Maincent
2024-02-08 14:56     ` Andrew Lunn

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=BN9PR18MB42510F2EA6F4091E5CA3B409DB452@BN9PR18MB4251.namprd18.prod.outlook.com \
    --to=enachman@marvell.com \
    --cc=kory.maincent@bootlin.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=taras.chornyi@plvision.eu \
    --cc=thomas.petazzoni@bootlin.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).