aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/nes/nes.c2
-rw-r--r--drivers/infiniband/hw/nes/nes.h16
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c97
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.h32
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c33
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c2
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c3
7 files changed, 88 insertions, 97 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index b23e22a785ae..dcb601c3dec1 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -92,7 +92,7 @@ module_param_named(debug_level, nes_debug_level, uint, 0644);
92MODULE_PARM_DESC(debug_level, "Enable debug output level"); 92MODULE_PARM_DESC(debug_level, "Enable debug output level");
93 93
94LIST_HEAD(nes_adapter_list); 94LIST_HEAD(nes_adapter_list);
95LIST_HEAD(nes_dev_list); 95static LIST_HEAD(nes_dev_list);
96 96
97atomic_t qps_destroyed; 97atomic_t qps_destroyed;
98 98
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index 3f5a04d2e62d..bd92be79b63e 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -176,9 +176,6 @@ extern unsigned int nes_drv_opt;
176extern unsigned int nes_debug_level; 176extern unsigned int nes_debug_level;
177 177
178extern struct list_head nes_adapter_list; 178extern struct list_head nes_adapter_list;
179extern struct list_head nes_dev_list;
180
181extern struct nes_cm_core *g_cm_core;
182 179
183extern atomic_t cm_connects; 180extern atomic_t cm_connects;
184extern atomic_t cm_accepts; 181extern atomic_t cm_accepts;
@@ -208,7 +205,6 @@ extern atomic_t cm_nodes_destroyed;
208extern atomic_t cm_accel_dropped_pkts; 205extern atomic_t cm_accel_dropped_pkts;
209extern atomic_t cm_resets_recvd; 206extern atomic_t cm_resets_recvd;
210 207
211extern u32 crit_err_count;
212extern u32 int_mod_timer_init; 208extern u32 int_mod_timer_init;
213extern u32 int_mod_cq_depth_256; 209extern u32 int_mod_cq_depth_256;
214extern u32 int_mod_cq_depth_128; 210extern u32 int_mod_cq_depth_128;
@@ -501,9 +497,6 @@ struct ib_qp *nes_get_qp(struct ib_device *, int);
501/* nes_hw.c */ 497/* nes_hw.c */
502struct nes_adapter *nes_init_adapter(struct nes_device *, u8); 498struct nes_adapter *nes_init_adapter(struct nes_device *, u8);
503void nes_nic_init_timer_defaults(struct nes_device *, u8); 499void nes_nic_init_timer_defaults(struct nes_device *, u8);
504unsigned int nes_reset_adapter_ne020(struct nes_device *, u8 *);
505int nes_init_serdes(struct nes_device *, u8, u8, u8);
506void nes_init_csr_ne020(struct nes_device *, u8, u8);
507void nes_destroy_adapter(struct nes_adapter *); 500void nes_destroy_adapter(struct nes_adapter *);
508int nes_init_cqp(struct nes_device *); 501int nes_init_cqp(struct nes_device *);
509int nes_init_phy(struct nes_device *); 502int nes_init_phy(struct nes_device *);
@@ -511,19 +504,12 @@ int nes_init_nic_qp(struct nes_device *, struct net_device *);
511void nes_destroy_nic_qp(struct nes_vnic *); 504void nes_destroy_nic_qp(struct nes_vnic *);
512int nes_napi_isr(struct nes_device *); 505int nes_napi_isr(struct nes_device *);
513void nes_dpc(unsigned long); 506void nes_dpc(unsigned long);
514void nes_process_ceq(struct nes_device *, struct nes_hw_ceq *);
515void nes_process_aeq(struct nes_device *, struct nes_hw_aeq *);
516void nes_process_mac_intr(struct nes_device *, u32);
517void nes_nic_napi_ce_handler(struct nes_device *, struct nes_hw_nic_cq *);
518void nes_nic_ce_handler(struct nes_device *, struct nes_hw_nic_cq *); 507void nes_nic_ce_handler(struct nes_device *, struct nes_hw_nic_cq *);
519void nes_cqp_ce_handler(struct nes_device *, struct nes_hw_cq *);
520void nes_process_iwarp_aeqe(struct nes_device *, struct nes_hw_aeqe *);
521void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *); 508void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *);
522int nes_destroy_cqp(struct nes_device *); 509int nes_destroy_cqp(struct nes_device *);
523int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); 510int nes_nic_cm_xmit(struct sk_buff *, struct net_device *);
524 511
525/* nes_nic.c */ 512/* nes_nic.c */
526void nes_netdev_set_multicast_list(struct net_device *);
527struct net_device *nes_netdev_init(struct nes_device *, void __iomem *); 513struct net_device *nes_netdev_init(struct nes_device *, void __iomem *);
528void nes_netdev_destroy(struct net_device *); 514void nes_netdev_destroy(struct net_device *);
529int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); 515int nes_nic_cm_xmit(struct sk_buff *, struct net_device *);
@@ -534,7 +520,6 @@ int nes_cm_recv(struct sk_buff *, struct net_device *);
534void nes_update_arp(unsigned char *, u32, u32, u16, u16); 520void nes_update_arp(unsigned char *, u32, u32, u16, u16);
535void nes_manage_arp_cache(struct net_device *, unsigned char *, u32, u32); 521void nes_manage_arp_cache(struct net_device *, unsigned char *, u32, u32);
536void nes_sock_release(struct nes_qp *, unsigned long *); 522void nes_sock_release(struct nes_qp *, unsigned long *);
537struct nes_cm_core *nes_cm_alloc_core(void);
538void flush_wqes(struct nes_device *nesdev, struct nes_qp *, u32, u32); 523void flush_wqes(struct nes_device *nesdev, struct nes_qp *, u32, u32);
539int nes_manage_apbvt(struct nes_vnic *, u32, u32, u32); 524int nes_manage_apbvt(struct nes_vnic *, u32, u32, u32);
540int nes_cm_disconn(struct nes_qp *); 525int nes_cm_disconn(struct nes_qp *);
@@ -546,7 +531,6 @@ int nes_modify_qp(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *);
546struct nes_ib_device *nes_init_ofa_device(struct net_device *); 531struct nes_ib_device *nes_init_ofa_device(struct net_device *);
547void nes_destroy_ofa_device(struct nes_ib_device *); 532void nes_destroy_ofa_device(struct nes_ib_device *);
548int nes_register_ofa_device(struct nes_ib_device *); 533int nes_register_ofa_device(struct nes_ib_device *);
549void nes_unregister_ofa_device(struct nes_ib_device *);
550 534
551/* nes_util.c */ 535/* nes_util.c */
552int nes_read_eeprom_values(struct nes_device *, struct nes_adapter *); 536int nes_read_eeprom_values(struct nes_device *, struct nes_adapter *);
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 81c8e4625214..456da13b68de 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -80,7 +80,30 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *,
80static int add_ref_cm_node(struct nes_cm_node *); 80static int add_ref_cm_node(struct nes_cm_node *);
81static int rem_ref_cm_node(struct nes_cm_core *, struct nes_cm_node *); 81static int rem_ref_cm_node(struct nes_cm_core *, struct nes_cm_node *);
82static int mini_cm_del_listen(struct nes_cm_core *, struct nes_cm_listener *); 82static int mini_cm_del_listen(struct nes_cm_core *, struct nes_cm_listener *);
83 83static struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *,
84 void *, u32, void *, u32, u8);
85static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node);
86
87static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *,
88 struct nes_vnic *,
89 struct ietf_mpa_frame *,
90 struct nes_cm_info *);
91static int mini_cm_accept(struct nes_cm_core *, struct ietf_mpa_frame *,
92 struct nes_cm_node *);
93static int mini_cm_reject(struct nes_cm_core *, struct ietf_mpa_frame *,
94 struct nes_cm_node *);
95static int mini_cm_close(struct nes_cm_core *, struct nes_cm_node *);
96static int mini_cm_recv_pkt(struct nes_cm_core *, struct nes_vnic *,
97 struct sk_buff *);
98static int mini_cm_dealloc_core(struct nes_cm_core *);
99static int mini_cm_get(struct nes_cm_core *);
100static int mini_cm_set(struct nes_cm_core *, u32, u32);
101static int nes_cm_disconn_true(struct nes_qp *);
102static int nes_cm_post_event(struct nes_cm_event *event);
103static int nes_disconnect(struct nes_qp *nesqp, int abrupt);
104static void nes_disconnect_worker(struct work_struct *work);
105static int send_ack(struct nes_cm_node *cm_node);
106static int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb);
84 107
85/* External CM API Interface */ 108/* External CM API Interface */
86/* instance of function pointers for client API */ 109/* instance of function pointers for client API */
@@ -99,7 +122,7 @@ static struct nes_cm_ops nes_cm_api = {
99 mini_cm_set 122 mini_cm_set
100}; 123};
101 124
102struct nes_cm_core *g_cm_core; 125static struct nes_cm_core *g_cm_core;
103 126
104atomic_t cm_connects; 127atomic_t cm_connects;
105atomic_t cm_accepts; 128atomic_t cm_accepts;
@@ -149,7 +172,7 @@ static struct nes_cm_event *create_event(struct nes_cm_node *cm_node,
149/** 172/**
150 * send_mpa_request 173 * send_mpa_request
151 */ 174 */
152int send_mpa_request(struct nes_cm_node *cm_node) 175static int send_mpa_request(struct nes_cm_node *cm_node)
153{ 176{
154 struct sk_buff *skb; 177 struct sk_buff *skb;
155 int ret; 178 int ret;
@@ -243,8 +266,9 @@ static int handle_exception_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb
243 * form_cm_frame - get a free packet and build empty frame Use 266 * form_cm_frame - get a free packet and build empty frame Use
244 * node info to build. 267 * node info to build.
245 */ 268 */
246struct sk_buff *form_cm_frame(struct sk_buff *skb, struct nes_cm_node *cm_node, 269static struct sk_buff *form_cm_frame(struct sk_buff *skb, struct nes_cm_node *cm_node,
247 void *options, u32 optionsize, void *data, u32 datasize, u8 flags) 270 void *options, u32 optionsize, void *data,
271 u32 datasize, u8 flags)
248{ 272{
249 struct tcphdr *tcph; 273 struct tcphdr *tcph;
250 struct iphdr *iph; 274 struct iphdr *iph;
@@ -442,7 +466,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
442/** 466/**
443 * nes_cm_timer_tick 467 * nes_cm_timer_tick
444 */ 468 */
445void nes_cm_timer_tick(unsigned long pass) 469static void nes_cm_timer_tick(unsigned long pass)
446{ 470{
447 unsigned long flags, qplockflags; 471 unsigned long flags, qplockflags;
448 unsigned long nexttimeout = jiffies + NES_LONG_TIME; 472 unsigned long nexttimeout = jiffies + NES_LONG_TIME;
@@ -644,7 +668,7 @@ void nes_cm_timer_tick(unsigned long pass)
644/** 668/**
645 * send_syn 669 * send_syn
646 */ 670 */
647int send_syn(struct nes_cm_node *cm_node, u32 sendack) 671static int send_syn(struct nes_cm_node *cm_node, u32 sendack)
648{ 672{
649 int ret; 673 int ret;
650 int flags = SET_SYN; 674 int flags = SET_SYN;
@@ -710,7 +734,7 @@ int send_syn(struct nes_cm_node *cm_node, u32 sendack)
710/** 734/**
711 * send_reset 735 * send_reset
712 */ 736 */
713int send_reset(struct nes_cm_node *cm_node) 737static int send_reset(struct nes_cm_node *cm_node)
714{ 738{
715 int ret; 739 int ret;
716 struct sk_buff *skb = get_free_pkt(cm_node); 740 struct sk_buff *skb = get_free_pkt(cm_node);
@@ -732,7 +756,7 @@ int send_reset(struct nes_cm_node *cm_node)
732/** 756/**
733 * send_ack 757 * send_ack
734 */ 758 */
735int send_ack(struct nes_cm_node *cm_node) 759static int send_ack(struct nes_cm_node *cm_node)
736{ 760{
737 int ret; 761 int ret;
738 struct sk_buff *skb = get_free_pkt(cm_node); 762 struct sk_buff *skb = get_free_pkt(cm_node);
@@ -752,7 +776,7 @@ int send_ack(struct nes_cm_node *cm_node)
752/** 776/**
753 * send_fin 777 * send_fin
754 */ 778 */
755int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb) 779static int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb)
756{ 780{
757 int ret; 781 int ret;
758 782
@@ -775,7 +799,7 @@ int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb)
775/** 799/**
776 * get_free_pkt 800 * get_free_pkt
777 */ 801 */
778struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node) 802static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node)
779{ 803{
780 struct sk_buff *skb, *new_skb; 804 struct sk_buff *skb, *new_skb;
781 805
@@ -1272,8 +1296,8 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, u32 opti
1272/** 1296/**
1273 * process_packet 1297 * process_packet
1274 */ 1298 */
1275int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb, 1299static int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb,
1276 struct nes_cm_core *cm_core) 1300 struct nes_cm_core *cm_core)
1277{ 1301{
1278 int optionsize; 1302 int optionsize;
1279 int datasize; 1303 int datasize;
@@ -1631,9 +1655,10 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *cm_core,
1631/** 1655/**
1632 * mini_cm_connect - make a connection node with params 1656 * mini_cm_connect - make a connection node with params
1633 */ 1657 */
1634struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core, 1658static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
1635 struct nes_vnic *nesvnic, struct ietf_mpa_frame *mpa_frame, 1659 struct nes_vnic *nesvnic,
1636 struct nes_cm_info *cm_info) 1660 struct ietf_mpa_frame *mpa_frame,
1661 struct nes_cm_info *cm_info)
1637{ 1662{
1638 int ret = 0; 1663 int ret = 0;
1639 struct nes_cm_node *cm_node; 1664 struct nes_cm_node *cm_node;
@@ -1717,8 +1742,8 @@ struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
1717 * mini_cm_accept - accept a connection 1742 * mini_cm_accept - accept a connection
1718 * This function is never called 1743 * This function is never called
1719 */ 1744 */
1720int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame, 1745static int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame,
1721 struct nes_cm_node *cm_node) 1746 struct nes_cm_node *cm_node)
1722{ 1747{
1723 return 0; 1748 return 0;
1724} 1749}
@@ -1727,9 +1752,9 @@ int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame
1727/** 1752/**
1728 * mini_cm_reject - reject and teardown a connection 1753 * mini_cm_reject - reject and teardown a connection
1729 */ 1754 */
1730int mini_cm_reject(struct nes_cm_core *cm_core, 1755static int mini_cm_reject(struct nes_cm_core *cm_core,
1731 struct ietf_mpa_frame *mpa_frame, 1756 struct ietf_mpa_frame *mpa_frame,
1732 struct nes_cm_node *cm_node) 1757 struct nes_cm_node *cm_node)
1733{ 1758{
1734 int ret = 0; 1759 int ret = 0;
1735 struct sk_buff *skb; 1760 struct sk_buff *skb;
@@ -1761,7 +1786,7 @@ int mini_cm_reject(struct nes_cm_core *cm_core,
1761/** 1786/**
1762 * mini_cm_close 1787 * mini_cm_close
1763 */ 1788 */
1764int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node) 1789static int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node)
1765{ 1790{
1766 int ret = 0; 1791 int ret = 0;
1767 1792
@@ -1808,8 +1833,8 @@ int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node)
1808 * recv_pkt - recv an ETHERNET packet, and process it through CM 1833 * recv_pkt - recv an ETHERNET packet, and process it through CM
1809 * node state machine 1834 * node state machine
1810 */ 1835 */
1811int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic, 1836static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic,
1812 struct sk_buff *skb) 1837 struct sk_buff *skb)
1813{ 1838{
1814 struct nes_cm_node *cm_node = NULL; 1839 struct nes_cm_node *cm_node = NULL;
1815 struct nes_cm_listener *listener = NULL; 1840 struct nes_cm_listener *listener = NULL;
@@ -1898,7 +1923,7 @@ int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic,
1898/** 1923/**
1899 * nes_cm_alloc_core - allocate a top level instance of a cm core 1924 * nes_cm_alloc_core - allocate a top level instance of a cm core
1900 */ 1925 */
1901struct nes_cm_core *nes_cm_alloc_core(void) 1926static struct nes_cm_core *nes_cm_alloc_core(void)
1902{ 1927{
1903 int i; 1928 int i;
1904 1929
@@ -1958,7 +1983,7 @@ struct nes_cm_core *nes_cm_alloc_core(void)
1958/** 1983/**
1959 * mini_cm_dealloc_core - deallocate a top level instance of a cm core 1984 * mini_cm_dealloc_core - deallocate a top level instance of a cm core
1960 */ 1985 */
1961int mini_cm_dealloc_core(struct nes_cm_core *cm_core) 1986static int mini_cm_dealloc_core(struct nes_cm_core *cm_core)
1962{ 1987{
1963 nes_debug(NES_DBG_CM, "De-Alloc CM Core (%p)\n", cm_core); 1988 nes_debug(NES_DBG_CM, "De-Alloc CM Core (%p)\n", cm_core);
1964 1989
@@ -1983,7 +2008,7 @@ int mini_cm_dealloc_core(struct nes_cm_core *cm_core)
1983/** 2008/**
1984 * mini_cm_get 2009 * mini_cm_get
1985 */ 2010 */
1986int mini_cm_get(struct nes_cm_core *cm_core) 2011static int mini_cm_get(struct nes_cm_core *cm_core)
1987{ 2012{
1988 return cm_core->state; 2013 return cm_core->state;
1989} 2014}
@@ -1992,7 +2017,7 @@ int mini_cm_get(struct nes_cm_core *cm_core)
1992/** 2017/**
1993 * mini_cm_set 2018 * mini_cm_set
1994 */ 2019 */
1995int mini_cm_set(struct nes_cm_core *cm_core, u32 type, u32 value) 2020static int mini_cm_set(struct nes_cm_core *cm_core, u32 type, u32 value)
1996{ 2021{
1997 int ret = 0; 2022 int ret = 0;
1998 2023
@@ -2109,7 +2134,7 @@ int nes_cm_disconn(struct nes_qp *nesqp)
2109/** 2134/**
2110 * nes_disconnect_worker 2135 * nes_disconnect_worker
2111 */ 2136 */
2112void nes_disconnect_worker(struct work_struct *work) 2137static void nes_disconnect_worker(struct work_struct *work)
2113{ 2138{
2114 struct nes_qp *nesqp = container_of(work, struct nes_qp, disconn_work); 2139 struct nes_qp *nesqp = container_of(work, struct nes_qp, disconn_work);
2115 2140
@@ -2122,7 +2147,7 @@ void nes_disconnect_worker(struct work_struct *work)
2122/** 2147/**
2123 * nes_cm_disconn_true 2148 * nes_cm_disconn_true
2124 */ 2149 */
2125int nes_cm_disconn_true(struct nes_qp *nesqp) 2150static int nes_cm_disconn_true(struct nes_qp *nesqp)
2126{ 2151{
2127 unsigned long flags; 2152 unsigned long flags;
2128 int ret = 0; 2153 int ret = 0;
@@ -2265,7 +2290,7 @@ int nes_cm_disconn_true(struct nes_qp *nesqp)
2265/** 2290/**
2266 * nes_disconnect 2291 * nes_disconnect
2267 */ 2292 */
2268int nes_disconnect(struct nes_qp *nesqp, int abrupt) 2293static int nes_disconnect(struct nes_qp *nesqp, int abrupt)
2269{ 2294{
2270 int ret = 0; 2295 int ret = 0;
2271 struct nes_vnic *nesvnic; 2296 struct nes_vnic *nesvnic;
@@ -2740,7 +2765,7 @@ int nes_cm_stop(void)
2740 * cm_event_connected 2765 * cm_event_connected
2741 * handle a connected event, setup QPs and HW 2766 * handle a connected event, setup QPs and HW
2742 */ 2767 */
2743void cm_event_connected(struct nes_cm_event *event) 2768static void cm_event_connected(struct nes_cm_event *event)
2744{ 2769{
2745 u64 u64temp; 2770 u64 u64temp;
2746 struct nes_qp *nesqp; 2771 struct nes_qp *nesqp;
@@ -2877,7 +2902,7 @@ void cm_event_connected(struct nes_cm_event *event)
2877/** 2902/**
2878 * cm_event_connect_error 2903 * cm_event_connect_error
2879 */ 2904 */
2880void cm_event_connect_error(struct nes_cm_event *event) 2905static void cm_event_connect_error(struct nes_cm_event *event)
2881{ 2906{
2882 struct nes_qp *nesqp; 2907 struct nes_qp *nesqp;
2883 struct iw_cm_id *cm_id; 2908 struct iw_cm_id *cm_id;
@@ -2930,7 +2955,7 @@ void cm_event_connect_error(struct nes_cm_event *event)
2930/** 2955/**
2931 * cm_event_reset 2956 * cm_event_reset
2932 */ 2957 */
2933void cm_event_reset(struct nes_cm_event *event) 2958static void cm_event_reset(struct nes_cm_event *event)
2934{ 2959{
2935 struct nes_qp *nesqp; 2960 struct nes_qp *nesqp;
2936 struct iw_cm_id *cm_id; 2961 struct iw_cm_id *cm_id;
@@ -2973,7 +2998,7 @@ void cm_event_reset(struct nes_cm_event *event)
2973/** 2998/**
2974 * cm_event_mpa_req 2999 * cm_event_mpa_req
2975 */ 3000 */
2976void cm_event_mpa_req(struct nes_cm_event *event) 3001static void cm_event_mpa_req(struct nes_cm_event *event)
2977{ 3002{
2978 struct iw_cm_id *cm_id; 3003 struct iw_cm_id *cm_id;
2979 struct iw_cm_event cm_event; 3004 struct iw_cm_event cm_event;
@@ -3019,7 +3044,7 @@ static void nes_cm_event_handler(struct work_struct *);
3019 * nes_cm_post_event 3044 * nes_cm_post_event
3020 * post an event to the cm event handler 3045 * post an event to the cm event handler
3021 */ 3046 */
3022int nes_cm_post_event(struct nes_cm_event *event) 3047static int nes_cm_post_event(struct nes_cm_event *event)
3023{ 3048{
3024 atomic_inc(&event->cm_node->cm_core->events_posted); 3049 atomic_inc(&event->cm_node->cm_core->events_posted);
3025 add_ref_cm_node(event->cm_node); 3050 add_ref_cm_node(event->cm_node);
diff --git a/drivers/infiniband/hw/nes/nes_cm.h b/drivers/infiniband/hw/nes/nes_cm.h
index a59f0a7fb278..980fb6718628 100644
--- a/drivers/infiniband/hw/nes/nes_cm.h
+++ b/drivers/infiniband/hw/nes/nes_cm.h
@@ -383,35 +383,10 @@ struct nes_cm_ops {
383 int (*set)(struct nes_cm_core *, u32, u32); 383 int (*set)(struct nes_cm_core *, u32, u32);
384}; 384};
385 385
386
387int send_mpa_request(struct nes_cm_node *);
388struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *,
389 void *, u32, void *, u32, u8);
390int schedule_nes_timer(struct nes_cm_node *, struct sk_buff *, 386int schedule_nes_timer(struct nes_cm_node *, struct sk_buff *,
391 enum nes_timer_type, int, int); 387 enum nes_timer_type, int, int);
392void nes_cm_timer_tick(unsigned long);
393int send_syn(struct nes_cm_node *, u32);
394int send_reset(struct nes_cm_node *);
395int send_ack(struct nes_cm_node *);
396int send_fin(struct nes_cm_node *, struct sk_buff *);
397struct sk_buff *get_free_pkt(struct nes_cm_node *);
398int process_packet(struct nes_cm_node *, struct sk_buff *, struct nes_cm_core *);
399
400struct nes_cm_node * mini_cm_connect(struct nes_cm_core *,
401 struct nes_vnic *, struct ietf_mpa_frame *, struct nes_cm_info *);
402int mini_cm_accept(struct nes_cm_core *, struct ietf_mpa_frame *, struct nes_cm_node *);
403int mini_cm_reject(struct nes_cm_core *, struct ietf_mpa_frame *, struct nes_cm_node *);
404int mini_cm_close(struct nes_cm_core *, struct nes_cm_node *);
405int mini_cm_recv_pkt(struct nes_cm_core *, struct nes_vnic *, struct sk_buff *);
406struct nes_cm_core *mini_cm_alloc_core(struct nes_cm_info *);
407int mini_cm_dealloc_core(struct nes_cm_core *);
408int mini_cm_get(struct nes_cm_core *);
409int mini_cm_set(struct nes_cm_core *, u32, u32);
410 388
411int nes_cm_disconn(struct nes_qp *); 389int nes_cm_disconn(struct nes_qp *);
412void nes_disconnect_worker(struct work_struct *);
413int nes_cm_disconn_true(struct nes_qp *);
414int nes_disconnect(struct nes_qp *, int);
415 390
416int nes_accept(struct iw_cm_id *, struct iw_cm_conn_param *); 391int nes_accept(struct iw_cm_id *, struct iw_cm_conn_param *);
417int nes_reject(struct iw_cm_id *, const void *, u8); 392int nes_reject(struct iw_cm_id *, const void *, u8);
@@ -423,11 +398,4 @@ int nes_cm_recv(struct sk_buff *, struct net_device *);
423int nes_cm_start(void); 398int nes_cm_start(void);
424int nes_cm_stop(void); 399int nes_cm_stop(void);
425 400
426/* CM event handler functions */
427void cm_event_connected(struct nes_cm_event *);
428void cm_event_connect_error(struct nes_cm_event *);
429void cm_event_reset(struct nes_cm_event *);
430void cm_event_mpa_req(struct nes_cm_event *);
431int nes_cm_post_event(struct nes_cm_event *);
432
433#endif /* NES_CM_H */ 401#endif /* NES_CM_H */
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 49e53e4c1ebe..8b29bd82f3a5 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -41,7 +41,7 @@
41 41
42#include "nes.h" 42#include "nes.h"
43 43
44u32 crit_err_count = 0; 44static u32 crit_err_count;
45u32 int_mod_timer_init; 45u32 int_mod_timer_init;
46u32 int_mod_cq_depth_256; 46u32 int_mod_cq_depth_256;
47u32 int_mod_cq_depth_128; 47u32 int_mod_cq_depth_128;
@@ -53,6 +53,17 @@ u32 int_mod_cq_depth_1;
53 53
54#include "nes_cm.h" 54#include "nes_cm.h"
55 55
56static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq);
57static void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count);
58static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
59 u8 OneG_Mode);
60static void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq);
61static void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq);
62static void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq);
63static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
64 struct nes_hw_aeqe *aeqe);
65static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number);
66static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode);
56 67
57#ifdef CONFIG_INFINIBAND_NES_DEBUG 68#ifdef CONFIG_INFINIBAND_NES_DEBUG
58static unsigned char *nes_iwarp_state_str[] = { 69static unsigned char *nes_iwarp_state_str[] = {
@@ -583,7 +594,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
583/** 594/**
584 * nes_reset_adapter_ne020 595 * nes_reset_adapter_ne020
585 */ 596 */
586unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode) 597static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode)
587{ 598{
588 u32 port_count; 599 u32 port_count;
589 u32 u32temp; 600 u32 u32temp;
@@ -691,7 +702,8 @@ unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode)
691/** 702/**
692 * nes_init_serdes 703 * nes_init_serdes
693 */ 704 */
694int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8 OneG_Mode) 705static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
706 u8 OneG_Mode)
695{ 707{
696 int i; 708 int i;
697 u32 u32temp; 709 u32 u32temp;
@@ -760,7 +772,7 @@ int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8 One
760 * nes_init_csr_ne020 772 * nes_init_csr_ne020
761 * Initialize registers for ne020 hardware 773 * Initialize registers for ne020 hardware
762 */ 774 */
763void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count) 775static void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count)
764{ 776{
765 u32 u32temp; 777 u32 u32temp;
766 778
@@ -1909,7 +1921,7 @@ void nes_dpc(unsigned long param)
1909/** 1921/**
1910 * nes_process_ceq 1922 * nes_process_ceq
1911 */ 1923 */
1912void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq) 1924static void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq)
1913{ 1925{
1914 u64 u64temp; 1926 u64 u64temp;
1915 struct nes_hw_cq *cq; 1927 struct nes_hw_cq *cq;
@@ -1949,7 +1961,7 @@ void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq)
1949/** 1961/**
1950 * nes_process_aeq 1962 * nes_process_aeq
1951 */ 1963 */
1952void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq) 1964static void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq)
1953{ 1965{
1954// u64 u64temp; 1966// u64 u64temp;
1955 u32 head; 1967 u32 head;
@@ -2060,7 +2072,7 @@ static void nes_reset_link(struct nes_device *nesdev, u32 mac_index)
2060/** 2072/**
2061 * nes_process_mac_intr 2073 * nes_process_mac_intr
2062 */ 2074 */
2063void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) 2075static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
2064{ 2076{
2065 unsigned long flags; 2077 unsigned long flags;
2066 u32 pcs_control_status; 2078 u32 pcs_control_status;
@@ -2205,7 +2217,7 @@ void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
2205 2217
2206 2218
2207 2219
2208void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq) 2220static void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
2209{ 2221{
2210 struct nes_vnic *nesvnic = container_of(cq, struct nes_vnic, nic_cq); 2222 struct nes_vnic *nesvnic = container_of(cq, struct nes_vnic, nic_cq);
2211 2223
@@ -2428,7 +2440,7 @@ void nes_nic_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
2428/** 2440/**
2429 * nes_cqp_ce_handler 2441 * nes_cqp_ce_handler
2430 */ 2442 */
2431void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq) 2443static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq)
2432{ 2444{
2433 u64 u64temp; 2445 u64 u64temp;
2434 unsigned long flags; 2446 unsigned long flags;
@@ -2567,7 +2579,8 @@ void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq)
2567/** 2579/**
2568 * nes_process_iwarp_aeqe 2580 * nes_process_iwarp_aeqe
2569 */ 2581 */
2570void nes_process_iwarp_aeqe(struct nes_device *nesdev, struct nes_hw_aeqe *aeqe) 2582static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2583 struct nes_hw_aeqe *aeqe)
2571{ 2584{
2572 u64 context; 2585 u64 context;
2573 u64 aeqe_context = 0; 2586 u64 aeqe_context = 0;
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 9bdfdcc92fff..840d5190009a 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -832,7 +832,7 @@ static int nes_netdev_set_mac_address(struct net_device *netdev, void *p)
832/** 832/**
833 * nes_netdev_set_multicast_list 833 * nes_netdev_set_multicast_list
834 */ 834 */
835void nes_netdev_set_multicast_list(struct net_device *netdev) 835static void nes_netdev_set_multicast_list(struct net_device *netdev)
836{ 836{
837 struct nes_vnic *nesvnic = netdev_priv(netdev); 837 struct nes_vnic *nesvnic = netdev_priv(netdev);
838 struct nes_device *nesdev = nesvnic->nesdev; 838 struct nes_device *nesdev = nesvnic->nesdev;
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index e1671d843fe1..245970302678 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -49,6 +49,7 @@ atomic_t mod_qp_timouts;
49atomic_t qps_created; 49atomic_t qps_created;
50atomic_t sw_qps_destroyed; 50atomic_t sw_qps_destroyed;
51 51
52static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
52 53
53/** 54/**
54 * nes_alloc_mw 55 * nes_alloc_mw
@@ -3895,7 +3896,7 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev)
3895/** 3896/**
3896 * nes_unregister_ofa_device 3897 * nes_unregister_ofa_device
3897 */ 3898 */
3898void nes_unregister_ofa_device(struct nes_ib_device *nesibdev) 3899static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev)
3899{ 3900{
3900 struct nes_vnic *nesvnic = nesibdev->nesvnic; 3901 struct nes_vnic *nesvnic = nesibdev->nesvnic;
3901 int i; 3902 int i;