aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGravatar Shannon Nelson <shannon.nelson@amd.com> 2023-12-04 13:09:33 -0800
committerGravatar Jakub Kicinski <kuba@kernel.org> 2023-12-05 20:49:50 -0800
commit46ca79d28fd7f2bbccf226fc0be59c2bd8d63dfe (patch)
tree0b06f2c539623f1d838ac5e3f97b06d6091843ad /drivers
parentionic: Use cached VF attributes (diff)
downloadlinux-46ca79d28fd7f2bbccf226fc0be59c2bd8d63dfe.tar.gz
linux-46ca79d28fd7f2bbccf226fc0be59c2bd8d63dfe.tar.bz2
linux-46ca79d28fd7f2bbccf226fc0be59c2bd8d63dfe.zip
ionic: set ionic ptr before setting up ethtool ops
Set the lif->ionic value that is used in some ethtool callbacks before setting ethtool ops. There really shouldn't be any race issues before this change since the netdev hasn't been registered yet, but this seems more correct. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com> Link: https://lore.kernel.org/r/20231204210936.16587-3-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_lif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index afb77e2d04c5..a5e6b1e2f5ee 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -3054,6 +3054,7 @@ int ionic_lif_alloc(struct ionic *ionic)
lif = netdev_priv(netdev);
lif->netdev = netdev;
ionic->lif = lif;
+ lif->ionic = ionic;
netdev->netdev_ops = &ionic_netdev_ops;
ionic_ethtool_set_ops(netdev);
@@ -3076,7 +3077,6 @@ int ionic_lif_alloc(struct ionic *ionic)
lif->neqs = ionic->neqs_per_lif;
lif->nxqs = ionic->ntxqs_per_lif;
- lif->ionic = ionic;
lif->index = 0;
if (is_kdump_kernel()) {