All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: <linux-net-drivers@solarflare.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH net-next 01/14] sfc: move NIC-specific mcdi_port declarations out of common header
Date: Tue, 30 Jun 2020 13:02:24 +0100	[thread overview]
Message-ID: <ed79646e-3c0e-a3ee-dac2-a86a5b5c257e@solarflare.com> (raw)
In-Reply-To: <14a93b71-3d4e-4663-82be-a2281cd1105e@solarflare.com>

These functions are implemented in mcdi_port.c, which will not be linked
 into the EF100 driver; thus their prototypes should not be visible in
 common header files.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c      |  1 +
 drivers/net/ethernet/sfc/mcdi.h      |  4 ----
 drivers/net/ethernet/sfc/mcdi_port.c |  1 +
 drivers/net/ethernet/sfc/mcdi_port.h | 18 ++++++++++++++++++
 drivers/net/ethernet/sfc/siena.c     |  1 +
 5 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/ethernet/sfc/mcdi_port.h

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index efc49869320f..a3bf9d8023d7 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -10,6 +10,7 @@
 #include "io.h"
 #include "mcdi.h"
 #include "mcdi_pcol.h"
+#include "mcdi_port.h"
 #include "mcdi_port_common.h"
 #include "mcdi_functions.h"
 #include "nic.h"
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index db9746a751d4..10f064f761a5 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -354,15 +354,11 @@ int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out);
 int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id);
 int efx_mcdi_wol_filter_reset(struct efx_nic *efx);
 int efx_mcdi_flush_rxqs(struct efx_nic *efx);
-int efx_mcdi_port_probe(struct efx_nic *efx);
-void efx_mcdi_port_remove(struct efx_nic *efx);
 int efx_mcdi_port_reconfigure(struct efx_nic *efx);
-u32 efx_mcdi_phy_get_caps(struct efx_nic *efx);
 void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev);
 void efx_mcdi_mac_start_stats(struct efx_nic *efx);
 void efx_mcdi_mac_stop_stats(struct efx_nic *efx);
 void efx_mcdi_mac_pull_stats(struct efx_nic *efx);
-bool efx_mcdi_mac_check_fault(struct efx_nic *efx);
 enum reset_type efx_mcdi_map_reset_reason(enum reset_type reason);
 int efx_mcdi_reset(struct efx_nic *efx, enum reset_type method);
 int efx_mcdi_set_workaround(struct efx_nic *efx, u32 type, bool enabled,
diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c
index b807871d8f69..212ff80e923b 100644
--- a/drivers/net/ethernet/sfc/mcdi_port.c
+++ b/drivers/net/ethernet/sfc/mcdi_port.c
@@ -10,6 +10,7 @@
 
 #include <linux/slab.h>
 #include "efx.h"
+#include "mcdi_port.h"
 #include "mcdi.h"
 #include "mcdi_pcol.h"
 #include "nic.h"
diff --git a/drivers/net/ethernet/sfc/mcdi_port.h b/drivers/net/ethernet/sfc/mcdi_port.h
new file mode 100644
index 000000000000..07863ddbe740
--- /dev/null
+++ b/drivers/net/ethernet/sfc/mcdi_port.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/****************************************************************************
+ * Driver for Solarflare network controllers and boards
+ * Copyright 2008-2013 Solarflare Communications Inc.
+ * Copyright 2019-2020 Xilinx Inc.
+ */
+
+#ifndef EFX_MCDI_PORT_H
+#define EFX_MCDI_PORT_H
+
+#include "net_driver.h"
+
+u32 efx_mcdi_phy_get_caps(struct efx_nic *efx);
+bool efx_mcdi_mac_check_fault(struct efx_nic *efx);
+int efx_mcdi_port_probe(struct efx_nic *efx);
+void efx_mcdi_port_remove(struct efx_nic *efx);
+
+#endif /* EFX_MCDI_PORT_H */
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 6462bbe2448a..ffe193f03352 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -21,6 +21,7 @@
 #include "workarounds.h"
 #include "mcdi.h"
 #include "mcdi_pcol.h"
+#include "mcdi_port.h"
 #include "mcdi_port_common.h"
 #include "selftest.h"
 #include "siena_sriov.h"


  reply	other threads:[~2020-06-30 12:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 12:00 [PATCH net-next 00/14] sfc: prerequisites for EF100 driver, part 2 Edward Cree
2020-06-30 12:02 ` Edward Cree [this message]
2020-06-30 12:02 ` [PATCH net-next 02/14] sfc: commonise MCDI MAC stats handling Edward Cree
2020-06-30 12:03 ` [PATCH net-next 03/14] sfc: add missing licence info to mcdi_filters.c Edward Cree
2020-06-30 12:03 ` [PATCH net-next 04/14] sfc: commonise miscellaneous efx functions Edward Cree
2020-06-30 12:11 ` [PATCH net-next 05/14] sfc: commonise some MAC configuration code Edward Cree
2020-06-30 12:11 ` [PATCH net-next 06/14] sfc: commonise efx_sync_rx_buffer() Edward Cree
2020-06-30 12:12 ` [PATCH net-next 07/14] sfc: commonise TSO fallback code Edward Cree
2020-06-30 12:12 ` [PATCH net-next 08/14] sfc: remove duplicate declaration of efx_enqueue_skb_tso() Edward Cree
2020-06-30 12:13 ` [PATCH net-next 09/14] sfc: factor out efx_tx_tso_header_length() and understand encapsulation Edward Cree
2020-06-30 12:13 ` [PATCH net-next 10/14] sfc: move definition of EFX_MC_STATS_GENERATION_INVALID Edward Cree
2020-06-30 12:14 ` [PATCH net-next 11/14] sfc: initialise max_[tx_]channels in efx_init_channels() Edward Cree
2020-06-30 12:14 ` [PATCH net-next 12/14] sfc: commonise efx->[rt]xq_entries initialisation Edward Cree
2020-06-30 12:15 ` [PATCH net-next 13/14] sfc: commonise initialisation of efx->vport_id Edward Cree
2020-06-30 12:15 ` [PATCH net-next 14/14] sfc: don't call tx_remove if there isn't one Edward Cree
2020-06-30 19:44 ` [PATCH net-next 00/14] sfc: prerequisites for EF100 driver, part 2 Jakub Kicinski
2020-06-30 20:09 ` David Miller

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=ed79646e-3c0e-a3ee-dac2-a86a5b5c257e@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    /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.