Skip to content

Commit 3ddf652

Browse files
Erni Sri Satya Vennelagregkh
authored andcommitted
net: mana: Move current_speed debugfs file to mana_init_port()
[ Upstream commit 3b7c7fc ] Move the current_speed debugfs file creation from mana_probe_port() to mana_init_port(). The file was previously created only during initial probe, but mana_cleanup_port_context() removes the entire vPort debugfs directory during detach/attach cycles. Since mana_init_port() recreates the directory on re-attach, moving current_speed here ensures it survives these cycles. Fixes: 75cabb4 ("net: mana: Add support for net_shaper_ops") Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260408081224.302308-3-ernis@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 90ebf3e commit 3ddf652

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/ethernet/microsoft/mana/mana_en.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,6 +3038,8 @@ static int mana_init_port(struct net_device *ndev)
30383038
eth_hw_addr_set(ndev, apc->mac_addr);
30393039
sprintf(vport, "vport%d", port_idx);
30403040
apc->mana_port_debugfs = debugfs_create_dir(vport, gc->mana_pci_debugfs);
3041+
debugfs_create_u32("current_speed", 0400, apc->mana_port_debugfs,
3042+
&apc->speed);
30413043
return 0;
30423044

30433045
reset_apc:
@@ -3310,8 +3312,6 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,
33103312

33113313
netif_carrier_on(ndev);
33123314

3313-
debugfs_create_u32("current_speed", 0400, apc->mana_port_debugfs, &apc->speed);
3314-
33153315
return 0;
33163316

33173317
free_indir:

0 commit comments

Comments
 (0)