diff mbox series

[net-next,v2,09/13] sfc/siena: Rename peripheral functions to avoid conflicts with sfc

Message ID 165111314210.21042.16318313496221139871.stgit@palantir17.mph.net (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series : Move Siena into a separate subdirectory | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 5 maintainers not CCed: toke@redhat.com daniel@iogearbox.net hkallweit1@gmail.com ihuguet@redhat.com dossche.niels@gmail.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning CHECK: Alignment should match open parenthesis WARNING: line length of 81 exceeds 80 columns WARNING: line length of 83 exceeds 80 columns WARNING: line length of 84 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 57 this patch: 57
netdev/source_inline success Was 0 now: 0

Commit Message

Martin Habets April 28, 2022, 2:32 a.m. UTC
For siena use efx_siena_ as the function prefix.
This patch covers selftest.h, ptp.h, net_driver.h and ethtool_common.h.
efx_ethtool_fill_self_tests() can become static.
Some functions in ptp.c can also become static.
Rename loopback_mode in net_driver.h.

Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
---
 drivers/net/ethernet/sfc/siena/efx.c            |    6 -
 drivers/net/ethernet/sfc/siena/efx_common.c     |   12 +
 drivers/net/ethernet/sfc/siena/ethtool.c        |   50 +++---
 drivers/net/ethernet/sfc/siena/ethtool_common.c |  199 ++++++++++++-----------
 drivers/net/ethernet/sfc/siena/ethtool_common.h |   95 +++++------
 drivers/net/ethernet/sfc/siena/mcdi.c           |    4 
 drivers/net/ethernet/sfc/siena/net_driver.h     |    6 -
 drivers/net/ethernet/sfc/siena/ptp.c            |   53 +++---
 drivers/net/ethernet/sfc/siena/ptp.h            |   46 +++--
 drivers/net/ethernet/sfc/siena/rx.c             |    2 
 drivers/net/ethernet/sfc/siena/selftest.c       |   24 +--
 drivers/net/ethernet/sfc/siena/selftest.h       |   14 +-
 drivers/net/ethernet/sfc/siena/siena.c          |   17 +-
 drivers/net/ethernet/sfc/siena/tx.c             |    6 -
 drivers/net/ethernet/sfc/siena/tx_common.c      |    6 -
 15 files changed, 270 insertions(+), 270 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/siena/efx.c b/drivers/net/ethernet/sfc/siena/efx.c
index 70da9d7afbc5..0587877cc809 100644
--- a/drivers/net/ethernet/sfc/siena/efx.c
+++ b/drivers/net/ethernet/sfc/siena/efx.c
@@ -494,9 +494,9 @@  static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
 	struct mii_ioctl_data *data = if_mii(ifr);
 
 	if (cmd == SIOCSHWTSTAMP)
-		return efx_ptp_set_ts_config(efx, ifr);
+		return efx_siena_ptp_set_ts_config(efx, ifr);
 	if (cmd == SIOCGHWTSTAMP)
-		return efx_ptp_get_ts_config(efx, ifr);
+		return efx_siena_ptp_get_ts_config(efx, ifr);
 
 	/* Convert phy_id from older PRTAD/DEVAD format */
 	if ((cmd == SIOCGMIIREG || cmd == SIOCSMIIREG) &&
@@ -536,7 +536,7 @@  static int efx_net_open(struct net_device *net_dev)
 	efx_siena_start_all(efx);
 	if (efx->state == STATE_DISABLED || efx->reset_pending)
 		netif_device_detach(efx->net_dev);
-	efx_selftest_async_start(efx);
+	efx_siena_selftest_async_start(efx);
 	return 0;
 }
 
diff --git a/drivers/net/ethernet/sfc/siena/efx_common.c b/drivers/net/ethernet/sfc/siena/efx_common.c
index f245d03c4caa..6b524775c929 100644
--- a/drivers/net/ethernet/sfc/siena/efx_common.c
+++ b/drivers/net/ethernet/sfc/siena/efx_common.c
@@ -73,8 +73,8 @@  static const char *const efx_reset_type_names[] = {
 	STRING_TABLE_LOOKUP(type, efx_reset_type)
 
 /* Loopback mode names (see LOOPBACK_MODE()) */
-const unsigned int efx_loopback_mode_max = LOOPBACK_MAX;
-const char *const efx_loopback_mode_names[] = {
+const unsigned int efx_siena_loopback_mode_max = LOOPBACK_MAX;
+const char *const efx_siena_loopback_mode_names[] = {
 	[LOOPBACK_NONE]		= "NONE",
 	[LOOPBACK_DATA]		= "DATAPATH",
 	[LOOPBACK_GMAC]		= "GMAC",
@@ -434,7 +434,7 @@  static void efx_start_datapath(struct efx_nic *efx)
 	/* Initialise the channels */
 	efx_siena_start_channels(efx);
 
-	efx_ptp_start_datapath(efx);
+	efx_siena_ptp_start_datapath(efx);
 
 	if (netif_device_present(efx->net_dev))
 		netif_tx_wake_all_queues(efx->net_dev);
@@ -445,7 +445,7 @@  static void efx_stop_datapath(struct efx_nic *efx)
 	EFX_ASSERT_RESET_SERIALISED(efx);
 	BUG_ON(efx->port_enabled);
 
-	efx_ptp_stop_datapath(efx);
+	efx_siena_ptp_stop_datapath(efx);
 
 	efx_siena_stop_channels(efx);
 }
@@ -514,7 +514,7 @@  static void efx_stop_port(struct efx_nic *efx)
 	netif_addr_unlock_bh(efx->net_dev);
 
 	cancel_delayed_work_sync(&efx->monitor_work);
-	efx_selftest_async_cancel(efx);
+	efx_siena_selftest_async_cancel(efx);
 	cancel_work_sync(&efx->mac_work);
 }
 
@@ -994,7 +994,7 @@  int efx_siena_init_struct(struct efx_nic *efx,
 #endif
 	INIT_WORK(&efx->reset_work, efx_reset_work);
 	INIT_DELAYED_WORK(&efx->monitor_work, efx_monitor);
-	efx_selftest_async_init(efx);
+	efx_siena_selftest_async_init(efx);
 	efx->pci_dev = pci_dev;
 	efx->msg_enable = debug;
 	efx->state = STATE_UNINIT;
diff --git a/drivers/net/ethernet/sfc/siena/ethtool.c b/drivers/net/ethernet/sfc/siena/ethtool.c
index 7aa621e97212..63388bec421d 100644
--- a/drivers/net/ethernet/sfc/siena/ethtool.c
+++ b/drivers/net/ethernet/sfc/siena/ethtool.c
@@ -235,7 +235,7 @@  static int efx_ethtool_get_ts_info(struct net_device *net_dev,
 				    SOF_TIMESTAMPING_SOFTWARE);
 	ts_info->phc_index = -1;
 
-	efx_ptp_get_ts_info(efx, ts_info);
+	efx_siena_ptp_get_ts_info(efx, ts_info);
 	return 0;
 }
 
@@ -243,40 +243,40 @@  const struct ethtool_ops efx_siena_ethtool_ops = {
 	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
 				     ETHTOOL_COALESCE_USECS_IRQ |
 				     ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
-	.get_drvinfo		= efx_ethtool_get_drvinfo,
+	.get_drvinfo		= efx_siena_ethtool_get_drvinfo,
 	.get_regs_len		= efx_ethtool_get_regs_len,
 	.get_regs		= efx_ethtool_get_regs,
-	.get_msglevel		= efx_ethtool_get_msglevel,
-	.set_msglevel		= efx_ethtool_set_msglevel,
+	.get_msglevel		= efx_siena_ethtool_get_msglevel,
+	.set_msglevel		= efx_siena_ethtool_set_msglevel,
 	.get_link		= ethtool_op_get_link,
 	.get_coalesce		= efx_ethtool_get_coalesce,
 	.set_coalesce		= efx_ethtool_set_coalesce,
 	.get_ringparam		= efx_ethtool_get_ringparam,
 	.set_ringparam		= efx_ethtool_set_ringparam,
-	.get_pauseparam         = efx_ethtool_get_pauseparam,
-	.set_pauseparam         = efx_ethtool_set_pauseparam,
-	.get_sset_count		= efx_ethtool_get_sset_count,
-	.self_test		= efx_ethtool_self_test,
-	.get_strings		= efx_ethtool_get_strings,
+	.get_pauseparam         = efx_siena_ethtool_get_pauseparam,
+	.set_pauseparam         = efx_siena_ethtool_set_pauseparam,
+	.get_sset_count		= efx_siena_ethtool_get_sset_count,
+	.self_test		= efx_siena_ethtool_self_test,
+	.get_strings		= efx_siena_ethtool_get_strings,
 	.set_phys_id		= efx_ethtool_phys_id,
-	.get_ethtool_stats	= efx_ethtool_get_stats,
+	.get_ethtool_stats	= efx_siena_ethtool_get_stats,
 	.get_wol                = efx_ethtool_get_wol,
 	.set_wol                = efx_ethtool_set_wol,
-	.reset			= efx_ethtool_reset,
-	.get_rxnfc		= efx_ethtool_get_rxnfc,
-	.set_rxnfc		= efx_ethtool_set_rxnfc,
-	.get_rxfh_indir_size	= efx_ethtool_get_rxfh_indir_size,
-	.get_rxfh_key_size	= efx_ethtool_get_rxfh_key_size,
-	.get_rxfh		= efx_ethtool_get_rxfh,
-	.set_rxfh		= efx_ethtool_set_rxfh,
-	.get_rxfh_context	= efx_ethtool_get_rxfh_context,
-	.set_rxfh_context	= efx_ethtool_set_rxfh_context,
+	.reset			= efx_siena_ethtool_reset,
+	.get_rxnfc		= efx_siena_ethtool_get_rxnfc,
+	.set_rxnfc		= efx_siena_ethtool_set_rxnfc,
+	.get_rxfh_indir_size	= efx_siena_ethtool_get_rxfh_indir_size,
+	.get_rxfh_key_size	= efx_siena_ethtool_get_rxfh_key_size,
+	.get_rxfh		= efx_siena_ethtool_get_rxfh,
+	.set_rxfh		= efx_siena_ethtool_set_rxfh,
+	.get_rxfh_context	= efx_siena_ethtool_get_rxfh_context,
+	.set_rxfh_context	= efx_siena_ethtool_set_rxfh_context,
 	.get_ts_info		= efx_ethtool_get_ts_info,
-	.get_module_info	= efx_ethtool_get_module_info,
-	.get_module_eeprom	= efx_ethtool_get_module_eeprom,
-	.get_link_ksettings	= efx_ethtool_get_link_ksettings,
-	.set_link_ksettings	= efx_ethtool_set_link_ksettings,
+	.get_module_info	= efx_siena_ethtool_get_module_info,
+	.get_module_eeprom	= efx_siena_ethtool_get_module_eeprom,
+	.get_link_ksettings	= efx_siena_ethtool_get_link_ksettings,
+	.set_link_ksettings	= efx_siena_ethtool_set_link_ksettings,
 	.get_fec_stats		= efx_ethtool_get_fec_stats,
-	.get_fecparam		= efx_ethtool_get_fecparam,
-	.set_fecparam		= efx_ethtool_set_fecparam,
+	.get_fecparam		= efx_siena_ethtool_get_fecparam,
+	.set_fecparam		= efx_siena_ethtool_set_fecparam,
 };
diff --git a/drivers/net/ethernet/sfc/siena/ethtool_common.c b/drivers/net/ethernet/sfc/siena/ethtool_common.c
index f54510cf4e72..91f750e4ede8 100644
--- a/drivers/net/ethernet/sfc/siena/ethtool_common.c
+++ b/drivers/net/ethernet/sfc/siena/ethtool_common.c
@@ -100,8 +100,8 @@  static const struct efx_sw_stat_desc efx_sw_stat_desc[] = {
 
 #define EFX_ETHTOOL_SW_STAT_COUNT ARRAY_SIZE(efx_sw_stat_desc)
 
-void efx_ethtool_get_drvinfo(struct net_device *net_dev,
-			     struct ethtool_drvinfo *info)
+void efx_siena_ethtool_get_drvinfo(struct net_device *net_dev,
+				   struct ethtool_drvinfo *info)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
@@ -111,70 +111,22 @@  void efx_ethtool_get_drvinfo(struct net_device *net_dev,
 	strlcpy(info->bus_info, pci_name(efx->pci_dev), sizeof(info->bus_info));
 }
 
-u32 efx_ethtool_get_msglevel(struct net_device *net_dev)
+u32 efx_siena_ethtool_get_msglevel(struct net_device *net_dev)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
 	return efx->msg_enable;
 }
 
-void efx_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable)
+void efx_siena_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
 	efx->msg_enable = msg_enable;
 }
 
