netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] nfp: compose firmware file name with new hwinfo "nffw.partno"
@ 2022-06-20 10:39 Simon Horman
  2022-06-21  4:47 ` Jakub Kicinski
  2022-06-21 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Horman @ 2022-06-20 10:39 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski, Paolo Abeni; +Cc: netdev, oss-drivers, Yu Xiao

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(-)

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;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] nfp: compose firmware file name with new hwinfo "nffw.partno"
  2022-06-20 10:39 [PATCH net-next] nfp: compose firmware file name with new hwinfo "nffw.partno" Simon Horman
@ 2022-06-21  4:47 ` Jakub Kicinski
  2022-06-21 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-06-21  4:47 UTC (permalink / raw)
  To: Simon Horman; +Cc: David Miller, Paolo Abeni, netdev, oss-drivers, Yu Xiao

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] nfp: compose firmware file name with new hwinfo "nffw.partno"
  2022-06-20 10:39 [PATCH net-next] nfp: compose firmware file name with new hwinfo "nffw.partno" Simon Horman
  2022-06-21  4:47 ` Jakub Kicinski
@ 2022-06-21 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-21 11:00 UTC (permalink / raw)
  To: Simon Horman; +Cc: davem, kuba, pabeni, netdev, oss-drivers, yu.xiao

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-21 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-20 10:39 [PATCH net-next] nfp: compose firmware file name with new hwinfo "nffw.partno" Simon Horman
2022-06-21  4:47 ` Jakub Kicinski
2022-06-21 11:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).