diff mbox series

[net-next] nfp: compose firmware file name with new hwinfo "nffw.partno"

Message ID 20220620103912.46164-1-simon.horman@corigine.com (mailing list archive)
State Accepted
Commit 00bb2920cf6a6ed14100822f0e7feaf5e53a9795
Delegated to: Netdev Maintainers
Headers show
Series [net-next] nfp: compose firmware file name with new hwinfo "nffw.partno" | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 2 maintainers not CCed: fei.qin@corigine.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Simon Horman June 20, 2022, 10:39 a.m. UTC
From: Yu Xiao <yu.xiao@corigine.com>

During initialization of the NFP driver, a file name for loading
application firmware is composed using the NIC's AMDA information and port
type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".

In practice there may be many variants for each NIC type, and many of the
variants relate to assembly components which do not concern the driver and
application firmware implementation. Yet the current scheme leads to a
different application firmware file name for each variant, because they
have different AMDA information.

To reduce proliferation of content-duplicated application firmware images
or symlinks, the NIC's management firmware will only expose differences
between variants that need different application firmware via a newly
introduced hwinfo, "nffw.partno".

Use of the existing hwinfo, "assembly.partno", is maintained in order to
support for NICs with management firmware that does not expose
"nffw.partno".

Signed-off-by: Yu Xiao <yu.xiao@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jakub Kicinski June 21, 2022, 4:47 a.m. UTC | #1
On Mon, 20 Jun 2022 12:39:12 +0200 Simon Horman wrote:
> From: Yu Xiao <yu.xiao@corigine.com>
> 
> During initialization of the NFP driver, a file name for loading
> application firmware is composed using the NIC's AMDA information and port
> type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".
> 
> In practice there may be many variants for each NIC type, and many of the
> variants relate to assembly components which do not concern the driver and
> application firmware implementation. Yet the current scheme leads to a
> different application firmware file name for each variant, because they
> have different AMDA information.
> 
> To reduce proliferation of content-duplicated application firmware images
> or symlinks, the NIC's management firmware will only expose differences
> between variants that need different application firmware via a newly
> introduced hwinfo, "nffw.partno".
> 
> Use of the existing hwinfo, "assembly.partno", is maintained in order to
> support for NICs with management firmware that does not expose
> "nffw.partno".
> 
> Signed-off-by: Yu Xiao <yu.xiao@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>

FWIW:

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
patchwork-bot+netdevbpf@kernel.org June 21, 2022, 11 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 20 Jun 2022 12:39:12 +0200 you wrote:
> From: Yu Xiao <yu.xiao@corigine.com>
> 
> During initialization of the NFP driver, a file name for loading
> application firmware is composed using the NIC's AMDA information and port
> type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".
> 
> In practice there may be many variants for each NIC type, and many of the
> variants relate to assembly components which do not concern the driver and
> application firmware implementation. Yet the current scheme leads to a
> different application firmware file name for each variant, because they
> have different AMDA information.
> 
> [...]

Here is the summary with links:
  - [net-next] nfp: compose firmware file name with new hwinfo "nffw.partno"
    https://git.kernel.org/netdev/net-next/c/00bb2920cf6a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
index 4f88d17536c3..36b173039024 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c
@@ -410,7 +410,9 @@  nfp_net_fw_find(struct pci_dev *pdev, struct nfp_pf *pf)
 		return NULL;
 	}
 
-	fw_model = nfp_hwinfo_lookup(pf->hwinfo, "assembly.partno");
+	fw_model = nfp_hwinfo_lookup(pf->hwinfo, "nffw.partno");
+	if (!fw_model)
+		fw_model = nfp_hwinfo_lookup(pf->hwinfo, "assembly.partno");
 	if (!fw_model) {
 		dev_err(&pdev->dev, "Error: can't read part number\n");
 		return NULL;