-void efx_ethtool_self_test(struct net_device *net_dev,
-			   struct ethtool_test *test, u64 *data)
-{
-	struct efx_nic *efx = netdev_priv(net_dev);
-	struct efx_self_tests *efx_tests;
-	bool already_up;
-	int rc = -ENOMEM;
-
-	efx_tests = kzalloc(sizeof(*efx_tests), GFP_KERNEL);
-	if (!efx_tests)
-		goto fail;
-
-	if (efx->state != STATE_READY) {
-		rc = -EBUSY;
-		goto out;
-	}
-
-	netif_info(efx, drv, efx->net_dev, "starting %sline testing\n",
-		   (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");
-
-	/* We need rx buffers and interrupts. */
-	already_up = (efx->net_dev->flags & IFF_UP);
-	if (!already_up) {
-		rc = dev_open(efx->net_dev, NULL);
-		if (rc) {
-			netif_err(efx, drv, efx->net_dev,
-				  "failed opening device.\n");
-			goto out;
-		}
-	}
-
-	rc = efx_selftest(efx, efx_tests, test->flags);
-
-	if (!already_up)
-		dev_close(efx->net_dev);
-
-	netif_info(efx, drv, efx->net_dev, "%s %sline self-tests\n",
-		   rc == 0 ? "passed" : "failed",
-		   (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");
-
-out:
-	efx_ethtool_fill_self_tests(efx, efx_tests, NULL, data);
-	kfree(efx_tests);
-fail:
-	if (rc)
-		test->flags |= ETH_TEST_FL_FAILED;
-}
-
-void efx_ethtool_get_pauseparam(struct net_device *net_dev,
-				struct ethtool_pauseparam *pause)
+void efx_siena_ethtool_get_pauseparam(struct net_device *net_dev,
+				      struct ethtool_pauseparam *pause)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
@@ -183,8 +135,8 @@  void efx_ethtool_get_pauseparam(struct net_device *net_dev,
 	pause->autoneg = !!(efx->wanted_fc & EFX_FC_AUTO);
 }
 
-int efx_ethtool_set_pauseparam(struct net_device *net_dev,
-			       struct ethtool_pauseparam *pause)
+int efx_siena_ethtool_set_pauseparam(struct net_device *net_dev,
+				     struct ethtool_pauseparam *pause)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	u8 wanted_fc, old_fc;
@@ -281,7 +233,7 @@  static void efx_fill_test(unsigned int test_index, u8 *strings, u64 *data,
 #define EFX_CHANNEL_NAME(_channel) "chan%d", _channel->channel
 #define EFX_TX_QUEUE_NAME(_tx_queue) "txq%d", _tx_queue->label
 #define EFX_LOOPBACK_NAME(_mode, _counter)			\
-	"loopback.%s." _counter, STRING_TABLE_LOOKUP(_mode, efx_loopback_mode)
+	"loopback.%s." _counter, STRING_TABLE_LOOKUP(_mode, efx_siena_loopback_mode)
 
 /**
  * efx_fill_loopback_test - fill in a block of loopback self-test entries
@@ -340,9 +292,9 @@  static int efx_fill_loopback_test(struct efx_nic *efx,
  * The reason for merging these three functions is to make sure that
  * they can never be inconsistent.
  */
-int efx_ethtool_fill_self_tests(struct efx_nic *efx,
-				struct efx_self_tests *tests,
-				u8 *strings, u64 *data)
+static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
+				       struct efx_self_tests *tests,
+				       u8 *strings, u64 *data)
 {
 	struct efx_channel *channel;
 	unsigned int n = 0, i;
@@ -395,6 +347,54 @@  int efx_ethtool_fill_self_tests(struct efx_nic *efx,
 	return n;
 }
 
+void efx_siena_ethtool_self_test(struct net_device *net_dev,
+				 struct ethtool_test *test, u64 *data)
+{
+	struct efx_nic *efx = netdev_priv(net_dev);
+	struct efx_self_tests *efx_tests;
+	bool already_up;
+	int rc = -ENOMEM;
+
+	efx_tests = kzalloc(sizeof(*efx_tests), GFP_KERNEL);
+	if (!efx_tests)
+		goto fail;
+
+	if (efx->state != STATE_READY) {
+		rc = -EBUSY;
+		goto out;
+	}
+
+	netif_info(efx, drv, efx->net_dev, "starting %sline testing\n",
+		   (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");
+
+	/* We need rx buffers and interrupts. */
+	already_up = (efx->net_dev->flags & IFF_UP);
+	if (!already_up) {
+		rc = dev_open(efx->net_dev, NULL);
+		if (rc) {
+			netif_err(efx, drv, efx->net_dev,
+				  "failed opening device.\n");
+			goto out;
+		}
+	}
+
+	rc = efx_siena_selftest(efx, efx_tests, test->flags);
+
+	if (!already_up)
+		dev_close(efx->net_dev);
+
+	netif_info(efx, drv, efx->net_dev, "%s %sline self-tests\n",
+		   rc == 0 ? "passed" : "failed",
+		   (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");
+
+out:
+	efx_ethtool_fill_self_tests(efx, efx_tests, NULL, data);
+	kfree(efx_tests);
+fail:
+	if (rc)
+		test->flags |= ETH_TEST_FL_FAILED;
+}
+
 static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
 {
 	size_t n_stats = 0;
@@ -439,7 +439,7 @@  static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
 	return n_stats;
 }
 
-int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set)
+int efx_siena_ethtool_get_sset_count(struct net_device *net_dev, int string_set)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
@@ -448,7 +448,7 @@  int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set)
 		return efx->type->describe_stats(efx, NULL) +
 		       EFX_ETHTOOL_SW_STAT_COUNT +
 		       efx_describe_per_queue_stats(efx, NULL) +
-		       efx_ptp_describe_stats(efx, NULL);
+		       efx_siena_ptp_describe_stats(efx, NULL);
 	case ETH_SS_TEST:
 		return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL);
 	default:
@@ -456,8 +456,8 @@  int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set)
 	}
 }
 
-void efx_ethtool_get_strings(struct net_device *net_dev,
-			     u32 string_set, u8 *strings)
+void efx_siena_ethtool_get_strings(struct net_device *net_dev,
+				   u32 string_set, u8 *strings)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int i;
@@ -472,7 +472,7 @@  void efx_ethtool_get_strings(struct net_device *net_dev,
 		strings += EFX_ETHTOOL_SW_STAT_COUNT * ETH_GSTRING_LEN;
 		strings += (efx_describe_per_queue_stats(efx, strings) *
 			    ETH_GSTRING_LEN);
-		efx_ptp_describe_stats(efx, strings);
+		efx_siena_ptp_describe_stats(efx, strings);
 		break;
 	case ETH_SS_TEST:
 		efx_ethtool_fill_self_tests(efx, NULL, strings, NULL);
@@ -483,9 +483,9 @@  void efx_ethtool_get_strings(struct net_device *net_dev,
 	}
 }
 
-void efx_ethtool_get_stats(struct net_device *net_dev,
-			   struct ethtool_stats *stats,
-			   u64 *data)
+void efx_siena_ethtool_get_stats(struct net_device *net_dev,
+				 struct ethtool_stats *stats,
+				 u64 *data)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	const struct efx_sw_stat_desc *stat;
@@ -554,12 +554,12 @@  void efx_ethtool_get_stats(struct net_device *net_dev,
 		}
 	}
 
-	efx_ptp_update_stats(efx, data);
+	efx_siena_ptp_update_stats(efx, data);
 }
 
 /* This must be called with rtnl_lock held. */
-int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
-				   struct ethtool_link_ksettings *cmd)
+int efx_siena_ethtool_get_link_ksettings(struct net_device *net_dev,
+					 struct ethtool_link_ksettings *cmd)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	struct efx_link_state *link_state = &efx->link_state;
@@ -581,8 +581,9 @@  int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
 }
 
 /* This must be called with rtnl_lock held. */
