diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-18 01:27:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 06:09:43 -0400 |
commit | d215697fe14a0c5a96765c6279b4751e632587a5 (patch) | |
tree | 2fd4639adc97e907853d08bfb4b6c3ee2a495694 /drivers/net/sfc | |
parent | d0280232813a6a5e2bfca6e9257b866352115c09 (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/sfc')
-rw-r--r-- | drivers/net/sfc/efx.c | 16 | ||||
-rw-r--r-- | drivers/net/sfc/efx.h | 10 | ||||
-rw-r--r-- | drivers/net/sfc/ethtool.c | 10 | ||||
-rw-r--r-- | drivers/net/sfc/falcon_xmac.c | 2 | ||||
-rw-r--r-- | drivers/net/sfc/mac.h | 1 | ||||
-rw-r--r-- | drivers/net/sfc/mcdi.c | 4 | ||||
-rw-r--r-- | drivers/net/sfc/mcdi.h | 2 | ||||
-rw-r--r-- | drivers/net/sfc/mcdi_phy.c | 3 | ||||
-rw-r--r-- | drivers/net/sfc/net_driver.h | 5 | ||||
-rw-r--r-- | drivers/net/sfc/nic.c | 2 | ||||
-rw-r--r-- | drivers/net/sfc/selftest.c | 10 | ||||
-rw-r--r-- | drivers/net/sfc/siena.c | 2 |
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())) */ | ||
72 | const unsigned int efx_interrupt_mode_max = EFX_INT_MODE_MAX; | ||
73 | const 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 | |||
79 | const unsigned int efx_reset_type_max = RESET_TYPE_MAX; | 71 | const unsigned int efx_reset_type_max = RESET_TYPE_MAX; |
80 | const char *efx_reset_type_names[] = { | 72 | const 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 | */ |
131 | unsigned int efx_monitor_interval = 1 * HZ; | 123 | static 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 | } |
2182 | void efx_port_dummy_op_void(struct efx_nic *efx) {} | 2174 | void efx_port_dummy_op_void(struct efx_nic *efx) {} |
2183 | void efx_port_dummy_op_set_id_led(struct efx_nic *efx, enum efx_led_mode mode) | 2175 | |
2184 | { | 2176 | static bool efx_port_dummy_op_poll(struct efx_nic *efx) |
2185 | } | ||
2186 | bool 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); | |||
88 | extern int __efx_reconfigure_port(struct efx_nic *efx); | 88 | extern int __efx_reconfigure_port(struct efx_nic *efx); |
89 | 89 | ||
90 | /* Ethtool support */ | 90 | /* Ethtool support */ |
91 | extern int efx_ethtool_get_settings(struct net_device *net_dev, | ||
92 | struct ethtool_cmd *ecmd); | ||
93 | extern int efx_ethtool_set_settings(struct net_device *net_dev, | ||
94 | struct ethtool_cmd *ecmd); | ||
95 | extern const struct ethtool_ops efx_ethtool_ops; | 91 | extern 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 */ |
108 | extern int efx_port_dummy_op_int(struct efx_nic *efx); | 104 | extern int efx_port_dummy_op_int(struct efx_nic *efx); |
109 | extern void efx_port_dummy_op_void(struct efx_nic *efx); | 105 | extern void efx_port_dummy_op_void(struct efx_nic *efx); |
110 | extern void | 106 | |
111 | efx_port_dummy_op_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); | ||
112 | extern 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) {} | |||
122 | static inline void efx_mtd_remove(struct efx_nic *efx) {} | 116 | static inline void efx_mtd_remove(struct efx_nic *efx) {} |
123 | #endif | 117 | #endif |
124 | 118 | ||
125 | extern unsigned int efx_monitor_interval; | ||
126 | |||
127 | static inline void efx_schedule_channel(struct efx_channel *channel) | 119 | static 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. */ |
190 | int efx_ethtool_get_settings(struct net_device *net_dev, | 190 | static 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. */ |
214 | int efx_ethtool_set_settings(struct net_device *net_dev, | 214 | static 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 | ||
894 | extern int efx_ethtool_reset(struct net_device *net_dev, u32 *flags) | 894 | static 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 | ||
146 | void falcon_reconfigure_xmac_core(struct efx_nic *efx) | 146 | static 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 | ||
16 | extern struct efx_mac_operations falcon_xmac_operations; | 16 | extern struct efx_mac_operations falcon_xmac_operations; |
17 | extern struct efx_mac_operations efx_mcdi_mac_operations; | 17 | extern struct efx_mac_operations efx_mcdi_mac_operations; |
18 | extern void falcon_reconfigure_xmac_core(struct efx_nic *efx); | ||
19 | extern int efx_mcdi_mac_stats(struct efx_nic *efx, dma_addr_t dma_addr, | 18 | extern 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 | ||
1096 | int efx_mcdi_wol_filter_set(struct efx_nic *efx, u32 type, | 1096 | static 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); | |||
121 | extern void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); | 121 | extern void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); |
122 | extern int efx_mcdi_reset_port(struct efx_nic *efx); | 122 | extern int efx_mcdi_reset_port(struct efx_nic *efx); |
123 | extern int efx_mcdi_reset_mc(struct efx_nic *efx); | 123 | extern int efx_mcdi_reset_mc(struct efx_nic *efx); |
124 | extern int efx_mcdi_wol_filter_set(struct efx_nic *efx, u32 type, | ||
125 | const u8 *mac, int *id_out); | ||
126 | extern int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, | 124 | extern 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); |
128 | extern int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); | 126 | extern 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 | ||
716 | const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index) | 716 | static 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 | ||
390 | extern const char *efx_interrupt_mode_names[]; | ||
391 | extern const unsigned int efx_interrupt_mode_max; | ||
392 | #define INT_MODE(efx) \ | ||
393 | STRING_TABLE_LOOKUP(efx->interrupt_mode, efx_interrupt_mode) | ||
394 | |||
395 | extern const char *efx_reset_type_names[]; | 390 | extern const char *efx_reset_type_names[]; |
396 | extern const unsigned int efx_reset_type_max; | 391 | extern 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 */ |
656 | void efx_generate_event(struct efx_channel *channel, efx_qword_t *event) | 656 | static 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] = { | |||
48 | static const char payload_msg[] = | 48 | static 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 */ | ||
52 | static const unsigned int efx_interrupt_mode_max = EFX_INT_MODE_MAX; | ||
53 | static 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 | ||
132 | void siena_remove_port(struct efx_nic *efx) | 132 | static 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); |