net/mlx5e: Don't drop RTNL during firmware flash
authorCosmin Ratiu <cratiu@nvidia.com>
Wed, 21 May 2025 12:09:01 +0000 (15:09 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 May 2025 16:15:04 +0000 (09:15 -0700)
commitd7d4f9f7365a53dc5ae21fd117770e5781caae41
treed62e60f1e6fed83750c8ed52d2b5a797d0d8ff98
parentfd07ba1680ba3c82d6a19a5c8c02af0a42045674
net/mlx5e: Don't drop RTNL during firmware flash

There's no explanation in the original commit of why that was done, but
presumably flashing takes a long time and holding RTNL for so long
blocks other interactions with the netdev layer.

However, the stack is moving towards netdev instance locking and
dropping and reacquiring RTNL in the context of flashing introduces
locking ordering issues: RTNL must be acquired before the netdev
instance lock and released after it.

This patch therefore takes the simpler approach by no longer dropping
and reacquiring the RTNL, as soon RTNL for ethtool will be removed,
leaving only the instance lock to protect against races.

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1747829342-1018757-5-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c