-int efx_ethtool_set_link_ksettings(struct net_device *net_dev,
-				   const struct ethtool_link_ksettings *cmd)
+int
+efx_siena_ethtool_set_link_ksettings(struct net_device *net_dev,
+				     const struct ethtool_link_ksettings *cmd)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int rc;
@@ -601,8 +602,8 @@  int efx_ethtool_set_link_ksettings(struct net_device *net_dev,
 	return rc;
 }
 
-int efx_ethtool_get_fecparam(struct net_device *net_dev,
-			     struct ethtool_fecparam *fecparam)
+int efx_siena_ethtool_get_fecparam(struct net_device *net_dev,
+				   struct ethtool_fecparam *fecparam)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int rc;
@@ -614,8 +615,8 @@  int efx_ethtool_get_fecparam(struct net_device *net_dev,
 	return rc;
 }
 
-int efx_ethtool_set_fecparam(struct net_device *net_dev,
-			     struct ethtool_fecparam *fecparam)
+int efx_siena_ethtool_set_fecparam(struct net_device *net_dev,
+				   struct ethtool_fecparam *fecparam)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int rc;
@@ -806,8 +807,8 @@  static int efx_ethtool_get_class_rule(struct efx_nic *efx,
 	return rc;
 }
 
-int efx_ethtool_get_rxnfc(struct net_device *net_dev,
-			  struct ethtool_rxnfc *info, u32 *rule_locs)
+int efx_siena_ethtool_get_rxnfc(struct net_device *net_dev,
+				struct ethtool_rxnfc *info, u32 *rule_locs)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	u32 rss_context = 0;
@@ -1125,8 +1126,8 @@  static int efx_ethtool_set_class_rule(struct efx_nic *efx,
 	return 0;
 }
 
