Message ID | 20231129175604.1374020-1-sachin.bahadur@intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [iwl-next,v2] ice: Print NIC FW version during init | expand |
On Wed, Nov 29, 2023 at 09:56:04AM -0800, Sachin Bahadur wrote: > Print NIC FW version during PF initialization. FW version in dmesg is used > to identify and isolate issues. Particularly useful when dmesg is read > after reboot. > > Example log from dmesg: > ice 0000:ca:00.0: fw 6.2.9 api 1.7.9 nvm 3.32 0x8000d83e 1.3146.0 > > Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> > Reviewed-by: Pawel Kaminski <pawel.kaminski@intel.com> > Signed-off-by: Sachin Bahadur <sachin.bahadur@intel.com> Is this information available via devlink info? It has a section to report firmware version. Andrew
> From: Andrew Lunn <andrew@lunn.ch> > Sent: Thursday, November 30, 2023 7:57 AM > To: Bahadur, Sachin <sachin.bahadur@intel.com> > Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org > Subject: Re: [PATCH iwl-next v2] ice: Print NIC FW version during init > > On Wed, Nov 29, 2023 at 09:56:04AM -0800, Sachin Bahadur wrote: > > Print NIC FW version during PF initialization. FW version in dmesg is > > used to identify and isolate issues. Particularly useful when dmesg is > > read after reboot. > > > > Example log from dmesg: > > ice 0000:ca:00.0: fw 6.2.9 api 1.7.9 nvm 3.32 0x8000d83e 1.3146.0 > > > > Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> > > Reviewed-by: Pawel Kaminski <pawel.kaminski@intel.com> > > Signed-off-by: Sachin Bahadur <sachin.bahadur@intel.com> > > Is this information available via devlink info? > It has a section to report firmware version. > > Andrew Yes, this info is available via the "devlink dev info" command. Adding this info in dmesg ensures the version information is available when someone is looking at the dmesg log to debug an issue.
> Yes, this info is available via the "devlink dev info" command. > Adding this info in dmesg ensures the version information is > available when someone is looking at the dmesg log to debug an issue. Ideally you would train your users to use devlink info, since you get more useful information, and it should work for any vendors NIC, not just Intel which is spamming the log with firmware versions. Andrew
Thu, Nov 30, 2023 at 07:13:11PM CET, andrew@lunn.ch wrote: >> Yes, this info is available via the "devlink dev info" command. >> Adding this info in dmesg ensures the version information is >> available when someone is looking at the dmesg log to debug an issue. > >Ideally you would train your users to use devlink info, since you get >more useful information, and it should work for any vendors NIC, not >just Intel which is spamming the log with firmware versions. +1 > > Andrew > >
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 1f159b4362ec..71d3d8cfdd1d 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4568,6 +4568,12 @@ static int ice_init_dev(struct ice_pf *pf) dev_err(dev, "ice_init_hw failed: %d\n", err); return err; } + dev_info(dev, "fw %u.%u.%u api %u.%u.%u nvm %u.%u 0x%08x %u.%u.%u\n", + hw->fw_maj_ver, hw->fw_min_ver, hw->fw_patch, hw->api_maj_ver, + hw->api_min_ver, hw->api_patch, hw->flash.nvm.major, + hw->flash.nvm.minor, hw->flash.nvm.eetrack, + hw->flash.orom.major, hw->flash.orom.build, + hw->flash.orom.patch); /* Some cards require longer initialization times * due to necessity of loading FW from an external source.