All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Nelson <shannon.nelson@amd.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>,
	<kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>
Cc: <f.fainelli@gmail.com>, <brett.creeley@amd.com>,
	<drivers@pensando.io>, Shannon Nelson <shannon.nelson@amd.com>
Subject: [PATCH net-next 2/5] ionic: set ionic ptr before setting up ethtool ops
Date: Mon, 4 Dec 2023 13:09:33 -0800	[thread overview]
Message-ID: <20231204210936.16587-3-shannon.nelson@amd.com> (raw)
In-Reply-To: <20231204210936.16587-1-shannon.nelson@amd.com>

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>
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


  parent reply	other threads:[~2023-12-04 21:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 21:09 [PATCH net-next 0/5] ionic: more driver fixes Shannon Nelson
2023-12-04 21:09 ` [PATCH net-next 1/5] ionic: Use cached VF attributes Shannon Nelson
2023-12-04 21:09 ` Shannon Nelson [this message]
2023-12-04 21:09 ` [PATCH net-next 3/5] ionic: Don't check null when calling vfree() Shannon Nelson
2023-12-04 21:09 ` [PATCH net-next 4/5] ionic: Make the check for Tx HW timestamping more obvious Shannon Nelson
2023-12-04 21:09 ` [PATCH net-next 5/5] ionic: Re-arrange ionic_intr_info struct for cache perf Shannon Nelson
2023-12-05  4:32 ` [PATCH net-next 0/5] ionic: more driver fixes Rahul Rameshbabu
2023-12-06  6:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231204210936.16587-3-shannon.nelson@amd.com \
    --to=shannon.nelson@amd.com \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=drivers@pensando.io \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.