@@ -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;
}
@@ -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;
@@ -156,7 +156,7 @@ void efx_ethtool_self_test(struct net_device *net_dev,
}
}
- rc = efx_selftest(efx, efx_tests, test->flags);
+ rc = efx_siena_selftest(efx, efx_tests, test->flags);
if (!already_up)
dev_close(efx->net_dev);
@@ -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);
@@ -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);
}
@@ -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 */
For siena use efx_siena_ as the function prefix. Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com> --- drivers/net/ethernet/sfc/siena/efx.c | 2 +- drivers/net/ethernet/sfc/siena/efx_common.c | 4 ++-- drivers/net/ethernet/sfc/siena/ethtool_common.c | 2 +- drivers/net/ethernet/sfc/siena/rx.c | 2 +- drivers/net/ethernet/sfc/siena/selftest.c | 24 ++++++++++++----------- drivers/net/ethernet/sfc/siena/selftest.h | 14 +++++++------ 6 files changed, 24 insertions(+), 24 deletions(-)