aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-10-18 01:27:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 06:09:43 -0400
commitd215697fe14a0c5a96765c6279b4751e632587a5 (patch)
tree2fd4639adc97e907853d08bfb4b6c3ee2a495694 /drivers/net
parentd0280232813a6a5e2bfca6e9257b866352115c09 (diff)
sfc: make functions static
Make local functions and variable static. Do some rearrangement of the string table stuff to put it where it gets used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sfc/efx.c16
-rw-r--r--drivers/net/sfc/efx.h10
-rw-r--r--drivers/net/sfc/ethtool.c10
-rw-r--r--drivers/net/sfc/falcon_xmac.c2
-rw-r--r--drivers/net/sfc/mac.h1
-rw-r--r--drivers/net/sfc/mcdi.c4
-rw-r--r--drivers/net/sfc/mcdi.h2
-rw-r--r--drivers/net/sfc/mcdi_phy.c3
-rw-r--r--drivers/net/sfc/net_driver.h5
-rw-r--r--drivers/net/sfc/nic.c2
-rw-r--r--drivers/net/sfc/selftest.c10
-rw-r--r--drivers/net/sfc/siena.c2
12 files changed, 26 insertions, 41 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index fa6e0207de17..05df20e47976 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -68,14 +68,6 @@ const char *efx_loopback_mode_names[] = {
68 [LOOPBACK_PHYXS_WS] = "PHYXS_WS", 68 [LOOPBACK_PHYXS_WS] = "PHYXS_WS",
69}; 69};
70 70
71/* Interrupt mode names (see INT_MODE())) */
72const unsigned int efx_interrupt_mode_max = EFX_INT_MODE_MAX;
73const char *efx_interrupt_mode_names[] = {
74 [EFX_INT_MODE_MSIX] = "MSI-X",
75 [EFX_INT_MODE_MSI] = "MSI",
76 [EFX_INT_MODE_LEGACY] = "legacy",
77};
78
79const unsigned int efx_reset_type_max = RESET_TYPE_MAX; 71const unsigned int efx_reset_type_max = RESET_TYPE_MAX;
80const char *efx_reset_type_names[] = { 72const char *efx_reset_type_names[] = {
81 [RESET_TYPE_INVISIBLE] = "INVISIBLE", 73 [RESET_TYPE_INVISIBLE] = "INVISIBLE",
@@ -128,7 +120,7 @@ static int napi_weight = 64;
128 * - Check the on-board hardware monitor; 120 * - Check the on-board hardware monitor;
129 * - Poll the link state and reconfigure the hardware as necessary. 121 * - Poll the link state and reconfigure the hardware as necessary.
130 */ 122 */
131unsigned int efx_monitor_interval = 1 * HZ; 123static unsigned int efx_monitor_interval = 1 * HZ;
132 124
133/* This controls whether or not the driver will initialise devices 125/* This controls whether or not the driver will initialise devices
134 * with invalid MAC addresses stored in the EEPROM or flash. If true, 126 * with invalid MAC addresses stored in the EEPROM or flash. If true,
@@ -2180,10 +2172,8 @@ int efx_port_dummy_op_int(struct efx_nic *efx)
2180 return 0; 2172 return 0;
2181} 2173}
2182void efx_port_dummy_op_void(struct efx_nic *efx) {} 2174void efx_port_dummy_op_void(struct efx_nic *efx) {}
2183void efx_port_dummy_op_set_id_led(struct efx_nic *efx, enum efx_led_mode mode) 2175
2184{ 2176static bool efx_port_dummy_op_poll(struct efx_nic *efx)
2185}
2186bool efx_port_dummy_op_poll(struct efx_nic *efx)
2187{ 2177{
2188 return false; 2178 return false;
2189} 2179}
diff --git a/drivers/net/sfc/efx.h b/drivers/net/sfc/efx.h
index f502b14eb22c..10a1bf40da96 100644
--- a/drivers/net/sfc/efx.h
+++ b/drivers/net/sfc/efx.h
@@ -88,10 +88,6 @@ extern int efx_reconfigure_port(struct efx_nic *efx);
88extern int __efx_reconfigure_port(struct efx_nic *efx); 88extern int __efx_reconfigure_port(struct efx_nic *efx);
89 89
90/* Ethtool support */ 90/* Ethtool support */
91extern int efx_ethtool_get_settings(struct net_device *net_dev,
92 struct ethtool_cmd *ecmd);
93extern int efx_ethtool_set_settings(struct net_device *net_dev,
94 struct ethtool_cmd *ecmd);
95extern const struct ethtool_ops efx_ethtool_ops; 91extern const struct ethtool_ops efx_ethtool_ops;
96 92
97/* Reset handling */ 93/* Reset handling */
@@ -107,9 +103,7 @@ extern void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs,
107/* Dummy PHY ops for PHY drivers */ 103/* Dummy PHY ops for PHY drivers */
108extern int efx_port_dummy_op_int(struct efx_nic *efx); 104extern int efx_port_dummy_op_int(struct efx_nic *efx);
109extern void efx_port_dummy_op_void(struct efx_nic *efx); 105extern void efx_port_dummy_op_void(struct efx_nic *efx);
110extern void 106
111efx_port_dummy_op_set_id_led(struct efx_nic *efx, enum efx_led_mode mode);
112extern bool efx_port_dummy_op_poll(struct efx_nic *efx);
113 107
114/* MTD */ 108/* MTD */
115#ifdef CONFIG_SFC_MTD 109#ifdef CONFIG_SFC_MTD
@@ -122,8 +116,6 @@ static inline void efx_mtd_rename(struct efx_nic *efx) {}
122static inline void efx_mtd_remove(struct efx_nic *efx) {} 116static inline void efx_mtd_remove(struct efx_nic *efx) {}
123#endif 117#endif
124 118
125extern unsigned int efx_monitor_interval;
126
127static inline void efx_schedule_channel(struct efx_channel *channel) 119static inline void efx_schedule_channel(struct efx_channel *channel)
128{ 120{
129 netif_vdbg(channel->efx, intr, channel->efx->net_dev, 121 netif_vdbg(channel->efx, intr, channel->efx->net_dev,
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index c95328fa3ee8..edb9d16b8b47 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -187,8 +187,8 @@ static int efx_ethtool_phys_id(struct net_device *net_dev, u32 count)
187} 187}
188 188
189/* This must be called with rtnl_lock held. */ 189/* This must be called with rtnl_lock held. */
190int efx_ethtool_get_settings(struct net_device *net_dev, 190static int efx_ethtool_get_settings(struct net_device *net_dev,
191 struct ethtool_cmd *ecmd) 191 struct ethtool_cmd *ecmd)
192{ 192{
193 struct efx_nic *efx = netdev_priv(net_dev); 193 struct efx_nic *efx = netdev_priv(net_dev);
194 struct efx_link_state *link_state = &efx->link_state; 194 struct efx_link_state *link_state = &efx->link_state;
@@ -211,8 +211,8 @@ int efx_ethtool_get_settings(struct net_device *net_dev,
211} 211}
212 212
213/* This must be called with rtnl_lock held. */ 213/* This must be called with rtnl_lock held. */
214int efx_ethtool_set_settings(struct net_device *net_dev, 214static int efx_ethtool_set_settings(struct net_device *net_dev,
215 struct ethtool_cmd *ecmd) 215 struct ethtool_cmd *ecmd)
216{ 216{
217 struct efx_nic *efx = netdev_priv(net_dev); 217 struct efx_nic *efx = netdev_priv(net_dev);
218 int rc; 218 int rc;
@@ -891,7 +891,7 @@ static int efx_ethtool_set_wol(struct net_device *net_dev,
891 return efx->type->set_wol(efx, wol->wolopts); 891 return efx->type->set_wol(efx, wol->wolopts);
892} 892}
893 893
894extern int efx_ethtool_reset(struct net_device *net_dev, u32 *flags) 894static int efx_ethtool_reset(struct net_device *net_dev, u32 *flags)
895{ 895{
896 struct efx_nic *efx = netdev_priv(net_dev); 896 struct efx_nic *efx = netdev_priv(net_dev);
897 enum reset_type method; 897 enum reset_type method;
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c
index bae656dd2c4e..b31f595ebb5b 100644
--- a/drivers/net/sfc/falcon_xmac.c
+++ b/drivers/net/sfc/falcon_xmac.c
@@ -143,7 +143,7 @@ static bool falcon_xmac_link_ok(struct efx_nic *efx)
143 efx_mdio_phyxgxs_lane_sync(efx)); 143 efx_mdio_phyxgxs_lane_sync(efx));
144} 144}
145 145
146void falcon_reconfigure_xmac_core(struct efx_nic *efx) 146static void falcon_reconfigure_xmac_core(struct efx_nic *efx)
147{ 147{
148 unsigned int max_frame_len; 148 unsigned int max_frame_len;
149 efx_oword_t reg; 149 efx_oword_t reg;
diff --git a/drivers/net/sfc/mac.h b/drivers/net/sfc/mac.h
index 7a6e5ca0290e..6886cdf87c12 100644
--- a/drivers/net/sfc/mac.h
+++ b/drivers/net/sfc/mac.h
@@ -15,7 +15,6 @@
15 15
16extern struct efx_mac_operations falcon_xmac_operations; 16extern struct efx_mac_operations falcon_xmac_operations;
17extern struct efx_mac_operations efx_mcdi_mac_operations; 17extern struct efx_mac_operations efx_mcdi_mac_operations;
18extern void falcon_reconfigure_xmac_core(struct efx_nic *efx);
19extern int efx_mcdi_mac_stats(struct efx_nic *efx, dma_addr_t dma_addr, 18extern int efx_mcdi_mac_stats(struct efx_nic *efx, dma_addr_t dma_addr,
20 u32 dma_len, int enable, int clear); 19 u32 dma_len, int enable, int clear);
21 20
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
index 3912b8fed912..12cf910c2ce7 100644
--- a/drivers/net/sfc/mcdi.c
+++ b/drivers/net/sfc/mcdi.c
@@ -1093,8 +1093,8 @@ int efx_mcdi_reset_mc(struct efx_nic *efx)
1093 return rc; 1093 return rc;
1094} 1094}
1095 1095
1096int efx_mcdi_wol_filter_set(struct efx_nic *efx, u32 type, 1096static int efx_mcdi_wol_filter_set(struct efx_nic *efx, u32 type,
1097 const u8 *mac, int *id_out) 1097 const u8 *mac, int *id_out)
1098{ 1098{
1099 u8 inbuf[MC_CMD_WOL_FILTER_SET_IN_LEN]; 1099 u8 inbuf[MC_CMD_WOL_FILTER_SET_IN_LEN];
1100 u8 outbuf[MC_CMD_WOL_FILTER_SET_OUT_LEN]; 1100 u8 outbuf[MC_CMD_WOL_FILTER_SET_OUT_LEN];
diff --git a/drivers/net/sfc/mcdi.h b/drivers/net/sfc/mcdi.h
index f1f89ad4075a..c792f1d65e48 100644
--- a/drivers/net/sfc/mcdi.h
+++ b/drivers/net/sfc/mcdi.h
@@ -121,8 +121,6 @@ extern int efx_mcdi_handle_assertion(struct efx_nic *efx);
121extern void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); 121extern void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode);
122extern int efx_mcdi_reset_port(struct efx_nic *efx); 122extern int efx_mcdi_reset_port(struct efx_nic *efx);
123extern int efx_mcdi_reset_mc(struct efx_nic *efx); 123extern int efx_mcdi_reset_mc(struct efx_nic *efx);
124extern int efx_mcdi_wol_filter_set(struct efx_nic *efx, u32 type,
125 const u8 *mac, int *id_out);
126extern int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, 124extern int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx,
127 const u8 *mac, int *id_out); 125 const u8 *mac, int *id_out);
128extern int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); 126extern int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out);
diff --git a/drivers/net/sfc/mcdi_phy.c b/drivers/net/sfc/mcdi_phy.c
index 0121e71702bf..c992742446b1 100644
--- a/drivers/net/sfc/mcdi_phy.c
+++ b/drivers/net/sfc/mcdi_phy.c
@@ -713,7 +713,8 @@ static int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results,
713 return 0; 713 return 0;
714} 714}
715 715
716const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index) 716static const char *efx_mcdi_phy_test_name(struct efx_nic *efx,
717 unsigned int index)
717{ 718{
718 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; 719 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data;
719 720
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 44f4d58a39a6..0a7e26d73b52 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -387,11 +387,6 @@ extern const unsigned int efx_loopback_mode_max;
387#define LOOPBACK_MODE(efx) \ 387#define LOOPBACK_MODE(efx) \
388 STRING_TABLE_LOOKUP((efx)->loopback_mode, efx_loopback_mode) 388 STRING_TABLE_LOOKUP((efx)->loopback_mode, efx_loopback_mode)
389 389
390extern const char *efx_interrupt_mode_names[];
391extern const unsigned int efx_interrupt_mode_max;
392#define INT_MODE(efx) \
393 STRING_TABLE_LOOKUP(efx->interrupt_mode, efx_interrupt_mode)
394
395extern const char *efx_reset_type_names[]; 390extern const char *efx_reset_type_names[];
396extern const unsigned int efx_reset_type_max; 391extern const unsigned int efx_reset_type_max;
397#define RESET_TYPE(type) \ 392#define RESET_TYPE(type) \
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c
index 394dd929fee7..41c36b9a4244 100644
--- a/drivers/net/sfc/nic.c
+++ b/drivers/net/sfc/nic.c
@@ -653,7 +653,7 @@ void efx_nic_eventq_read_ack(struct efx_channel *channel)
653} 653}
654 654
655/* Use HW to insert a SW defined event */ 655/* Use HW to insert a SW defined event */
656void efx_generate_event(struct efx_channel *channel, efx_qword_t *event) 656static void efx_generate_event(struct efx_channel *channel, efx_qword_t *event)
657{ 657{
658 efx_oword_t drv_ev_reg; 658 efx_oword_t drv_ev_reg;
659 659
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index da4473b71058..0ebfb99f1299 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -48,6 +48,16 @@ static const unsigned char payload_source[ETH_ALEN] = {
48static const char payload_msg[] = 48static const char payload_msg[] =
49 "Hello world! This is an Efx loopback test in progress!"; 49 "Hello world! This is an Efx loopback test in progress!";
50 50
51/* Interrupt mode names */
52static const unsigned int efx_interrupt_mode_max = EFX_INT_MODE_MAX;
53static const char *efx_interrupt_mode_names[] = {
54 [EFX_INT_MODE_MSIX] = "MSI-X",
55 [EFX_INT_MODE_MSI] = "MSI",
56 [EFX_INT_MODE_LEGACY] = "legacy",
57};
58#define INT_MODE(efx) \
59 STRING_TABLE_LOOKUP(efx->interrupt_mode, efx_interrupt_mode)
60
51/** 61/**
52 * efx_loopback_state - persistent state during a loopback selftest 62 * efx_loopback_state - persistent state during a loopback selftest
53 * @flush: Drop all packets in efx_loopback_rx_packet 63 * @flush: Drop all packets in efx_loopback_rx_packet
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
index 2115f95ddc88..45236f58a258 100644
--- a/drivers/net/sfc/siena.c
+++ b/drivers/net/sfc/siena.c
@@ -129,7 +129,7 @@ static int siena_probe_port(struct efx_nic *efx)
129 return 0; 129 return 0;
130} 130}
131 131
132void siena_remove_port(struct efx_nic *efx) 132static void siena_remove_port(struct efx_nic *efx)
133{ 133{
134 efx->phy_op->remove(efx); 134 efx->phy_op->remove(efx);
135 efx_nic_free_buffer(efx, &efx->stats_buffer); 135 efx_nic_free_buffer(efx, &efx->stats_buffer);