diff mbox series

[net] nfp: fix the access to management firmware hanging

Message ID 20220829101651.633840-1-simon.horman@corigine.com (mailing list archive)
State Accepted
Commit 642b2122c5df332a6df52dd1f91e552bc4356951
Delegated to: Netdev Maintainers
Headers show
Series [net] nfp: fix the access to management firmware hanging | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-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 fail 1 blamed authors not CCed: sixiang.chen@corigine.com; 4 maintainers not CCed: edumazet@google.com sixiang.chen@corigine.com louis.peens@corigine.com gao.xiao@corigine.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
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 Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 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 Aug. 29, 2022, 10:16 a.m. UTC
From: Gao Xiao <gao.xiao@corigine.com>

When running `ethtool -p` with the old management firmware,
the management firmware resource is not correctly released,
which causes firmware related malfunction: all the access
to management firmware hangs.

It releases the management firmware resource when set id
mode operation is not supported.

Fixes: ccb9bc1dfa44 ("nfp: add 'ethtool --identify' support")
Signed-off-by: Gao Xiao <gao.xiao@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jesse Brandeburg Aug. 30, 2022, 6:42 p.m. UTC | #1
On 8/29/2022 3:16 AM, Simon Horman wrote:
> From: Gao Xiao <gao.xiao@corigine.com>
> 
> When running `ethtool -p` with the old management firmware,
> the management firmware resource is not correctly released,
> which causes firmware related malfunction: all the access
> to management firmware hangs.
> 
> It releases the management firmware resource when set id
> mode operation is not supported.
> 
> Fixes: ccb9bc1dfa44 ("nfp: add 'ethtool --identify' support")
> Signed-off-by: Gao Xiao <gao.xiao@corigine.com>
> Reviewed-by: Louis Peens <louis.peens@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>

Looks sane!

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
patchwork-bot+netdevbpf@kernel.org Aug. 31, 2022, 6:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 29 Aug 2022 12:16:51 +0200 you wrote:
> From: Gao Xiao <gao.xiao@corigine.com>
> 
> When running `ethtool -p` with the old management firmware,
> the management firmware resource is not correctly released,
> which causes firmware related malfunction: all the access
> to management firmware hangs.
> 
> [...]

Here is the summary with links:
  - [net] nfp: fix the access to management firmware hanging
    https://git.kernel.org/netdev/net/c/642b2122c5df

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c
index edd300033735..4cc38799eabc 100644
--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c
+++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c
@@ -507,6 +507,7 @@  int nfp_eth_set_idmode(struct nfp_cpp *cpp, unsigned int idx, bool state)
 	if (nfp_nsp_get_abi_ver_minor(nsp) < 32) {
 		nfp_err(nfp_nsp_cpp(nsp),
 			"set id mode operation not supported, please update flash\n");
+		nfp_eth_config_cleanup_end(nsp);
 		return -EOPNOTSUPP;
 	}