-int efx_ethtool_set_rxnfc(struct net_device *net_dev,
-			  struct ethtool_rxnfc *info)
+int efx_siena_ethtool_set_rxnfc(struct net_device *net_dev,
+				struct ethtool_rxnfc *info)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
@@ -1147,7 +1148,7 @@  int efx_ethtool_set_rxnfc(struct net_device *net_dev,
 	}
 }
 
-u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev)
+u32 efx_siena_ethtool_get_rxfh_indir_size(struct net_device *net_dev)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
@@ -1156,15 +1157,15 @@  u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev)
 	return ARRAY_SIZE(efx->rss_context.rx_indir_table);
 }
 
-u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev)
+u32 efx_siena_ethtool_get_rxfh_key_size(struct net_device *net_dev)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
 	return efx->type->rx_hash_key_size;
 }
 
-int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
-			 u8 *hfunc)
+int efx_siena_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
+			       u8 *hfunc)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int rc;
@@ -1184,8 +1185,8 @@  int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
 	return 0;
 }
 
-int efx_ethtool_set_rxfh(struct net_device *net_dev, const u32 *indir,
-			 const u8 *key, const u8 hfunc)
+int efx_siena_ethtool_set_rxfh(struct net_device *net_dev, const u32 *indir,
+			       const u8 *key, const u8 hfunc)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
@@ -1203,8 +1204,8 @@  int efx_ethtool_set_rxfh(struct net_device *net_dev, const u32 *indir,
 	return efx->type->rx_push_rss_config(efx, true, indir, key);
 }
 
-int efx_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir,
-				 u8 *key, u8 *hfunc, u32 rss_context)
+int efx_siena_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir,
+				       u8 *key, u8 *hfunc, u32 rss_context)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	struct efx_rss_context *ctx;
@@ -1234,10 +1235,10 @@  int efx_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir,
 	return rc;
 }
 
-int efx_ethtool_set_rxfh_context(struct net_device *net_dev,
-				 const u32 *indir, const u8 *key,
-				 const u8 hfunc, u32 *rss_context,
-				 bool delete)
+int efx_siena_ethtool_set_rxfh_context(struct net_device *net_dev,
+				       const u32 *indir, const u8 *key,
+				       const u8 hfunc, u32 *rss_context,
+				       bool delete)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	struct efx_rss_context *ctx;
@@ -1299,7 +1300,7 @@  int efx_ethtool_set_rxfh_context(struct net_device *net_dev,
 	return rc;
 }
 
-int efx_ethtool_reset(struct net_device *net_dev, u32 *flags)
+int efx_siena_ethtool_reset(struct net_device *net_dev, u32 *flags)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int rc;
@@ -1311,9 +1312,9 @@  int efx_ethtool_reset(struct net_device *net_dev, u32 *flags)
 	return efx_siena_reset(efx, rc);
 }
 
-int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
-				  struct ethtool_eeprom *ee,
-				  u8 *data)
+int efx_siena_ethtool_get_module_eeprom(struct net_device *net_dev,
+					struct ethtool_eeprom *ee,
+					u8 *data)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int ret;
@@ -1325,8 +1326,8 @@  int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
 	return ret;
 }
 
-int efx_ethtool_get_module_info(struct net_device *net_dev,
-				struct ethtool_modinfo *modinfo)
+int efx_siena_ethtool_get_module_info(struct net_device *net_dev,
+				      struct ethtool_modinfo *modinfo)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	int ret;
diff --git a/drivers/net/ethernet/sfc/siena/ethtool_common.h b/drivers/net/ethernet/sfc/siena/ethtool_common.h
index 659491932101..04b375dc6800 100644
--- a/drivers/net/ethernet/sfc/siena/ethtool_common.h
+++ b/drivers/net/ethernet/sfc/siena/ethtool_common.h
@@ -11,53 +11,50 @@ 
 #ifndef EFX_ETHTOOL_COMMON_H
 #define EFX_ETHTOOL_COMMON_H
 
