All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Chopra <manishc@marvell.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Donald Buczek <buczek@molgen.mpg.de>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Ariel Elior <aelior@marvell.com>,
	"it+netdev@molgen.mpg.de" <it+netdev@molgen.mpg.de>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: RE: [EXT] bnx2x: How to log the firmware version? (was: [RFC net] bnx2x: fix built-in kernel driver load failure)
Date: Wed, 16 Mar 2022 22:03:18 +0000	[thread overview]
Message-ID: <BY3PR18MB46126FF9D9C3F244D6EFB898AB119@BY3PR18MB4612.namprd18.prod.outlook.com> (raw)
In-Reply-To: <cb7d704a-60bd-a06f-6511-95889bc0bc5f@molgen.mpg.de>

> -----Original Message-----
> From: Paul Menzel <pmenzel@molgen.mpg.de>
> Sent: Thursday, March 17, 2022 2:06 AM
> To: Manish Chopra <manishc@marvell.com>
> Cc: Donald Buczek <buczek@molgen.mpg.de>; Jakub Kicinski
> <kuba@kernel.org>; netdev@vger.kernel.org; Ariel Elior
> <aelior@marvell.com>; it+netdev@molgen.mpg.de;
> regressions@lists.linux.dev
> Subject: [EXT] bnx2x: How to log the firmware version? (was: [RFC net] bnx2x:
> fix built-in kernel driver load failure)
> 
> External Email
> 
> ----------------------------------------------------------------------
> Dear Manish,
> 
> 
> Thank you for your answer.
> 
> Am 16.03.22 um 19:25 schrieb Manish Chopra:
> 
> >> -----Original Message-----
> >> From: Paul Menzel <pmenzel@molgen.mpg.de>
> 
> […]
> 
> >> Hmm, with `CONFIG_BNX2X=y` and `bnx2x.debug=0x0100000`, bringing up
> >> net05 (.1) and then net04 (.0), I only see:
> >>
> >>       [ 3333.883697] bnx2x: [bnx2x_compare_fw_ver:2378(net04)]loaded
> >> fw f0d07 major 7 minor d rev f eng 0
> >
> > I think this print is not good probably  (that's why it is default
> > disabled), it’s not really the firmware driver is supposed to work
> > with (it is something which was already loaded by any other PF
> > somewhere or some residue from earlier loads),
> Still interesting, when handling firmware files, and trying to wrap ones head
> around the different versions flying around.
> 
> > driver is always going to work with the firmware it gets from
> > request_firmware(). I suggest you to enable below prints to know about
> > which FW driver is going to work with. Perhaps, I will enable below
> > default.
> >
> >          BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
> >
> >          rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev-
> >dev);
> >          if (rc) {
> >                  BNX2X_DEV_INFO("Trying to load older fw %s\n",
> > fw_file_name_v15);
> 
> Indeed, after figuring out to enable `BNX2X_DEV_INFO()` by the probe flag 0x2
> – so either `bnx2x.debug=0x2` or `ethtool -s net04 msglvl 0x2`, Linux logs:
> 
>      $ dmesg --level=info | grep bnx2x | tail -8
>      [  242.987091] bnx2x 0000:45:00.1: fw_seq 0x0000003b
>      [  242.994144] bnx2x 0000:45:00.1: drv_pulse 0x6404
>      [  243.038239] bnx2x 0000:45:00.1: Loading bnx2x/bnx2x-e1h-7.13.21.0.fw
>      [  243.356284] bnx2x 0000:45:00.1 net05: using MSI-X  IRQs: sp 57 fp[0] 59
> ... fp[7] 66
>      [  571.774061] bnx2x 0000:45:00.0: fw_seq 0x0000003b
>      [  571.781069] bnx2x 0000:45:00.0: drv_pulse 0x2149
>      [  571.799963] bnx2x 0000:45:00.0: Loading bnx2x/bnx2x-e1h-7.13.21.0.fw
>      [  571.811657] bnx2x 0000:45:00.0 net04: using MSI-X  IRQs: sp 46 fp[0] 48
> ... fp[7] 55
>      $ dmesg --level=err | grep bnx2x
>      [  571.979621] bnx2x 0000:45:00.0 net04: Warning: Unqualified SFP+
> module detected, Port 0 from Intel Corp       part number AFBR-703SDZ-IN2
> 
> Maybe the firmware version could be added to the line with the MSI-X and
> IRQ info. Maybe also the old version on the device, which `ethtool -i net04`
> shows.
> 
>      $ ethtool -i net04 | grep firmware
>      firmware-version: 7.8.16 bc 6.2.26 phy aa0.406
> 
> No idea, why ethtool does not show the loaded firmware.

thanks Paul for your questions/suggestions and specially verification of the fix.
I would prefer to enable/adjust or add any new logs in a separate commit (just not to add many things in same commit)
The version you see in ethtool is actually a different firmware called as management firmware (MFW) running on the device.
May be we can check the feasibility of reporting both the FW versions (MFW and FW file version on the host) in ethtool.
Or perhaps MFW in system log and FW file version in ethtool.

Thanks.


      reply	other threads:[~2022-03-16 22:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 11:18 [RFC net] bnx2x: fix built-in kernel driver load failure Manish Chopra
2022-03-16 17:09 ` Paul Menzel
2022-03-16 17:24   ` Paul Menzel
2022-03-16 17:40   ` Thorsten Leemhuis
2022-03-16 18:25   ` Manish Chopra
2022-03-16 20:36     ` bnx2x: How to log the firmware version? (was: [RFC net] bnx2x: fix built-in kernel driver load failure) Paul Menzel
2022-03-16 22:03       ` Manish Chopra [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=BY3PR18MB46126FF9D9C3F244D6EFB898AB119@BY3PR18MB4612.namprd18.prod.outlook.com \
    --to=manishc@marvell.com \
    --cc=aelior@marvell.com \
    --cc=buczek@molgen.mpg.de \
    --cc=it+netdev@molgen.mpg.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=regressions@lists.linux.dev \
    /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.