aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-main.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-10-21 03:50:53 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-24 18:07:12 -0400
commit42821a5b393e36f5c0b267473d59d375578df7ec (patch)
treebeeaa5a6ac9211567d9b13687585959a63ba1c8a /drivers/net/vxge/vxge-main.c
parent89ff05ec553f3e70b8773c501da01bf7ad952cab (diff)
vxge: make functions local and remove dead code
Use results of make namespacecheck to make functions local and remove code that is not used. Also rename initialize_ethtool_ops to vxge_initialize_ethtool_ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-main.c')
-rw-r--r--drivers/net/vxge/vxge-main.c64
1 files changed, 38 insertions, 26 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index a69542ecb68d..813829f3d024 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -82,6 +82,16 @@ module_param_array(bw_percentage, uint, NULL, 0);
82 82
83static struct vxge_drv_config *driver_config; 83static struct vxge_drv_config *driver_config;
84 84
85static enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
86 struct macInfo *mac);
87static enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
88 struct macInfo *mac);
89static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac);
90static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac);
91static enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath);
92static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath);
93static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
94
85static inline int is_vxge_card_up(struct vxgedev *vdev) 95static inline int is_vxge_card_up(struct vxgedev *vdev)
86{ 96{
87 return test_bit(__VXGE_STATE_CARD_UP, &vdev->state); 97 return test_bit(__VXGE_STATE_CARD_UP, &vdev->state);
@@ -138,7 +148,7 @@ static inline void VXGE_COMPLETE_ALL_RX(struct vxgedev *vdev)
138 * This function is called during interrupt context to notify link up state 148 * This function is called during interrupt context to notify link up state
139 * change. 149 * change.
140 */ 150 */
141void 151static void
142vxge_callback_link_up(struct __vxge_hw_device *hldev) 152vxge_callback_link_up(struct __vxge_hw_device *hldev)
143{ 153{
144 struct net_device *dev = hldev->ndev; 154 struct net_device *dev = hldev->ndev;
@@ -162,7 +172,7 @@ vxge_callback_link_up(struct __vxge_hw_device *hldev)
162 * This function is called during interrupt context to notify link down state 172 * This function is called during interrupt context to notify link down state
163 * change. 173 * change.
164 */ 174 */
165void 175static void
166vxge_callback_link_down(struct __vxge_hw_device *hldev) 176vxge_callback_link_down(struct __vxge_hw_device *hldev)
167{ 177{
168 struct net_device *dev = hldev->ndev; 178 struct net_device *dev = hldev->ndev;
@@ -354,7 +364,7 @@ static inline void vxge_post(int *dtr_cnt, void **first_dtr,
354 * If the interrupt is because of a received frame or if the receive ring 364 * If the interrupt is because of a received frame or if the receive ring
355 * contains fresh as yet un-processed frames, this function is called. 365 * contains fresh as yet un-processed frames, this function is called.
356 */ 366 */
357enum vxge_hw_status 367static enum vxge_hw_status
358vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr, 368vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
359 u8 t_code, void *userdata) 369 u8 t_code, void *userdata)
360{ 370{
@@ -531,7 +541,7 @@ vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
531 * freed and frees all skbs whose data have already DMA'ed into the NICs 541 * freed and frees all skbs whose data have already DMA'ed into the NICs
532 * internal memory. 542 * internal memory.
533 */ 543 */
534enum vxge_hw_status 544static enum vxge_hw_status
535vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr, 545vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr,
536 enum vxge_hw_fifo_tcode t_code, void *userdata, 546 enum vxge_hw_fifo_tcode t_code, void *userdata,
537 struct sk_buff ***skb_ptr, int nr_skb, int *more) 547 struct sk_buff ***skb_ptr, int nr_skb, int *more)
@@ -1246,7 +1256,7 @@ static int vxge_set_mac_addr(struct net_device *dev, void *p)
1246 * 1256 *
1247 * Enables the interrupts for the vpath 1257 * Enables the interrupts for the vpath
1248*/ 1258*/
1249void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id) 1259static void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
1250{ 1260{
1251 struct vxge_vpath *vpath = &vdev->vpaths[vp_id]; 1261 struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
1252 int msix_id = 0; 1262 int msix_id = 0;
@@ -1279,7 +1289,7 @@ void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
1279 * 1289 *
1280 * Disables the interrupts for the vpath 1290 * Disables the interrupts for the vpath
1281*/ 1291*/
1282void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id) 1292static void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
1283{ 1293{
1284 struct vxge_vpath *vpath = &vdev->vpaths[vp_id]; 1294 struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
1285 int msix_id; 1295 int msix_id;
@@ -1553,7 +1563,7 @@ out:
1553 * 1563 *
1554 * driver may reset the chip on events of serr, eccerr, etc 1564 * driver may reset the chip on events of serr, eccerr, etc
1555 */ 1565 */
1556int vxge_reset(struct vxgedev *vdev) 1566static int vxge_reset(struct vxgedev *vdev)
1557{ 1567{
1558 return do_vxge_reset(vdev, VXGE_LL_FULL_RESET); 1568 return do_vxge_reset(vdev, VXGE_LL_FULL_RESET);
1559} 1569}
@@ -1724,7 +1734,7 @@ static enum vxge_hw_status vxge_rth_configure(struct vxgedev *vdev)
1724 return status; 1734 return status;
1725} 1735}
1726 1736
1727int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac) 1737static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
1728{ 1738{
1729 struct vxge_mac_addrs *new_mac_entry; 1739 struct vxge_mac_addrs *new_mac_entry;
1730 u8 *mac_address = NULL; 1740 u8 *mac_address = NULL;
@@ -1757,7 +1767,8 @@ int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
1757} 1767}
1758 1768
1759/* Add a mac address to DA table */ 1769/* Add a mac address to DA table */
1760enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac) 1770static enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
1771 struct macInfo *mac)
1761{ 1772{
1762 enum vxge_hw_status status = VXGE_HW_OK; 1773 enum vxge_hw_status status = VXGE_HW_OK;
1763 struct vxge_vpath *vpath; 1774 struct vxge_vpath *vpath;
@@ -1782,7 +1793,7 @@ enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
1782 return status; 1793 return status;
1783} 1794}
1784 1795
1785int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac) 1796static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
1786{ 1797{
1787 struct list_head *entry, *next; 1798 struct list_head *entry, *next;
1788 u64 del_mac = 0; 1799 u64 del_mac = 0;
@@ -1807,7 +1818,8 @@ int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
1807 return FALSE; 1818 return FALSE;
1808} 1819}
1809/* delete a mac address from DA table */ 1820/* delete a mac address from DA table */
1810enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev, struct macInfo *mac) 1821static enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
1822 struct macInfo *mac)
1811{ 1823{
1812 enum vxge_hw_status status = VXGE_HW_OK; 1824 enum vxge_hw_status status = VXGE_HW_OK;
1813 struct vxge_vpath *vpath; 1825 struct vxge_vpath *vpath;
@@ -1854,7 +1866,7 @@ static vxge_search_mac_addr_in_da_table(struct vxge_vpath *vpath,
1854} 1866}
1855 1867
1856/* Store all vlan ids from the list to the vid table */ 1868/* Store all vlan ids from the list to the vid table */
1857enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath) 1869static enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
1858{ 1870{
1859 enum vxge_hw_status status = VXGE_HW_OK; 1871 enum vxge_hw_status status = VXGE_HW_OK;
1860 struct vxgedev *vdev = vpath->vdev; 1872 struct vxgedev *vdev = vpath->vdev;
@@ -1874,7 +1886,7 @@ enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
1874} 1886}
1875 1887
1876/* Store all mac addresses from the list to the DA table */ 1888/* Store all mac addresses from the list to the DA table */
1877enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath) 1889static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
1878{ 1890{
1879 enum vxge_hw_status status = VXGE_HW_OK; 1891 enum vxge_hw_status status = VXGE_HW_OK;
1880 struct macInfo mac_info; 1892 struct macInfo mac_info;
@@ -1916,7 +1928,7 @@ enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
1916} 1928}
1917 1929
1918/* reset vpaths */ 1930/* reset vpaths */
1919enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev) 1931static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
1920{ 1932{
1921 enum vxge_hw_status status = VXGE_HW_OK; 1933 enum vxge_hw_status status = VXGE_HW_OK;
1922 struct vxge_vpath *vpath; 1934 struct vxge_vpath *vpath;
@@ -1948,7 +1960,7 @@ enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
1948} 1960}
1949 1961
1950/* close vpaths */ 1962/* close vpaths */
1951void vxge_close_vpaths(struct vxgedev *vdev, int index) 1963static void vxge_close_vpaths(struct vxgedev *vdev, int index)
1952{ 1964{
1953 struct vxge_vpath *vpath; 1965 struct vxge_vpath *vpath;
1954 int i; 1966 int i;
@@ -1966,7 +1978,7 @@ void vxge_close_vpaths(struct vxgedev *vdev, int index)
1966} 1978}
1967 1979
1968/* open vpaths */ 1980/* open vpaths */
1969int vxge_open_vpaths(struct vxgedev *vdev) 1981static int vxge_open_vpaths(struct vxgedev *vdev)
1970{ 1982{
1971 struct vxge_hw_vpath_attr attr; 1983 struct vxge_hw_vpath_attr attr;
1972 enum vxge_hw_status status; 1984 enum vxge_hw_status status;
@@ -2517,7 +2529,7 @@ static void vxge_poll_vp_lockup(unsigned long data)
2517 * Return value: '0' on success and an appropriate (-)ve integer as 2529 * Return value: '0' on success and an appropriate (-)ve integer as
2518 * defined in errno.h file on failure. 2530 * defined in errno.h file on failure.
2519 */ 2531 */
2520int 2532static int
2521vxge_open(struct net_device *dev) 2533vxge_open(struct net_device *dev)
2522{ 2534{
2523 enum vxge_hw_status status; 2535 enum vxge_hw_status status;
@@ -2721,7 +2733,7 @@ out0:
2721} 2733}
2722 2734
2723/* Loop throught the mac address list and delete all the entries */ 2735/* Loop throught the mac address list and delete all the entries */
2724void vxge_free_mac_add_list(struct vxge_vpath *vpath) 2736static void vxge_free_mac_add_list(struct vxge_vpath *vpath)
2725{ 2737{
2726 2738
2727 struct list_head *entry, *next; 2739 struct list_head *entry, *next;
@@ -2745,7 +2757,7 @@ static void vxge_napi_del_all(struct vxgedev *vdev)
2745 } 2757 }
2746} 2758}
2747 2759
2748int do_vxge_close(struct net_device *dev, int do_io) 2760static int do_vxge_close(struct net_device *dev, int do_io)
2749{ 2761{
2750 enum vxge_hw_status status; 2762 enum vxge_hw_status status;
2751 struct vxgedev *vdev; 2763 struct vxgedev *vdev;
@@ -2856,7 +2868,7 @@ int do_vxge_close(struct net_device *dev, int do_io)
2856 * Return value: '0' on success and an appropriate (-)ve integer as 2868 * Return value: '0' on success and an appropriate (-)ve integer as
2857 * defined in errno.h file on failure. 2869 * defined in errno.h file on failure.
2858 */ 2870 */
2859int 2871static int
2860vxge_close(struct net_device *dev) 2872vxge_close(struct net_device *dev)
2861{ 2873{
2862 do_vxge_close(dev, 1); 2874 do_vxge_close(dev, 1);
@@ -3113,10 +3125,10 @@ static const struct net_device_ops vxge_netdev_ops = {
3113#endif 3125#endif
3114}; 3126};
3115 3127
3116int __devinit vxge_device_register(struct __vxge_hw_device *hldev, 3128static int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
3117 struct vxge_config *config, 3129 struct vxge_config *config,
3118 int high_dma, int no_of_vpath, 3130 int high_dma, int no_of_vpath,
3119 struct vxgedev **vdev_out) 3131 struct vxgedev **vdev_out)
3120{ 3132{
3121 struct net_device *ndev; 3133 struct net_device *ndev;
3122 enum vxge_hw_status status = VXGE_HW_OK; 3134 enum vxge_hw_status status = VXGE_HW_OK;
@@ -3164,7 +3176,7 @@ int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
3164 3176
3165 ndev->watchdog_timeo = VXGE_LL_WATCH_DOG_TIMEOUT; 3177 ndev->watchdog_timeo = VXGE_LL_WATCH_DOG_TIMEOUT;
3166 3178
3167 initialize_ethtool_ops(ndev); 3179 vxge_initialize_ethtool_ops(ndev);
3168 3180
3169 /* Allocate memory for vpath */ 3181 /* Allocate memory for vpath */
3170 vdev->vpaths = kzalloc((sizeof(struct vxge_vpath)) * 3182 vdev->vpaths = kzalloc((sizeof(struct vxge_vpath)) *
@@ -3249,7 +3261,7 @@ _out0:
3249 * 3261 *
3250 * This function will unregister and free network device 3262 * This function will unregister and free network device
3251 */ 3263 */
3252void 3264static void
3253vxge_device_unregister(struct __vxge_hw_device *hldev) 3265vxge_device_unregister(struct __vxge_hw_device *hldev)
3254{ 3266{
3255 struct vxgedev *vdev; 3267 struct vxgedev *vdev;