-void efx_ethtool_get_drvinfo(struct net_device *net_dev,
-			     struct ethtool_drvinfo *info);
-u32 efx_ethtool_get_msglevel(struct net_device *net_dev);
-void efx_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable);
-void efx_ethtool_self_test(struct net_device *net_dev,
-			   struct ethtool_test *test, u64 *data);
-void efx_ethtool_get_pauseparam(struct net_device *net_dev,
-				struct ethtool_pauseparam *pause);
-int efx_ethtool_set_pauseparam(struct net_device *net_dev,
-			       struct ethtool_pauseparam *pause);
-int efx_ethtool_fill_self_tests(struct efx_nic *efx,
-				struct efx_self_tests *tests,
-				u8 *strings, u64 *data);
-int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set);
-void efx_ethtool_get_strings(struct net_device *net_dev, u32 string_set,
-			     u8 *strings);
-void efx_ethtool_get_stats(struct net_device *net_dev,
-			   struct ethtool_stats *stats __attribute__ ((unused)),
-			   u64 *data);
-int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
-				   struct ethtool_link_ksettings *out);
-int efx_ethtool_set_link_ksettings(struct net_device *net_dev,
-				   const struct ethtool_link_ksettings *settings);
-int efx_ethtool_get_fecparam(struct net_device *net_dev,
-			     struct ethtool_fecparam *fecparam);
-int efx_ethtool_set_fecparam(struct net_device *net_dev,
-			     struct ethtool_fecparam *fecparam);
-int efx_ethtool_get_rxnfc(struct net_device *net_dev,
-			  struct ethtool_rxnfc *info, u32 *rule_locs);
-int efx_ethtool_set_rxnfc(struct net_device *net_dev,
-			  struct ethtool_rxnfc *info);
-u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev);
-u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev);
-int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
-			 u8 *hfunc);
-int efx_ethtool_set_rxfh(struct net_device *net_dev,
-			 const u32 *indir, const u8 *key, const u8 hfunc);
-int efx_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir,
-				 u8 *key, u8 *hfunc, u32 rss_context);
-int efx_ethtool_set_rxfh_context(struct net_device *net_dev,
-				 const u32 *indir, const u8 *key,
-				 const u8 hfunc, u32 *rss_context,
-				 bool delete);
-int efx_ethtool_reset(struct net_device *net_dev, u32 *flags);
-int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
-				  struct ethtool_eeprom *ee,
-				  u8 *data);
-int efx_ethtool_get_module_info(struct net_device *net_dev,
-				struct ethtool_modinfo *modinfo);
+void efx_siena_ethtool_get_drvinfo(struct net_device *net_dev,
+				   struct ethtool_drvinfo *info);
+u32 efx_siena_ethtool_get_msglevel(struct net_device *net_dev);
+void efx_siena_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable);
+void efx_siena_ethtool_self_test(struct net_device *net_dev,
+				 struct ethtool_test *test, u64 *data);
+void efx_siena_ethtool_get_pauseparam(struct net_device *net_dev,
+				      struct ethtool_pauseparam *pause);
+int efx_siena_ethtool_set_pauseparam(struct net_device *net_dev,
+				     struct ethtool_pauseparam *pause);
+int efx_siena_ethtool_get_sset_count(struct net_device *net_dev, int string_set);
+void efx_siena_ethtool_get_strings(struct net_device *net_dev, u32 string_set,
+				   u8 *strings);
+void efx_siena_ethtool_get_stats(struct net_device *net_dev,
+				 struct ethtool_stats *stats __always_unused,
+				 u64 *data);
+int efx_siena_ethtool_get_link_ksettings(struct net_device *net_dev,
+					 struct ethtool_link_ksettings *out);
+int efx_siena_ethtool_set_link_ksettings(struct net_device *net_dev,
+				const struct ethtool_link_ksettings *settings);
+int efx_siena_ethtool_get_fecparam(struct net_device *net_dev,
+				   struct ethtool_fecparam *fecparam);
+int efx_siena_ethtool_set_fecparam(struct net_device *net_dev,
+				   struct ethtool_fecparam *fecparam);
+int efx_siena_ethtool_get_rxnfc(struct net_device *net_dev,
+				struct ethtool_rxnfc *info, u32 *rule_locs);
+int efx_siena_ethtool_set_rxnfc(struct net_device *net_dev,
+				struct ethtool_rxnfc *info);
+u32 efx_siena_ethtool_get_rxfh_indir_size(struct net_device *net_dev);
+u32 efx_siena_ethtool_get_rxfh_key_size(struct net_device *net_dev);
+int efx_siena_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
+			       u8 *hfunc);
+int efx_siena_ethtool_set_rxfh(struct net_device *net_dev,
+			       const u32 *indir, const u8 *key, const u8 hfunc);
+int efx_siena_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir,
+				       u8 *key, u8 *hfunc, u32 rss_context);
+int efx_siena_ethtool_set_rxfh_context(struct net_device *net_dev,
+				       const u32 *indir, const u8 *key,
+				       const u8 hfunc, u32 *rss_context,
+				       bool delete);
+int efx_siena_ethtool_reset(struct net_device *net_dev, u32 *flags);
+int efx_siena_ethtool_get_module_eeprom(struct net_device *net_dev,
+					struct ethtool_eeprom *ee,
+					u8 *data);
+int efx_siena_ethtool_get_module_info(struct net_device *net_dev,
+				      struct ethtool_modinfo *modinfo);
 #endif
diff --git a/drivers/net/ethernet/sfc/siena/mcdi.c b/drivers/net/ethernet/sfc/siena/mcdi.c
index 7f8f0889bf8d..ff426b228cb2 100644
--- a/drivers/net/ethernet/sfc/siena/mcdi.c
+++ b/drivers/net/ethernet/sfc/siena/mcdi.c
@@ -1363,10 +1363,10 @@  void efx_mcdi_process_event(struct efx_channel *channel,
 	case MCDI_EVENT_CODE_PTP_RX:
 	case MCDI_EVENT_CODE_PTP_FAULT:
 	case MCDI_EVENT_CODE_PTP_PPS:
-		efx_ptp_event(efx, event);
+		efx_siena_ptp_event(efx, event);
 		break;
 	case MCDI_EVENT_CODE_PTP_TIME:
-		efx_time_sync_event(channel, event);
+		efx_siena_time_sync_event(channel, event);
 		break;
 	case MCDI_EVENT_CODE_TX_FLUSH:
 	case MCDI_EVENT_CODE_RX_FLUSH:
diff --git a/drivers/net/ethernet/sfc/siena/net_driver.h b/drivers/net/ethernet/sfc/siena/net_driver.h
index 3fe93f25a569..7e0659be4348 100644
--- a/drivers/net/ethernet/sfc/siena/net_driver.h
+++ b/drivers/net/ethernet/sfc/siena/net_driver.h
@@ -606,10 +606,10 @@  enum efx_led_mode {
 #define STRING_TABLE_LOOKUP(val, member) \
 	((val) < member ## _max) ? member ## _names[val] : "(invalid)"
 
-extern const char *const efx_loopback_mode_names[];
-extern const unsigned int efx_loopback_mode_max;
+extern const char *const efx_siena_loopback_mode_names[];
+extern const unsigned int efx_siena_loopback_mode_max;
 #define LOOPBACK_MODE(efx) \
-	STRING_TABLE_LOOKUP((efx)->loopback_mode, efx_loopback_mode)
+	STRING_TABLE_LOOKUP((efx)->loopback_mode, efx_siena_loopback_mode)
 
 enum efx_int_mode {
 	/* Be careful if altering to correct macro below */
diff --git a/drivers/net/ethernet/sfc/siena/ptp.c b/drivers/net/ethernet/sfc/siena/ptp.c
index daf23070d353..b67417063a80 100644
--- a/drivers/net/ethernet/sfc/siena/ptp.c
+++ b/drivers/net/ethernet/sfc/siena/ptp.c
@@ -355,7 +355,7 @@  static int efx_phc_settime(struct ptp_clock_info *ptp,
 static int efx_phc_enable(struct ptp_clock_info *ptp,
 			  struct ptp_clock_request *request, int on);
 
-bool efx_ptp_use_mac_tx_timestamps(struct efx_nic *efx)
+bool efx_siena_ptp_use_mac_tx_timestamps(struct efx_nic *efx)
 {
 	return efx_has_cap(efx, TX_MAC_TIMESTAMPING);
 }
@@ -365,7 +365,7 @@  bool efx_ptp_use_mac_tx_timestamps(struct efx_nic *efx)
  */
 static bool efx_ptp_want_txqs(struct efx_channel *channel)
 {
-	return efx_ptp_use_mac_tx_timestamps(channel->efx);
+	return efx_siena_ptp_use_mac_tx_timestamps(channel->efx);
 }
 
 #define PTP_SW_STAT(ext_name, field_name)				\
@@ -393,7 +393,7 @@  static const unsigned long efx_ptp_stat_mask[] = {
 	[0 ... BITS_TO_LONGS(PTP_STAT_COUNT) - 1] = ~0UL,
 };
 
-size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 *strings)
+size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 *strings)
 {
 	if (!efx->ptp_data)
 		return 0;
@@ -402,7 +402,7 @@  size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 *strings)
 				      efx_ptp_stat_mask, strings);
 }
 
-size_t efx_ptp_update_stats(struct efx_nic *efx, u64 *stats)
+size_t efx_siena_ptp_update_stats(struct efx_nic *efx, u64 *stats)
 {
 	MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_STATUS_LEN);
 	MCDI_DECLARE_BUF(outbuf, MC_CMD_PTP_OUT_STATUS_LEN);
@@ -536,14 +536,14 @@  static ktime_t efx_ptp_s_qns_to_ktime_correction(u32 nic_major, u32 nic_minor,
 	return kt;
 }
 
-struct efx_channel *efx_ptp_channel(struct efx_nic *efx)
+struct efx_channel *efx_siena_ptp_channel(struct efx_nic *efx)
 {
 	return efx->ptp_data ? efx->ptp_data->channel : NULL;
 }
 
 static u32 last_sync_timestamp_major(struct efx_nic *efx)
 {
-	struct efx_channel *channel = efx_ptp_channel(efx);
+	struct efx_channel *channel = efx_siena_ptp_channel(efx);
 	u32 major = 0;
 
 	if (channel)
@@ -606,13 +606,13 @@  efx_ptp_mac_nic_to_ktime_correction(struct efx_nic *efx,
 	return kt;
 }
 
-ktime_t efx_ptp_nic_to_kernel_time(struct efx_tx_queue *tx_queue)
+ktime_t efx_siena_ptp_nic_to_kernel_time(struct efx_tx_queue *tx_queue)
 {
 	struct efx_nic *efx = tx_queue->efx;
 	struct efx_ptp_data *ptp = efx->ptp_data;
 	ktime_t kt;
 
-	if (efx_ptp_use_mac_tx_timestamps(efx))
+	if (efx_siena_ptp_use_mac_tx_timestamps(efx))
 		kt = efx_ptp_mac_nic_to_ktime_correction(efx, ptp,
 				tx_queue->completed_timestamp_major,
 				tx_queue->completed_timestamp_minor,
@@ -1437,7 +1437,7 @@  static const struct ptp_clock_info efx_phc_clock_info = {
 };
 
 /* Initialise PTP state. */
-int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel)
+static int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel)
 {
 	struct efx_ptp_data *ptp;
 	int rc = 0;
@@ -1464,7 +1464,7 @@  int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel)
 		goto fail2;
 	}
 
-	if (efx_ptp_use_mac_tx_timestamps(efx)) {
+	if (efx_siena_ptp_use_mac_tx_timestamps(efx)) {
 		ptp->xmit_skb = efx_ptp_xmit_skb_queue;
 		/* Request sync events on this channel. */
 		channel->sync_events_state = SYNC_EVENTS_QUIESCENT;
@@ -1553,7 +1553,7 @@  static int efx_ptp_probe_channel(struct efx_channel *channel)
 	return 0;
 }
 
-void efx_ptp_remove(struct efx_nic *efx)
+static void efx_ptp_remove(struct efx_nic *efx)
 {
 	if (!efx->ptp_data)
 		return;
@@ -1593,7 +1593,7 @@  static void efx_ptp_get_channel_name(struct efx_channel *channel,
 /* Determine whether this packet should be processed by the PTP module
  * or transmitted conventionally.
  */
-bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
+bool efx_siena_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
 {
 	return efx->ptp_data &&
 		efx->ptp_data->enabled &&
@@ -1699,7 +1699,7 @@  static bool efx_ptp_rx(struct efx_channel *channel, struct sk_buff *skb)
  * itself, through an MCDI call.  MCDI calls aren't permitted
  * in the transmit path so defer the actual transmission to a suitable worker.
  */
-int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
+int efx_siena_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
 {
 	struct efx_ptp_data *ptp = efx->ptp_data;
 
@@ -1713,13 +1713,13 @@  int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
 	return NETDEV_TX_OK;
 }
 
-int efx_ptp_get_mode(struct efx_nic *efx)
+int efx_siena_ptp_get_mode(struct efx_nic *efx)
 {
 	return efx->ptp_data->mode;
 }
 
-int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
-			unsigned int new_mode)
+int efx_siena_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
+			      unsigned int new_mode)
 {
 	if ((enable_wanted != efx->ptp_data->enabled) ||
 	    (enable_wanted && (efx->ptp_data->mode != new_mode))) {
@@ -1777,7 +1777,8 @@  static int efx_ptp_ts_init(struct efx_nic *efx, struct hwtstamp_config *init)
 	return 0;
 }
 
-void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info)
+void efx_siena_ptp_get_ts_info(struct efx_nic *efx,
+			       struct ethtool_ts_info *ts_info)
 {
 	struct efx_ptp_data *ptp = efx->ptp_data;
 	struct efx_nic *primary = efx->primary;
@@ -1797,7 +1798,7 @@  void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info)
 	ts_info->rx_filters = ptp->efx->type->hwtstamp_filters;
 }
 
-int efx_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr)
+int efx_siena_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr)
 {
 	struct hwtstamp_config config;
 	int rc;
@@ -1817,7 +1818,7 @@  int efx_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr)
 		? -EFAULT : 0;
 }
 
