Skip to content

Commit 00bb292

Browse files
macris-xiaoPaolo Abeni
authored andcommitted
nfp: compose firmware file name with new hwinfo "nffw.partno"
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent af185d8 commit 00bb292

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/netronome/nfp/nfp_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ nfp_net_fw_find(struct pci_dev *pdev, struct nfp_pf *pf)
410410
return NULL;
411411
}
412412

413-
fw_model = nfp_hwinfo_lookup(pf->hwinfo, "assembly.partno");
413+
fw_model = nfp_hwinfo_lookup(pf->hwinfo, "nffw.partno");
414+
if (!fw_model)
415+
fw_model = nfp_hwinfo_lookup(pf->hwinfo, "assembly.partno");
414416
if (!fw_model) {
415417
dev_err(&pdev->dev, "Error: can't read part number\n");
416418
return NULL;

0 commit comments

Comments
 (0)