All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Habets <habetsm.xilinx@gmail.com>
To: kuba@kernel.org, edumazet@google.com, pabeni@redhat.com,
	davem@davemloft.net
Cc: netdev@vger.kernel.org, ecree.xilinx@gmail.com
Subject: [PATCH net-next 6/6] sfc/siena: Reinstate SRIOV init/fini function calls
Date: Wed, 11 May 2022 17:20:25 +0100	[thread overview]
Message-ID: <165228602579.696.13026076797222373028.stgit@palantir17.mph.net> (raw)
In-Reply-To: <165228589518.696.7119477411428288875.stgit@palantir17.mph.net>

They were removed in the first series since they were not used for EF10.
Put that code back for Siena, with the prototypes in siena_sriov.h
since that file is a more applicable place for it.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
---
 drivers/net/ethernet/sfc/siena/efx.c         |   16 ++++++++++++++++
 drivers/net/ethernet/sfc/siena/siena_sriov.h |    3 +++
 2 files changed, 19 insertions(+)

diff --git a/drivers/net/ethernet/sfc/siena/efx.c b/drivers/net/ethernet/sfc/siena/efx.c
index 01809666a3d1..63d999e63960 100644
--- a/drivers/net/ethernet/sfc/siena/efx.c
+++ b/drivers/net/ethernet/sfc/siena/efx.c
@@ -32,6 +32,9 @@
 #include "io.h"
 #include "selftest.h"
 #include "sriov.h"
+#ifdef CONFIG_SFC_SIENA_SRIOV
+#include "siena_sriov.h"
+#endif
 
 #include "mcdi_port_common.h"
 #include "mcdi_pcol.h"
@@ -1271,6 +1274,12 @@ static int __init efx_init_module(void)
 	if (rc)
 		goto err_notifier;
 
+#ifdef CONFIG_SFC_SIENA_SRIOV
+	rc = efx_init_sriov();
+	if (rc)
+		goto err_sriov;
+#endif
+
 	rc = efx_siena_create_reset_workqueue();
 	if (rc)
 		goto err_reset;
@@ -1284,6 +1293,10 @@ static int __init efx_init_module(void)
  err_pci:
 	efx_siena_destroy_reset_workqueue();
  err_reset:
+#ifdef CONFIG_SFC_SIENA_SRIOV
+	efx_fini_sriov();
+ err_sriov:
+#endif
 	unregister_netdevice_notifier(&efx_netdev_notifier);
  err_notifier:
 	return rc;
@@ -1295,6 +1308,9 @@ static void __exit efx_exit_module(void)
 
 	pci_unregister_driver(&efx_pci_driver);
 	efx_siena_destroy_reset_workqueue();
+#ifdef CONFIG_SFC_SIENA_SRIOV
+	efx_fini_sriov();
+#endif
 	unregister_netdevice_notifier(&efx_netdev_notifier);
 
 }
diff --git a/drivers/net/ethernet/sfc/siena/siena_sriov.h b/drivers/net/ethernet/sfc/siena/siena_sriov.h
index 69a7a18e9ba0..50f6e924495e 100644
--- a/drivers/net/ethernet/sfc/siena/siena_sriov.h
+++ b/drivers/net/ethernet/sfc/siena/siena_sriov.h
@@ -60,6 +60,9 @@ static inline bool efx_siena_sriov_enabled(struct efx_nic *efx)
 {
 	return efx->vf_init_count != 0;
 }
+
+int efx_init_sriov(void);
+void efx_fini_sriov(void);
 #else /* !CONFIG_SFC_SIENA_SRIOV */
 static inline bool efx_siena_sriov_enabled(struct efx_nic *efx)
 {


  parent reply	other threads:[~2022-05-11 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 16:19 [PATCH net-next 0/6]: Make sfc-siena.ko specific to Siena Martin Habets
2022-05-11 16:19 ` [PATCH net-next 1/6] siena: Make MTD support specific for Siena Martin Habets
2022-05-11 16:19 ` [PATCH net-next 2/6] siena: Make SRIOV " Martin Habets
2022-05-11 16:19 ` [PATCH net-next 3/6] siena: Make HWMON " Martin Habets
2022-05-11 16:20 ` [PATCH net-next 4/6] sfc/siena: Make MCDI logging " Martin Habets
2022-05-11 16:20 ` [PATCH net-next 5/6] sfc/siena: Make PTP and reset " Martin Habets
2022-05-11 16:20 ` Martin Habets [this message]
2022-05-13  0:10 ` [PATCH net-next 0/6]: Make sfc-siena.ko specific to Siena 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=165228602579.696.13026076797222373028.stgit@palantir17.mph.net \
    --to=habetsm.xilinx@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.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.