-int efx_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr)
+int efx_siena_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr)
 {
 	if (!efx->ptp_data)
 		return -EOPNOTSUPP;
@@ -1898,7 +1899,7 @@  static void ptp_event_pps(struct efx_nic *efx, struct efx_ptp_data *ptp)
 		queue_work(ptp->pps_workwq, &ptp->pps_work);
 }
 
-void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev)
+void efx_siena_ptp_event(struct efx_nic *efx, efx_qword_t *ev)
 {
 	struct efx_ptp_data *ptp = efx->ptp_data;
 	int code = EFX_QWORD_FIELD(*ev, MCDI_EVENT_CODE);
@@ -1949,7 +1950,7 @@  void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev)
 	}
 }
 
-void efx_time_sync_event(struct efx_channel *channel, efx_qword_t *ev)
+void efx_siena_time_sync_event(struct efx_channel *channel, efx_qword_t *ev)
 {
 	struct efx_nic *efx = channel->efx;
 	struct efx_ptp_data *ptp = efx->ptp_data;
@@ -1985,8 +1986,8 @@  static inline u32 efx_rx_buf_timestamp_minor(struct efx_nic *efx, const u8 *eh)
 #endif
 }
 
-void __efx_rx_skb_attach_timestamp(struct efx_channel *channel,
-				   struct sk_buff *skb)
+void __efx_siena_rx_skb_attach_timestamp(struct efx_channel *channel,
+					 struct sk_buff *skb)
 {
 	struct efx_nic *efx = channel->efx;
 	struct efx_ptp_data *ptp = efx->ptp_data;
@@ -2171,7 +2172,7 @@  static const struct efx_channel_type efx_ptp_channel_type = {
 	.keep_eventq		= false,
 };
 
-void efx_ptp_defer_probe_with_channel(struct efx_nic *efx)
+void efx_siena_ptp_defer_probe_with_channel(struct efx_nic *efx)
 {
 	/* Check whether PTP is implemented on this NIC.  The DISABLE
 	 * operation will succeed if and only if it is implemented.
@@ -2181,7 +2182,7 @@  void efx_ptp_defer_probe_with_channel(struct efx_nic *efx)
 			&efx_ptp_channel_type;
 }
 
-void efx_ptp_start_datapath(struct efx_nic *efx)
+void efx_siena_ptp_start_datapath(struct efx_nic *efx)
 {
 	if (efx_ptp_restart(efx))
 		netif_err(efx, drv, efx->net_dev, "Failed to restart PTP.\n");
@@ -2190,7 +2191,7 @@  void efx_ptp_start_datapath(struct efx_nic *efx)
 		efx->type->ptp_set_ts_sync_events(efx, true, true);
 }
 
-void efx_ptp_stop_datapath(struct efx_nic *efx)
+void efx_siena_ptp_stop_datapath(struct efx_nic *efx)
 {
 	/* temporarily disable timestamping */
 	if (efx->type->ptp_set_ts_sync_events)
diff --git a/drivers/net/ethernet/sfc/siena/ptp.h b/drivers/net/ethernet/sfc/siena/ptp.h
index 9855e8c9e544..4172f90e9f6f 100644
--- a/drivers/net/ethernet/sfc/siena/ptp.h
+++ b/drivers/net/ethernet/sfc/siena/ptp.h
@@ -13,33 +13,33 @@ 
 #include "net_driver.h"
 
 struct ethtool_ts_info;
-int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel);
-void efx_ptp_defer_probe_with_channel(struct efx_nic *efx);
-struct efx_channel *efx_ptp_channel(struct efx_nic *efx);
-void efx_ptp_remove(struct efx_nic *efx);
-int efx_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr);
-int efx_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
-void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info);
-bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
-int efx_ptp_get_mode(struct efx_nic *efx);
-int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
-			unsigned int new_mode);
-int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
-void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
-size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 *strings);
-size_t efx_ptp_update_stats(struct efx_nic *efx, u64 *stats);
-void efx_time_sync_event(struct efx_channel *channel, efx_qword_t *ev);
-void __efx_rx_skb_attach_timestamp(struct efx_channel *channel,
-				   struct sk_buff *skb);
+void efx_siena_ptp_defer_probe_with_channel(struct efx_nic *efx);
+struct efx_channel *efx_siena_ptp_channel(struct efx_nic *efx);
+int efx_siena_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr);
+int efx_siena_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
+void efx_siena_ptp_get_ts_info(struct efx_nic *efx,
+			       struct ethtool_ts_info *ts_info);
+bool efx_siena_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
+int efx_siena_ptp_get_mode(struct efx_nic *efx);
+int efx_siena_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
+			      unsigned int new_mode);
+int efx_siena_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
+void efx_siena_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
+size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 *strings);
+size_t efx_siena_ptp_update_stats(struct efx_nic *efx, u64 *stats);
+void efx_siena_time_sync_event(struct efx_channel *channel, efx_qword_t *ev);
+void __efx_siena_rx_skb_attach_timestamp(struct efx_channel *channel,
+					 struct sk_buff *skb);
 static inline void efx_rx_skb_attach_timestamp(struct efx_channel *channel,
 					       struct sk_buff *skb)
 {
 	if (channel->sync_events_state == SYNC_EVENTS_VALID)
-		__efx_rx_skb_attach_timestamp(channel, skb);
+		__efx_siena_rx_skb_attach_timestamp(channel, skb);
 }
