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.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 9c4935407f26..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;
@@ -2110,7 +2109,7 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
2110{ 2109{
2111 struct net_device *dev = nic->dev; 2110 struct net_device *dev = nic->dev;
2112 struct sk_buff *frag_list; 2111 struct sk_buff *frag_list;
2113 u64 tmp; 2112 void *tmp;
2114 2113
2115 /* Buffer-1 receives L3/L4 headers */ 2114 /* Buffer-1 receives L3/L4 headers */
2116 ((RxD3_t*)rxdp)->Buffer1_ptr = pci_map_single 2115 ((RxD3_t*)rxdp)->Buffer1_ptr = pci_map_single
@@ -2125,11 +2124,9 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
2125 } 2124 }
2126 frag_list = skb_shinfo(skb)->frag_list; 2125 frag_list = skb_shinfo(skb)->frag_list;
2127 frag_list->next = NULL; 2126 frag_list->next = NULL;
2128 tmp = (u64) frag_list->data; 2127 tmp = (void *)ALIGN((long)frag_list->data, ALIGN_SIZE + 1);
2129 tmp += ALIGN_SIZE; 2128 frag_list->data = tmp;
2130 tmp &= ~ALIGN_SIZE; 2129 frag_list->tail = tmp;
2131 frag_list->data = (void *) tmp;
2132 frag_list->tail = (void *) tmp;
2133 2130
2134 /* Buffer-2 receives L4 data payload */ 2131 /* Buffer-2 receives L4 data payload */
2135 ((RxD3_t*)rxdp)->Buffer2_ptr = pci_map_single(nic->pdev, 2132 ((RxD3_t*)rxdp)->Buffer2_ptr = pci_map_single(nic->pdev,
@@ -2162,7 +2159,7 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
2162 * SUCCESS on success or an appropriate -ve value on failure. 2159 * SUCCESS on success or an appropriate -ve value on failure.
2163 */ 2160 */
2164 2161
2165int fill_rx_buffers(struct s2io_nic *nic, int ring_no) 2162static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
2166{ 2163{
2167 struct net_device *dev = nic->dev; 2164 struct net_device *dev = nic->dev;
2168 struct sk_buff *skb; 2165 struct sk_buff *skb;
@@ -2833,7 +2830,7 @@ static void alarm_intr_handler(struct s2io_nic *nic)
2833 * SUCCESS on success and FAILURE on failure. 2830 * SUCCESS on success and FAILURE on failure.
2834 */ 2831 */
2835 2832
2836int wait_for_cmd_complete(nic_t * sp) 2833static int wait_for_cmd_complete(nic_t * sp)
2837{ 2834{
2838 XENA_dev_config_t __iomem *bar0 = sp->bar0; 2835 XENA_dev_config_t __iomem *bar0 = sp->bar0;
2839 int ret = FAILURE, cnt = 0; 2836 int ret = FAILURE, cnt = 0;
@@ -3079,7 +3076,7 @@ int s2io_set_swapper(nic_t * sp)
3079 return SUCCESS; 3076 return SUCCESS;
3080} 3077}
3081 3078
3082int wait_for_msix_trans(nic_t *nic, int i) 3079static int wait_for_msix_trans(nic_t *nic, int i)
3083{ 3080{
3084 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3081 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
3085 u64 val64; 3082 u64 val64;
@@ -3118,7 +3115,7 @@ void restore_xmsi_data(nic_t *nic)
3118 } 3115 }
3119} 3116}
3120 3117
3121void store_xmsi_data(nic_t *nic) 3118static void store_xmsi_data(nic_t *nic)
3122{ 3119{
3123 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3120 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
3124 u64 val64, addr, data; 3121 u64 val64, addr, data;
@@ -3290,7 +3287,7 @@ int s2io_enable_msi_x(nic_t *nic)
3290 * file on failure. 3287 * file on failure.
3291 */ 3288 */
3292 3289
3293int s2io_open(struct net_device *dev) 3290static int s2io_open(struct net_device *dev)
3294{ 3291{
3295 nic_t *sp = dev->priv; 3292 nic_t *sp = dev->priv;
3296 int err = 0; 3293 int err = 0;
@@ -3420,7 +3417,7 @@ hw_init_failed:
3420 * file on failure. 3417 * file on failure.
3421 */ 3418 */
3422 3419
3423int s2io_close(struct net_device *dev) 3420static int s2io_close(struct net_device *dev)
3424{ 3421{
3425 nic_t *sp = dev->priv; 3422 nic_t *sp = dev->priv;
3426 int i; 3423 int i;
@@ -3469,7 +3466,7 @@ int s2io_close(struct net_device *dev)
3469 * 0 on success & 1 on failure. 3466 * 0 on success & 1 on failure.
3470 */ 3467 */
3471 3468
3472int s2io_xmit(struct sk_buff *skb, struct net_device *dev) 3469static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3473{ 3470{
3474 nic_t *sp = dev->priv; 3471 nic_t *sp = dev->priv;
3475 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;
@@ -3915,7 +3912,7 @@ static void s2io_updt_stats(nic_t *sp)
3915 * pointer to the updated net_device_stats structure. 3912 * pointer to the updated net_device_stats structure.
3916 */ 3913 */
3917 3914
3918struct net_device_stats *s2io_get_stats(struct net_device *dev) 3915static struct net_device_stats *s2io_get_stats(struct net_device *dev)
3919{ 3916{
3920 nic_t *sp = dev->priv; 3917 nic_t *sp = dev->priv;
3921 mac_info_t *mac_control; 3918 mac_info_t *mac_control;
@@ -5108,19 +5105,20 @@ static void s2io_get_ethtool_stats(struct net_device *dev,
5108 tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs; 5105 tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs;
5109} 5106}
5110 5107
5111int s2io_ethtool_get_regs_len(struct net_device *dev) 5108static int s2io_ethtool_get_regs_len(struct net_device *dev)
5112{ 5109{
5113 return (XENA_REG_SPACE); 5110 return (XENA_REG_SPACE);
5114} 5111}
5115 5112
5116 5113
5117u32 s2io_ethtool_get_rx_csum(struct net_device * dev) 5114static u32 s2io_ethtool_get_rx_csum(struct net_device * dev)
5118{ 5115{
5119 nic_t *sp = dev->priv; 5116 nic_t *sp = dev->priv;
5120 5117
5121 return (sp->rx_csum); 5118 return (sp->rx_csum);
5122} 5119}
5123int 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)
5124{ 5122{
5125 nic_t *sp = dev->priv; 5123 nic_t *sp = dev->priv;
5126 5124
@@ -5131,17 +5129,19 @@ int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
5131 5129
5132 return 0; 5130 return 0;
5133} 5131}
5134int s2io_get_eeprom_len(struct net_device *dev) 5132
5133static int s2io_get_eeprom_len(struct net_device *dev)
5135{ 5134{
5136 return (XENA_EEPROM_SPACE); 5135 return (XENA_EEPROM_SPACE);
5137} 5136}
5138 5137
5139int s2io_ethtool_self_test_count(struct net_device *dev) 5138static int s2io_ethtool_self_test_count(struct net_device *dev)
5140{ 5139{
5141 return (S2IO_TEST_LEN); 5140 return (S2IO_TEST_LEN);
5142} 5141}
5143void s2io_ethtool_get_strings(struct net_device *dev, 5142
5144 u32 stringset, u8 * data) 5143static void s2io_ethtool_get_strings(struct net_device *dev,
5144 u32 stringset, u8 * data)
5145{ 5145{
5146 switch (stringset) { 5146 switch (stringset) {
5147 case ETH_SS_TEST: 5147 case ETH_SS_TEST:
@@ -5157,7 +5157,7 @@ static int s2io_ethtool_get_stats_count(struct net_device *dev)
5157 return (S2IO_STAT_LEN); 5157 return (S2IO_STAT_LEN);
5158} 5158}
5159 5159
5160int 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)
5161{ 5161{
5162 if (data) 5162 if (data)
5163 dev->features |= NETIF_F_IP_CSUM; 5163 dev->features |= NETIF_F_IP_CSUM;
@@ -5210,7 +5210,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
5210 * function always return EOPNOTSUPPORTED 5210 * function always return EOPNOTSUPPORTED
5211 */ 5211 */
5212 5212
5213int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 5213static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5214{ 5214{
5215 return -EOPNOTSUPP; 5215 return -EOPNOTSUPP;
5216} 5216}
@@ -5226,7 +5226,7 @@ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5226 * file on failure. 5226 * file on failure.
5227 */ 5227 */
5228 5228
5229int s2io_change_mtu(struct net_device *dev, int new_mtu) 5229static int s2io_change_mtu(struct net_device *dev, int new_mtu)
5230{ 5230{
5231 nic_t *sp = dev->priv; 5231 nic_t *sp = dev->priv;
5232 5232