aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/s2io.c22
-rw-r--r--drivers/net/s2io.h17
2 files changed, 18 insertions, 21 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 89c46787676c..41c75616e913 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -72,8 +72,8 @@
72static char s2io_driver_name[] = "Neterion"; 72static char s2io_driver_name[] = "Neterion";
73static char s2io_driver_version[] = DRV_VERSION; 73static char s2io_driver_version[] = DRV_VERSION;
74 74
75int rxd_size[4] = {32,48,48,64}; 75static int rxd_size[4] = {32,48,48,64};
76int rxd_count[4] = {127,85,85,63}; 76static int rxd_count[4] = {127,85,85,63};
77 77
78static inline int RXD_IS_UP2DT(RxD_t *rxdp) 78static inline int RXD_IS_UP2DT(RxD_t *rxdp)
79{ 79{
@@ -2127,7 +2127,7 @@ static void stop_nic(struct s2io_nic *nic)
2127 } 2127 }
2128} 2128}
2129 2129
2130int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb) 2130static int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
2131{ 2131{
2132 struct net_device *dev = nic->dev; 2132 struct net_device *dev = nic->dev;
2133 struct sk_buff *frag_list; 2133 struct sk_buff *frag_list;
@@ -2852,7 +2852,7 @@ static int wait_for_cmd_complete(nic_t * sp)
2852 * void. 2852 * void.
2853 */ 2853 */
2854 2854
2855void s2io_reset(nic_t * sp) 2855static void s2io_reset(nic_t * sp)
2856{ 2856{
2857 XENA_dev_config_t __iomem *bar0 = sp->bar0; 2857 XENA_dev_config_t __iomem *bar0 = sp->bar0;
2858 u64 val64; 2858 u64 val64;
@@ -2940,7 +2940,7 @@ void s2io_reset(nic_t * sp)
2940 * SUCCESS on success and FAILURE on failure. 2940 * SUCCESS on success and FAILURE on failure.
2941 */ 2941 */
2942 2942
2943int s2io_set_swapper(nic_t * sp) 2943static int s2io_set_swapper(nic_t * sp)
2944{ 2944{
2945 struct net_device *dev = sp->dev; 2945 struct net_device *dev = sp->dev;
2946 XENA_dev_config_t __iomem *bar0 = sp->bar0; 2946 XENA_dev_config_t __iomem *bar0 = sp->bar0;
@@ -3089,7 +3089,7 @@ static int wait_for_msix_trans(nic_t *nic, int i)
3089 return ret; 3089 return ret;
3090} 3090}
3091 3091
3092void restore_xmsi_data(nic_t *nic) 3092static void restore_xmsi_data(nic_t *nic)
3093{ 3093{
3094 XENA_dev_config_t __iomem *bar0 = nic->bar0; 3094 XENA_dev_config_t __iomem *bar0 = nic->bar0;
3095 u64 val64; 3095 u64 val64;
@@ -3180,7 +3180,7 @@ int s2io_enable_msi(nic_t *nic)
3180 return 0; 3180 return 0;
3181} 3181}
3182 3182
3183int s2io_enable_msi_x(nic_t *nic) 3183static int s2io_enable_msi_x(nic_t *nic)
3184{ 3184{
3185 XENA_dev_config_t __iomem *bar0 = nic->bar0; 3185 XENA_dev_config_t __iomem *bar0 = nic->bar0;
3186 u64 tx_mat, rx_mat; 3186 u64 tx_mat, rx_mat;
@@ -4128,7 +4128,7 @@ static void s2io_set_multicast(struct net_device *dev)
4128 * as defined in errno.h file on failure. 4128 * as defined in errno.h file on failure.
4129 */ 4129 */
4130 4130
4131int s2io_set_mac_addr(struct net_device *dev, u8 * addr) 4131static int s2io_set_mac_addr(struct net_device *dev, u8 * addr)
4132{ 4132{
4133 nic_t *sp = dev->priv; 4133 nic_t *sp = dev->priv;
4134 XENA_dev_config_t __iomem *bar0 = sp->bar0; 4134 XENA_dev_config_t __iomem *bar0 = sp->bar0;
@@ -5713,7 +5713,7 @@ static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp)
5713 * void. 5713 * void.
5714 */ 5714 */
5715 5715
5716void s2io_link(nic_t * sp, int link) 5716static void s2io_link(nic_t * sp, int link)
5717{ 5717{
5718 struct net_device *dev = (struct net_device *) sp->dev; 5718 struct net_device *dev = (struct net_device *) sp->dev;
5719 5719
@@ -5738,7 +5738,7 @@ void s2io_link(nic_t * sp, int link)
5738 * returns the revision ID of the device. 5738 * returns the revision ID of the device.
5739 */ 5739 */
5740 5740
5741int get_xena_rev_id(struct pci_dev *pdev) 5741static int get_xena_rev_id(struct pci_dev *pdev)
5742{ 5742{
5743 u8 id = 0; 5743 u8 id = 0;
5744 int ret; 5744 int ret;
@@ -6343,7 +6343,7 @@ int __init s2io_starter(void)
6343 * Description: This function is the cleanup routine for the driver. It unregist * ers the driver. 6343 * Description: This function is the cleanup routine for the driver. It unregist * ers the driver.
6344 */ 6344 */
6345 6345
6346void s2io_closer(void) 6346static void s2io_closer(void)
6347{ 6347{
6348 pci_unregister_driver(&s2io_driver); 6348 pci_unregister_driver(&s2io_driver);
6349 DBG_PRINT(INIT_DBG, "cleanup done\n"); 6349 DBG_PRINT(INIT_DBG, "cleanup done\n");
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 852a6a899d07..68ae33651947 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -64,7 +64,7 @@ typedef enum xena_max_outstanding_splits {
64#define INTR_DBG 4 64#define INTR_DBG 4
65 65
66/* Global variable that defines the present debug level of the driver. */ 66/* Global variable that defines the present debug level of the driver. */
67int debug_level = ERR_DBG; /* Default level. */ 67static int debug_level = ERR_DBG;
68 68
69/* DEBUG message print. */ 69/* DEBUG message print. */
70#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) 70#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args)
@@ -268,7 +268,7 @@ typedef struct stat_block {
268#define MAX_RX_RINGS 8 268#define MAX_RX_RINGS 8
269 269
270/* FIFO mappings for all possible number of fifos configured */ 270/* FIFO mappings for all possible number of fifos configured */
271int fifo_map[][MAX_TX_FIFOS] = { 271static int fifo_map[][MAX_TX_FIFOS] = {
272 {0, 0, 0, 0, 0, 0, 0, 0}, 272 {0, 0, 0, 0, 0, 0, 0, 0},
273 {0, 0, 0, 0, 1, 1, 1, 1}, 273 {0, 0, 0, 0, 1, 1, 1, 1},
274 {0, 0, 0, 1, 1, 1, 2, 2}, 274 {0, 0, 0, 1, 1, 1, 2, 2},
@@ -911,18 +911,16 @@ static void tx_intr_handler(fifo_info_t *fifo_data);
911static void alarm_intr_handler(struct s2io_nic *sp); 911static void alarm_intr_handler(struct s2io_nic *sp);
912 912
913static int s2io_starter(void); 913static int s2io_starter(void);
914void s2io_closer(void);
915static void s2io_tx_watchdog(struct net_device *dev); 914static void s2io_tx_watchdog(struct net_device *dev);
916static void s2io_tasklet(unsigned long dev_addr); 915static void s2io_tasklet(unsigned long dev_addr);
917static void s2io_set_multicast(struct net_device *dev); 916static void s2io_set_multicast(struct net_device *dev);
918static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp); 917static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp);
919void s2io_link(nic_t * sp, int link); 918static void s2io_link(nic_t * sp, int link);
920void s2io_reset(nic_t * sp);
921#if defined(CONFIG_S2IO_NAPI) 919#if defined(CONFIG_S2IO_NAPI)
922static int s2io_poll(struct net_device *dev, int *budget); 920static int s2io_poll(struct net_device *dev, int *budget);
923#endif 921#endif
924static void s2io_init_pci(nic_t * sp); 922static void s2io_init_pci(nic_t * sp);
925int s2io_set_mac_addr(struct net_device *dev, u8 * addr); 923static int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
926static void s2io_alarm_handle(unsigned long data); 924static void s2io_alarm_handle(unsigned long data);
927static int s2io_enable_msi(nic_t *nic); 925static int s2io_enable_msi(nic_t *nic);
928static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs); 926static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs);
@@ -930,14 +928,13 @@ static irqreturn_t
930s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs); 928s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs);
931static irqreturn_t 929static irqreturn_t
932s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs); 930s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs);
933int s2io_enable_msi_x(nic_t *nic);
934static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); 931static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs);
935static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); 932static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
936static struct ethtool_ops netdev_ethtool_ops; 933static struct ethtool_ops netdev_ethtool_ops;
937static void s2io_set_link(unsigned long data); 934static void s2io_set_link(unsigned long data);
938int s2io_set_swapper(nic_t * sp); 935static int s2io_set_swapper(nic_t * sp);
939static void s2io_card_down(nic_t *nic); 936static void s2io_card_down(nic_t *nic);
940static int s2io_card_up(nic_t *nic); 937static int s2io_card_up(nic_t *nic);
941int get_xena_rev_id(struct pci_dev *pdev); 938static int get_xena_rev_id(struct pci_dev *pdev);
942void restore_xmsi_data(nic_t *nic); 939static void restore_xmsi_data(nic_t *nic);
943#endif /* _S2IO_H */ 940#endif /* _S2IO_H */