-void efx_ptp_start_datapath(struct efx_nic *efx);
-void efx_ptp_stop_datapath(struct efx_nic *efx);
-bool efx_ptp_use_mac_tx_timestamps(struct efx_nic *efx);
-ktime_t efx_ptp_nic_to_kernel_time(struct efx_tx_queue *tx_queue);
+
+void efx_siena_ptp_start_datapath(struct efx_nic *efx);
+void efx_siena_ptp_stop_datapath(struct efx_nic *efx);
+bool efx_siena_ptp_use_mac_tx_timestamps(struct efx_nic *efx);
+ktime_t efx_siena_ptp_nic_to_kernel_time(struct efx_tx_queue *tx_queue);
 
 #endif /* EFX_PTP_H */
diff --git a/drivers/net/ethernet/sfc/siena/rx.c b/drivers/net/ethernet/sfc/siena/rx.c
index 47c09b93f7c4..98d3c0743c0f 100644
--- a/drivers/net/ethernet/sfc/siena/rx.c
+++ b/drivers/net/ethernet/sfc/siena/rx.c
@@ -377,7 +377,7 @@  void __efx_siena_rx_packet(struct efx_channel *channel)
 	if (unlikely(efx->loopback_selftest)) {
 		struct efx_rx_queue *rx_queue;
 
-		efx_loopback_rx_packet(efx, eh, rx_buf->len);
+		efx_siena_loopback_rx_packet(efx, eh, rx_buf->len);
 		rx_queue = efx_channel_get_rx_queue(channel);
 		efx_siena_free_rx_buffers(rx_queue, rx_buf,
 					  channel->rx_pkt_n_frags);
diff --git a/drivers/net/ethernet/sfc/siena/selftest.c b/drivers/net/ethernet/sfc/siena/selftest.c
index 7e24329bc005..83bd27df30d4 100644
--- a/drivers/net/ethernet/sfc/siena/selftest.c
+++ b/drivers/net/ethernet/sfc/siena/selftest.c
@@ -69,7 +69,7 @@  static const char *const efx_siena_interrupt_mode_names[] = {
 
 /**
  * struct efx_loopback_state - persistent state during a loopback selftest
- * @flush:		Drop all packets in efx_loopback_rx_packet
+ * @flush:		Drop all packets in efx_siena_loopback_rx_packet
  * @packet_count:	Number of packets being used in this test
  * @skbs:		An array of skbs transmitted
  * @offload_csum:	Checksums are being offloaded
@@ -278,8 +278,8 @@  static int efx_test_phy(struct efx_nic *efx, struct efx_self_tests *tests,
 /* Loopback test RX callback
  * This is called for each received packet during loopback testing.
  */
-void efx_loopback_rx_packet(struct efx_nic *efx,
-			    const char *buf_ptr, int pkt_len)
+void efx_siena_loopback_rx_packet(struct efx_nic *efx,
+				  const char *buf_ptr, int pkt_len)
 {
 	struct efx_loopback_state *state = efx->loopback_selftest;
 	struct efx_loopback_payload *received;
@@ -369,7 +369,7 @@  void efx_loopback_rx_packet(struct efx_nic *efx,
 	atomic_inc(&state->rx_bad);
 }
 
-/* Initialise an efx_selftest_state for a new iteration */
+/* Initialise an efx_siena_selftest_state for a new iteration */
 static void efx_iterate_state(struct efx_nic *efx)
 {
 	struct efx_loopback_state *state = efx->loopback_selftest;
@@ -684,14 +684,14 @@  static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests,
  *
  *************************************************************************/
 
-int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
-		 unsigned flags)
+int efx_siena_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
+		       unsigned int flags)
 {
 	enum efx_loopback_mode loopback_mode = efx->loopback_mode;
 	int phy_mode = efx->phy_mode;
 	int rc_test = 0, rc_reset, rc;
 
-	efx_selftest_async_cancel(efx);
+	efx_siena_selftest_async_cancel(efx);
 
 	/* Online (i.e. non-disruptive) testing
 	 * This checks interrupt generation, event delivery and PHY presence. */
@@ -767,7 +767,7 @@  int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
 	return rc_test;
 }
 
-void efx_selftest_async_start(struct efx_nic *efx)
+void efx_siena_selftest_async_start(struct efx_nic *efx)
 {
 	struct efx_channel *channel;
 
@@ -776,12 +776,12 @@  void efx_selftest_async_start(struct efx_nic *efx)
 	schedule_delayed_work(&efx->selftest_work, IRQ_TIMEOUT);
 }
 
-void efx_selftest_async_cancel(struct efx_nic *efx)
+void efx_siena_selftest_async_cancel(struct efx_nic *efx)
 {
 	cancel_delayed_work_sync(&efx->selftest_work);
 }
 
-static void efx_selftest_async_work(struct work_struct *data)
+static void efx_siena_selftest_async_work(struct work_struct *data)
 {
 	struct efx_nic *efx = container_of(data, struct efx_nic,
 					   selftest_work.work);
@@ -801,7 +801,7 @@  static void efx_selftest_async_work(struct work_struct *data)
 	}
 }
 
-void efx_selftest_async_init(struct efx_nic *efx)
+void efx_siena_selftest_async_init(struct efx_nic *efx)
 {
-	INIT_DELAYED_WORK(&efx->selftest_work, efx_selftest_async_work);
+	INIT_DELAYED_WORK(&efx->selftest_work, efx_siena_selftest_async_work);
 }
diff --git a/drivers/net/ethernet/sfc/siena/selftest.h b/drivers/net/ethernet/sfc/siena/selftest.h
index a23f085bf298..6af6e7fbfcee 100644
--- a/drivers/net/ethernet/sfc/siena/selftest.h
+++ b/drivers/net/ethernet/sfc/siena/selftest.h
@@ -41,12 +41,12 @@  struct efx_self_tests {
 	struct efx_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1];
 };
 
