aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 0745dd9d01f3..e57df8dfe6b4 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -55,7 +55,6 @@
55#include <linux/timex.h> 55#include <linux/timex.h>
56#include <linux/sched.h> 56#include <linux/sched.h>
57#include <linux/ethtool.h> 57#include <linux/ethtool.h>
58#include <linux/version.h>
59#include <linux/workqueue.h> 58#include <linux/workqueue.h>
60#include <linux/if_vlan.h> 59#include <linux/if_vlan.h>
61 60
@@ -1532,7 +1531,7 @@ static int init_nic(struct s2io_nic *nic)
1532#define LINK_UP_DOWN_INTERRUPT 1 1531#define LINK_UP_DOWN_INTERRUPT 1
1533#define MAC_RMAC_ERR_TIMER 2 1532#define MAC_RMAC_ERR_TIMER 2
1534 1533
1535int s2io_link_fault_indication(nic_t *nic) 1534static int s2io_link_fault_indication(nic_t *nic)
1536{ 1535{
1537 if (nic->intr_type != INTA) 1536 if (nic->intr_type != INTA)
1538 return MAC_RMAC_ERR_TIMER; 1537 return MAC_RMAC_ERR_TIMER;
@@ -1864,7 +1863,7 @@ static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag)
1864 * 1863 *
1865 */ 1864 */
1866 1865
1867void fix_mac_address(nic_t * sp) 1866static void fix_mac_address(nic_t * sp)
1868{ 1867{
1869 XENA_dev_config_t __iomem *bar0 = sp->bar0; 1868 XENA_dev_config_t __iomem *bar0 = sp->bar0;
1870 u64 val64; 1869 u64 val64;
@@ -2160,7 +2159,7 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
2160 * SUCCESS on success or an appropriate -ve value on failure. 2159 * SUCCESS on success or an appropriate -ve value on failure.
2161 */ 2160 */
2162 2161
2163int fill_rx_buffers(struct s2io_nic *nic, int ring_no) 2162static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
2164{ 2163{
2165 struct net_device *dev = nic->dev; 2164 struct net_device *dev = nic->dev;
2166 struct sk_buff *skb; 2165 struct sk_buff *skb;
@@ -2831,7 +2830,7 @@ static void alarm_intr_handler(struct s2io_nic *nic)
2831 * SUCCESS on success and FAILURE on failure. 2830 * SUCCESS on success and FAILURE on failure.
2832 */ 2831 */
2833 2832
2834int wait_for_cmd_complete(nic_t * sp) 2833static int wait_for_cmd_complete(nic_t * sp)
2835{ 2834{
2836 XENA_dev_config_t __iomem *bar0 = sp->bar0; 2835 XENA_dev_config_t __iomem *bar0 = sp->bar0;
2837 int ret = FAILURE, cnt = 0; 2836 int ret = FAILURE, cnt = 0;
@@ -3077,7 +3076,7 @@ int s2io_set_swapper(nic_t * sp)
3077 return SUCCESS; 3076 return SUCCESS;
3078} 3077}
3079 3078
3080int wait_for_msix_trans(nic_t *nic, int i) 3079static int wait_for_msix_trans(nic_t *nic, int i)
3081{ 3080{
3082 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3081 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
3083 u64 val64; 3082 u64 val64;
@@ -3116,7 +3115,7 @@ void restore_xmsi_data(nic_t *nic)
3116 } 3115 }
3117} 3116}
3118 3117
3119void store_xmsi_data(nic_t *nic) 3118static void store_xmsi_data(nic_t *nic)
3120{ 3119{
3121 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3120 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
3122 u64 val64, addr, data; 3121 u64 val64, addr, data;
@@ -3288,7 +3287,7 @@ int s2io_enable_msi_x(nic_t *nic)
3288 * file on failure. 3287 * file on failure.
3289 */ 3288 */
3290 3289
3291int s2io_open(struct net_device *dev) 3290static int s2io_open(struct net_device *dev)
3292{ 3291{
3293 nic_t *sp = dev->priv; 3292 nic_t *sp = dev->priv;
3294 int err = 0; 3293 int err = 0;
@@ -3418,7 +3417,7 @@ hw_init_failed:
3418 * file on failure. 3417 * file on failure.
3419 */ 3418 */
3420 3419
3421int s2io_close(struct net_device *dev) 3420static int s2io_close(struct net_device *dev)
3422{ 3421{
3423 nic_t *sp = dev->priv; 3422 nic_t *sp = dev->priv;
3424 int i; 3423 int i;
@@ -3467,7 +3466,7 @@ int s2io_close(struct net_device *dev)
3467 * 0 on success & 1 on failure. 3466 * 0 on success & 1 on failure.
3468 */ 3467 */
3469 3468
3470int s2io_xmit(struct sk_buff *skb, struct net_device *dev) 3469static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3471{ 3470{
3472 nic_t *sp = dev->priv; 3471 nic_t *sp = dev->priv;
3473 u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; 3472 u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off;
@@ -3913,7 +3912,7 @@ static void s2io_updt_stats(nic_t *sp)
3913 * pointer to the updated net_device_stats structure. 3912 * pointer to the updated net_device_stats structure.
3914 */ 3913 */
3915 3914
3916struct net_device_stats *s2io_get_stats(struct net_device *dev) 3915static struct net_device_stats *s2io_get_stats(struct net_device *dev)
3917{ 3916{
3918 nic_t *sp = dev->priv; 3917 nic_t *sp = dev->priv;
3919 mac_info_t *mac_control; 3918 mac_info_t *mac_control;
@@ -5106,19 +5105,20 @@ static void s2io_get_ethtool_stats(struct net_device *dev,
5106 tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs; 5105 tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs;
5107} 5106}
5108 5107
5109int s2io_ethtool_get_regs_len(struct net_device *dev) 5108static int s2io_ethtool_get_regs_len(struct net_device *dev)
5110{ 5109{
5111 return (XENA_REG_SPACE); 5110 return (XENA_REG_SPACE);
5112} 5111}
5113 5112
5114 5113
5115u32 s2io_ethtool_get_rx_csum(struct net_device * dev) 5114static u32 s2io_ethtool_get_rx_csum(struct net_device * dev)
5116{ 5115{
5117 nic_t *sp = dev->priv; 5116 nic_t *sp = dev->priv;
5118 5117
5119 return (sp->rx_csum); 5118 return (sp->rx_csum);
5120} 5119}
5121int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) 5120
5121static int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
5122{ 5122{
5123 nic_t *sp = dev->priv; 5123 nic_t *sp = dev->priv;
5124 5124
@@ -5129,17 +5129,19 @@ int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
5129 5129
5130 return 0; 5130 return 0;
5131} 5131}
5132int s2io_get_eeprom_len(struct net_device *dev) 5132
5133static int s2io_get_eeprom_len(struct net_device *dev)
5133{ 5134{
5134 return (XENA_EEPROM_SPACE); 5135 return (XENA_EEPROM_SPACE);
5135} 5136}
5136 5137
5137int s2io_ethtool_self_test_count(struct net_device *dev) 5138static int s2io_ethtool_self_test_count(struct net_device *dev)
5138{ 5139{
5139 return (S2IO_TEST_LEN); 5140 return (S2IO_TEST_LEN);
5140} 5141}
5141void s2io_ethtool_get_strings(struct net_device *dev, 5142
5142 u32 stringset, u8 * data) 5143static void s2io_ethtool_get_strings(struct net_device *dev,
5144 u32 stringset, u8 * data)
5143{ 5145{
5144 switch (stringset) { 5146 switch (stringset) {
5145 case ETH_SS_TEST: 5147 case ETH_SS_TEST:
@@ -5155,7 +5157,7 @@ static int s2io_ethtool_get_stats_count(struct net_device *dev)
5155 return (S2IO_STAT_LEN); 5157 return (S2IO_STAT_LEN);
5156} 5158}
5157 5159
5158int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) 5160static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
5159{ 5161{
5160 if (data) 5162 if (data)
5161 dev->features |= NETIF_F_IP_CSUM; 5163 dev->features |= NETIF_F_IP_CSUM;
@@ -5208,7 +5210,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
5208 * function always return EOPNOTSUPPORTED 5210 * function always return EOPNOTSUPPORTED
5209 */ 5211 */
5210 5212
5211int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 5213static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5212{ 5214{
5213 return -EOPNOTSUPP; 5215 return -EOPNOTSUPP;
5214} 5216}
@@ -5224,7 +5226,7 @@ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5224 * file on failure. 5226 * file on failure.
5225 */ 5227 */
5226 5228
5227int s2io_change_mtu(struct net_device *dev, int new_mtu) 5229static int s2io_change_mtu(struct net_device *dev, int new_mtu)
5228{ 5230{
5229 nic_t *sp = dev->priv; 5231 nic_t *sp = dev->priv;
5230 5232