All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Chopra <manishc@marvell.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Ariel Elior <aelior@marvell.com>, Alok Prasad <palok@marvell.com>,
	Prabhakar Kushwaha <pkushwaha@marvell.com>,
	"David S. Miller" <davem@davemloft.net>,
	Greg KH <gregkh@linuxfoundation.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"it+netdev@molgen.mpg.de" <it+netdev@molgen.mpg.de>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: RE: [EXT] Re: [PATCH v2 net-next 1/2] bnx2x: Utilize firmware 7.13.21.0
Date: Fri, 11 Mar 2022 12:11:45 +0000	[thread overview]
Message-ID: <BY3PR18MB46124F3F575F9F7D1980E76BAB0C9@BY3PR18MB4612.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CAHk-=whXCf43ieh79fujcF=u3Ow1byRvWp+Lt5+v3vumA+V0yA@mail.gmail.com>

> -----Original Message-----
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Sent: Thursday, March 10, 2022 3:48 AM
> To: Manish Chopra <manishc@marvell.com>
> Cc: Paul Menzel <pmenzel@molgen.mpg.de>; kuba@kernel.org;
> netdev@vger.kernel.org; Ariel Elior <aelior@marvell.com>; Alok Prasad
> <palok@marvell.com>; Prabhakar Kushwaha <pkushwaha@marvell.com>;
> David S. Miller <davem@davemloft.net>; Greg KH
> <gregkh@linuxfoundation.org>; stable@vger.kernel.org;
> it+netdev@molgen.mpg.de; regressions@lists.linux.dev
> Subject: Re: [EXT] Re: [PATCH v2 net-next 1/2] bnx2x: Utilize firmware
> 7.13.21.0
> 
> On Wed, Mar 9, 2022 at 11:46 AM Manish Chopra <manishc@marvell.com>
> wrote:
> >
> > This has not changed anything functionally from driver/device perspective,
> FW is still being loaded only when device is opened.
> > bnx2x_init_firmware() [I guess, perhaps the name is misleading] just
> request_firmware() to prepare the metadata to be used when device will be
> opened.
> 
> So how do you explain the report by Paul Menzel that things used to work and
> no longer work now?
> 

The issue which Paul mentioned had to do with "/lib/firmware/bnx2x/* file not found" when driver probes, which was introduced by the patch in subject,
And the commit e13ad1443684 ("bnx2x: fix driver load from initrd") fixes this issue. So things should work as it is with the mentioned fixed commit.
The only discussion led by this problem now is why the request_firmware() was moved early on [from open() to probe()] by the patch in subject.
I explained the intention to do this in my earlier emails and let me add more details below - 

Note that we have just moved request_firmware() logic, *not* something significant which has to do with actual FW loading or device initialization from the
FW file data which could cause significant functional change for this device/driver, FW load/init part still stays in open flow.

Before the patch in subject, driver used to only work with fixed/specific FW version file whose version was statically known to the driver function at probe() time to take
some decision to fail the function probe early in the system if the function is supposed to run with a FW version which is not the same version loaded on the device by another PF (different ENV).
Now when we sent this new FW patch (in subject) then we got feedback from community to maintain backward compatibility with older FW versions as well and we did it in same v2 patch legitimately,
just that now we can work with both older or newer FW file so we need this run time FW version information to cache (based on request_firmware() return success value for an old FW file or new FW file)
which will be used in follow up probe() flows to decide the function probe failure early If there could be FW version mismatches against the loaded FW on the device by other PFs already

So we need to understand why we should not call request_firmware() in probe or at least what's really harmful in doing that in probe() if some of the follow up probe flows needs
some of the metadata info (like the run time FW versions info in this case which we get based on request_firmware() return value), we could avoid this but we don't want
to add some ugly/unsuitable file APIs checks to know which FW version file is available on the file system if there is already an API request_firmware() available for this to be used.

Please let us know. Thanks.

> You can't do request_firmware() early. When you actually then push the
> firmware to the device is immaterial - but request_firmware() has to be done
> after the system is up and running.
> 
>                  Linus


  parent reply	other threads:[~2022-03-11 12:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 16:55 [PATCH v2 net-next 1/2] bnx2x: Utilize firmware 7.13.21.0 Manish Chopra
2021-12-17 16:55 ` [PATCH v2 net-next 2/2] bnx2x: Invalidate fastpath HSI version for VFs Manish Chopra
2022-03-09 16:15 ` [PATCH v2 net-next 1/2] bnx2x: Utilize firmware 7.13.21.0 Paul Menzel
2022-03-09 16:18   ` Paul Menzel
2022-03-09 16:35     ` Jakub Kicinski
2022-03-10 10:13     ` Thorsten Leemhuis
2022-03-11 13:09       ` [PATCH v2 net-next 1/2] bnx2x: Utilize firmware 7.13.21.0 #forregzbot Thorsten Leemhuis
2022-03-09 16:46   ` [EXT] Re: [PATCH v2 net-next 1/2] bnx2x: Utilize firmware 7.13.21.0 Manish Chopra
2022-03-09 18:00     ` Paul Menzel
2022-03-09 19:22       ` Manish Chopra
2022-03-09 19:24         ` Linus Torvalds
2022-03-09 19:46           ` Manish Chopra
2022-03-09 22:18             ` Linus Torvalds
2022-03-10 18:52               ` Jakub Kicinski
2022-03-10 19:14                 ` Ariel Elior
2022-03-10 19:42                   ` Jakub Kicinski
2022-03-11 12:11               ` Manish Chopra [this message]
2022-03-11 12:52                 ` Greg KH
2022-03-11 13:00                 ` Paul Menzel
2022-03-14 14:36                 ` Donald Buczek
2022-03-14 15:07                   ` Paul Menzel
2022-03-15  2:57                     ` Jakub Kicinski
2022-03-16 17:14                       ` Paul Menzel
2022-03-16 11:23                     ` Manish Chopra

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=BY3PR18MB46124F3F575F9F7D1980E76BAB0C9@BY3PR18MB4612.namprd18.prod.outlook.com \
    --to=manishc@marvell.com \
    --cc=aelior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=it+netdev@molgen.mpg.de \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=palok@marvell.com \
    --cc=pkushwaha@marvell.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.