-void efx_loopback_rx_packet(struct efx_nic *efx, const char *buf_ptr,
-			    int pkt_len);
-int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
-		 unsigned flags);
-void efx_selftest_async_init(struct efx_nic *efx);
-void efx_selftest_async_start(struct efx_nic *efx);
-void efx_selftest_async_cancel(struct efx_nic *efx);
+void efx_siena_loopback_rx_packet(struct efx_nic *efx, const char *buf_ptr,
+				  int pkt_len);
+int efx_siena_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
+		       unsigned int flags);
+void efx_siena_selftest_async_init(struct efx_nic *efx);
+void efx_siena_selftest_async_start(struct efx_nic *efx);
+void efx_siena_selftest_async_cancel(struct efx_nic *efx);
 
 #endif /* EFX_SELFTEST_H */
diff --git a/drivers/net/ethernet/sfc/siena/siena.c b/drivers/net/ethernet/sfc/siena/siena.c
index 726dd4b72779..d70e481d0c73 100644
--- a/drivers/net/ethernet/sfc/siena/siena.c
+++ b/drivers/net/ethernet/sfc/siena/siena.c
@@ -143,27 +143,28 @@  static int siena_ptp_set_ts_config(struct efx_nic *efx,
 	switch (init->rx_filter) {
 	case HWTSTAMP_FILTER_NONE:
 		/* if TX timestamping is still requested then leave PTP on */
-		return efx_ptp_change_mode(efx,
-					   init->tx_type != HWTSTAMP_TX_OFF,
-					   efx_ptp_get_mode(efx));
+		return efx_siena_ptp_change_mode(efx,
+					init->tx_type != HWTSTAMP_TX_OFF,
+					efx_siena_ptp_get_mode(efx));
 	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
 	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
 	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
 		init->rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT;
-		return efx_ptp_change_mode(efx, true, MC_CMD_PTP_MODE_V1);
+		return efx_siena_ptp_change_mode(efx, true, MC_CMD_PTP_MODE_V1);
 	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
 	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
 	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
 		init->rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
-		rc = efx_ptp_change_mode(efx, true,
-					 MC_CMD_PTP_MODE_V2_ENHANCED);
+		rc = efx_siena_ptp_change_mode(efx, true,
+					       MC_CMD_PTP_MODE_V2_ENHANCED);
 		/* bug 33070 - old versions of the firmware do not support the
 		 * improved UUID filtering option. Similarly old versions of the
 		 * application do not expect it to be enabled. If the firmware
 		 * does not accept the enhanced mode, fall back to the standard
 		 * PTP v2 UUID filtering. */
 		if (rc != 0)
-			rc = efx_ptp_change_mode(efx, true, MC_CMD_PTP_MODE_V2);
+			rc = efx_siena_ptp_change_mode(efx, true,
+						       MC_CMD_PTP_MODE_V2);
 		return rc;
 	default:
 		return -ERANGE;
@@ -329,7 +330,7 @@  static int siena_probe_nic(struct efx_nic *efx)
 #ifdef CONFIG_SFC_SRIOV
 	efx_siena_sriov_probe(efx);
 #endif
-	efx_ptp_defer_probe_with_channel(efx);
+	efx_siena_ptp_defer_probe_with_channel(efx);
 
 	return 0;
 
diff --git a/drivers/net/ethernet/sfc/siena/tx.c b/drivers/net/ethernet/sfc/siena/tx.c
index 0677a0254d85..ef238e9efa94 100644
--- a/drivers/net/ethernet/sfc/siena/tx.c
+++ b/drivers/net/ethernet/sfc/siena/tx.c
@@ -321,14 +321,14 @@  netdev_tx_t efx_siena_hard_start_xmit(struct sk_buff *skb,
 
 	/* PTP "event" packet */
 	if (unlikely(efx_xmit_with_hwtstamp(skb)) &&
-	    ((efx_ptp_use_mac_tx_timestamps(efx) && efx->ptp_data) ||
-	    unlikely(efx_ptp_is_ptp_tx(efx, skb)))) {
+	    ((efx_siena_ptp_use_mac_tx_timestamps(efx) && efx->ptp_data) ||
+	     unlikely(efx_siena_ptp_is_ptp_tx(efx, skb)))) {
 		/* There may be existing transmits on the channel that are
 		 * waiting for this packet to trigger the doorbell write.
 		 * We need to send the packets at this point.
 		 */
 		efx_tx_send_pending(efx_get_tx_channel(efx, index));
-		return efx_ptp_tx(efx, skb);
+		return efx_siena_ptp_tx(efx, skb);
 	}
 
 	tx_queue = efx_get_tx_queue(efx, index, type);
diff --git a/drivers/net/ethernet/sfc/siena/tx_common.c b/drivers/net/ethernet/sfc/siena/tx_common.c
index 5bf833c1dc9f..c4c053ecaaf5 100644
--- a/drivers/net/ethernet/sfc/siena/tx_common.c
+++ b/drivers/net/ethernet/sfc/siena/tx_common.c
@@ -80,8 +80,8 @@  void efx_siena_init_tx_queue(struct efx_tx_queue *tx_queue)
 	tx_queue->old_read_count = 0;
 	tx_queue->empty_read_count = 0 | EFX_EMPTY_COUNT_VALID;
 	tx_queue->xmit_pending = false;
-	tx_queue->timestamping = (efx_ptp_use_mac_tx_timestamps(efx) &&
-				  tx_queue->channel == efx_ptp_channel(efx));
+	tx_queue->timestamping = (efx_siena_ptp_use_mac_tx_timestamps(efx) &&
+				  tx_queue->channel == efx_siena_ptp_channel(efx));
 	tx_queue->completed_timestamp_major = 0;
 	tx_queue->completed_timestamp_minor = 0;
 
@@ -173,7 +173,7 @@  static void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,
 			struct skb_shared_hwtstamps hwtstamp;
 
 			hwtstamp.hwtstamp =
-				efx_ptp_nic_to_kernel_time(tx_queue);
+				efx_siena_ptp_nic_to_kernel_time(tx_queue);
 			skb_tstamp_tx(skb, &hwtstamp);
 
 			tx_queue->completed_timestamp_major = 0;