diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:09 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:09 -0400 |
commit | 1a855fbfb65e0b7b5cce00d7c6a61185ed765edf (patch) | |
tree | 7f6bfd3a7e17abf99fa6d529f9dec3842f701a38 /drivers/infiniband/hw/nes | |
parent | 71e0957c6291da030e6f89351846225876731df3 (diff) |
RDMA/nes: Make symbols used only in a single source file static
Avoid namespace pollution and allow the compiler to optimize better.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r-- | drivers/infiniband/hw/nes/nes.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes.h | 16 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 97 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.h | 32 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 33 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 3 |
7 files changed, 88 insertions, 97 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c index b23e22a785a..dcb601c3dec 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); | |||
92 | MODULE_PARM_DESC(debug_level, "Enable debug output level"); | 92 | MODULE_PARM_DESC(debug_level, "Enable debug output level"); |
93 | 93 | ||
94 | LIST_HEAD(nes_adapter_list); | 94 | LIST_HEAD(nes_adapter_list); |
95 | LIST_HEAD(nes_dev_list); | 95 | static LIST_HEAD(nes_dev_list); |
96 | 96 | ||
97 | atomic_t qps_destroyed; | 97 | atomic_t qps_destroyed; |
98 | 98 | ||
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h index 3f5a04d2e62..bd92be79b63 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; | |||
176 | extern unsigned int nes_debug_level; | 176 | extern unsigned int nes_debug_level; |
177 | 177 | ||
178 | extern struct list_head nes_adapter_list; | 178 | extern struct list_head nes_adapter_list; |
179 | extern struct list_head nes_dev_list; | ||
180 | |||
181 | extern struct nes_cm_core *g_cm_core; | ||
182 | 179 | ||
183 | extern atomic_t cm_connects; | 180 | extern atomic_t cm_connects; |
184 | extern atomic_t cm_accepts; | 181 | extern atomic_t cm_accepts; |
@@ -208,7 +205,6 @@ extern atomic_t cm_nodes_destroyed; | |||
208 | extern atomic_t cm_accel_dropped_pkts; | 205 | extern atomic_t cm_accel_dropped_pkts; |
209 | extern atomic_t cm_resets_recvd; | 206 | extern atomic_t cm_resets_recvd; |
210 | 207 | ||
211 | extern u32 crit_err_count; | ||
212 | extern u32 int_mod_timer_init; | 208 | extern u32 int_mod_timer_init; |
213 | extern u32 int_mod_cq_depth_256; | 209 | extern u32 int_mod_cq_depth_256; |
214 | extern u32 int_mod_cq_depth_128; | 210 | extern 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 */ |
502 | struct nes_adapter *nes_init_adapter(struct nes_device *, u8); | 498 | struct nes_adapter *nes_init_adapter(struct nes_device *, u8); |
503 | void nes_nic_init_timer_defaults(struct nes_device *, u8); | 499 | void nes_nic_init_timer_defaults(struct nes_device *, u8); |
504 | unsigned int nes_reset_adapter_ne020(struct nes_device *, u8 *); | ||
505 | int nes_init_serdes(struct nes_device *, u8, u8, u8); | ||
506 | void nes_init_csr_ne020(struct nes_device *, u8, u8); | ||
507 | void nes_destroy_adapter(struct nes_adapter *); | 500 | void nes_destroy_adapter(struct nes_adapter *); |
508 | int nes_init_cqp(struct nes_device *); | 501 | int nes_init_cqp(struct nes_device *); |
509 | int nes_init_phy(struct nes_device *); | 502 | int nes_init_phy(struct nes_device *); |
@@ -511,19 +504,12 @@ int nes_init_nic_qp(struct nes_device *, struct net_device *); | |||
511 | void nes_destroy_nic_qp(struct nes_vnic *); | 504 | void nes_destroy_nic_qp(struct nes_vnic *); |
512 | int nes_napi_isr(struct nes_device *); | 505 | int nes_napi_isr(struct nes_device *); |
513 | void nes_dpc(unsigned long); | 506 | void nes_dpc(unsigned long); |
514 | void nes_process_ceq(struct nes_device *, struct nes_hw_ceq *); | ||
515 | void nes_process_aeq(struct nes_device *, struct nes_hw_aeq *); | ||
516 | void nes_process_mac_intr(struct nes_device *, u32); | ||
517 | void nes_nic_napi_ce_handler(struct nes_device *, struct nes_hw_nic_cq *); | ||
518 | void nes_nic_ce_handler(struct nes_device *, struct nes_hw_nic_cq *); | 507 | void nes_nic_ce_handler(struct nes_device *, struct nes_hw_nic_cq *); |
519 | void nes_cqp_ce_handler(struct nes_device *, struct nes_hw_cq *); | ||
520 | void nes_process_iwarp_aeqe(struct nes_device *, struct nes_hw_aeqe *); | ||
521 | void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *); | 508 | void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *); |
522 | int nes_destroy_cqp(struct nes_device *); | 509 | int nes_destroy_cqp(struct nes_device *); |
523 | int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); | 510 | int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); |
524 | 511 | ||
525 | /* nes_nic.c */ | 512 | /* nes_nic.c */ |
526 | void nes_netdev_set_multicast_list(struct net_device *); | ||
527 | struct net_device *nes_netdev_init(struct nes_device *, void __iomem *); | 513 | struct net_device *nes_netdev_init(struct nes_device *, void __iomem *); |
528 | void nes_netdev_destroy(struct net_device *); | 514 | void nes_netdev_destroy(struct net_device *); |
529 | int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); | 515 | int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); |
@@ -534,7 +520,6 @@ int nes_cm_recv(struct sk_buff *, struct net_device *); | |||
534 | void nes_update_arp(unsigned char *, u32, u32, u16, u16); | 520 | void nes_update_arp(unsigned char *, u32, u32, u16, u16); |
535 | void nes_manage_arp_cache(struct net_device *, unsigned char *, u32, u32); | 521 | void nes_manage_arp_cache(struct net_device *, unsigned char *, u32, u32); |
536 | void nes_sock_release(struct nes_qp *, unsigned long *); | 522 | void nes_sock_release(struct nes_qp *, unsigned long *); |
537 | struct nes_cm_core *nes_cm_alloc_core(void); | ||
538 | void flush_wqes(struct nes_device *nesdev, struct nes_qp *, u32, u32); | 523 | void flush_wqes(struct nes_device *nesdev, struct nes_qp *, u32, u32); |
539 | int nes_manage_apbvt(struct nes_vnic *, u32, u32, u32); | 524 | int nes_manage_apbvt(struct nes_vnic *, u32, u32, u32); |
540 | int nes_cm_disconn(struct nes_qp *); | 525 | int 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 *); | |||
546 | struct nes_ib_device *nes_init_ofa_device(struct net_device *); | 531 | struct nes_ib_device *nes_init_ofa_device(struct net_device *); |
547 | void nes_destroy_ofa_device(struct nes_ib_device *); | 532 | void nes_destroy_ofa_device(struct nes_ib_device *); |
548 | int nes_register_ofa_device(struct nes_ib_device *); | 533 | int nes_register_ofa_device(struct nes_ib_device *); |
549 | void nes_unregister_ofa_device(struct nes_ib_device *); | ||
550 | 534 | ||
551 | /* nes_util.c */ | 535 | /* nes_util.c */ |
552 | int nes_read_eeprom_values(struct nes_device *, struct nes_adapter *); | 536 | int 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 81c8e462521..456da13b68d 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 *, | |||
80 | static int add_ref_cm_node(struct nes_cm_node *); | 80 | static int add_ref_cm_node(struct nes_cm_node *); |
81 | static int rem_ref_cm_node(struct nes_cm_core *, struct nes_cm_node *); | 81 | static int rem_ref_cm_node(struct nes_cm_core *, struct nes_cm_node *); |
82 | static int mini_cm_del_listen(struct nes_cm_core *, struct nes_cm_listener *); | 82 | static int mini_cm_del_listen(struct nes_cm_core *, struct nes_cm_listener *); |
83 | 83 | static struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *, | |
84 | void *, u32, void *, u32, u8); | ||
85 | static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node); | ||
86 | |||
87 | static 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 *); | ||
91 | static int mini_cm_accept(struct nes_cm_core *, struct ietf_mpa_frame *, | ||
92 | struct nes_cm_node *); | ||
93 | static int mini_cm_reject(struct nes_cm_core *, struct ietf_mpa_frame *, | ||
94 | struct nes_cm_node *); | ||
95 | static int mini_cm_close(struct nes_cm_core *, struct nes_cm_node *); | ||
96 | static int mini_cm_recv_pkt(struct nes_cm_core *, struct nes_vnic *, | ||
97 | struct sk_buff *); | ||
98 | static int mini_cm_dealloc_core(struct nes_cm_core *); | ||
99 | static int mini_cm_get(struct nes_cm_core *); | ||
100 | static int mini_cm_set(struct nes_cm_core *, u32, u32); | ||
101 | static int nes_cm_disconn_true(struct nes_qp *); | ||
102 | static int nes_cm_post_event(struct nes_cm_event *event); | ||
103 | static int nes_disconnect(struct nes_qp *nesqp, int abrupt); | ||
104 | static void nes_disconnect_worker(struct work_struct *work); | ||
105 | static int send_ack(struct nes_cm_node *cm_node); | ||
106 | static 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 | ||
102 | struct nes_cm_core *g_cm_core; | 125 | static struct nes_cm_core *g_cm_core; |
103 | 126 | ||
104 | atomic_t cm_connects; | 127 | atomic_t cm_connects; |
105 | atomic_t cm_accepts; | 128 | atomic_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 | */ |
152 | int send_mpa_request(struct nes_cm_node *cm_node) | 175 | static 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 | */ |
246 | struct sk_buff *form_cm_frame(struct sk_buff *skb, struct nes_cm_node *cm_node, | 269 | static 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 | */ |
445 | void nes_cm_timer_tick(unsigned long pass) | 469 | static 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 | */ |
647 | int send_syn(struct nes_cm_node *cm_node, u32 sendack) | 671 | static 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 | */ |
713 | int send_reset(struct nes_cm_node *cm_node) | 737 | static 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 | */ |
735 | int send_ack(struct nes_cm_node *cm_node) | 759 | static 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 | */ |
755 | int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb) | 779 | static 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 | */ |
778 | struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node) | 802 | static 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 | */ |
1275 | int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb, | 1299 | static 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 | */ |
1634 | struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core, | 1658 | static 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 | */ |
1720 | int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame, | 1745 | static 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 | */ |
1730 | int mini_cm_reject(struct nes_cm_core *cm_core, | 1755 | static 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 | */ |
1764 | int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node) | 1789 | static 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 | */ |
1811 | int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic, | 1836 | static 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 | */ |
1901 | struct nes_cm_core *nes_cm_alloc_core(void) | 1926 | static 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 | */ |
1961 | int mini_cm_dealloc_core(struct nes_cm_core *cm_core) | 1986 | static 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 | */ |
1986 | int mini_cm_get(struct nes_cm_core *cm_core) | 2011 | static 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 | */ |
1995 | int mini_cm_set(struct nes_cm_core *cm_core, u32 type, u32 value) | 2020 | static 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 | */ |
2112 | void nes_disconnect_worker(struct work_struct *work) | 2137 | static 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 | */ |
2125 | int nes_cm_disconn_true(struct nes_qp *nesqp) | 2150 | static 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 | */ |
2268 | int nes_disconnect(struct nes_qp *nesqp, int abrupt) | 2293 | static 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 | */ |
2743 | void cm_event_connected(struct nes_cm_event *event) | 2768 | static 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 | */ |
2880 | void cm_event_connect_error(struct nes_cm_event *event) | 2905 | static 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 | */ |
2933 | void cm_event_reset(struct nes_cm_event *event) | 2958 | static 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 | */ |
2976 | void cm_event_mpa_req(struct nes_cm_event *event) | 3001 | static 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 | */ |
3022 | int nes_cm_post_event(struct nes_cm_event *event) | 3047 | static 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 a59f0a7fb27..980fb671862 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 | |||
387 | int send_mpa_request(struct nes_cm_node *); | ||
388 | struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *, | ||
389 | void *, u32, void *, u32, u8); | ||
390 | int schedule_nes_timer(struct nes_cm_node *, struct sk_buff *, | 386 | int schedule_nes_timer(struct nes_cm_node *, struct sk_buff *, |
391 | enum nes_timer_type, int, int); | 387 | enum nes_timer_type, int, int); |
392 | void nes_cm_timer_tick(unsigned long); | ||
393 | int send_syn(struct nes_cm_node *, u32); | ||
394 | int send_reset(struct nes_cm_node *); | ||
395 | int send_ack(struct nes_cm_node *); | ||
396 | int send_fin(struct nes_cm_node *, struct sk_buff *); | ||
397 | struct sk_buff *get_free_pkt(struct nes_cm_node *); | ||
398 | int process_packet(struct nes_cm_node *, struct sk_buff *, struct nes_cm_core *); | ||
399 | |||
400 | struct nes_cm_node * mini_cm_connect(struct nes_cm_core *, | ||
401 | struct nes_vnic *, struct ietf_mpa_frame *, struct nes_cm_info *); | ||
402 | int mini_cm_accept(struct nes_cm_core *, struct ietf_mpa_frame *, struct nes_cm_node *); | ||
403 | int mini_cm_reject(struct nes_cm_core *, struct ietf_mpa_frame *, struct nes_cm_node *); | ||
404 | int mini_cm_close(struct nes_cm_core *, struct nes_cm_node *); | ||
405 | int mini_cm_recv_pkt(struct nes_cm_core *, struct nes_vnic *, struct sk_buff *); | ||
406 | struct nes_cm_core *mini_cm_alloc_core(struct nes_cm_info *); | ||
407 | int mini_cm_dealloc_core(struct nes_cm_core *); | ||
408 | int mini_cm_get(struct nes_cm_core *); | ||
409 | int mini_cm_set(struct nes_cm_core *, u32, u32); | ||
410 | 388 | ||
411 | int nes_cm_disconn(struct nes_qp *); | 389 | int nes_cm_disconn(struct nes_qp *); |
412 | void nes_disconnect_worker(struct work_struct *); | ||
413 | int nes_cm_disconn_true(struct nes_qp *); | ||
414 | int nes_disconnect(struct nes_qp *, int); | ||
415 | 390 | ||
416 | int nes_accept(struct iw_cm_id *, struct iw_cm_conn_param *); | 391 | int nes_accept(struct iw_cm_id *, struct iw_cm_conn_param *); |
417 | int nes_reject(struct iw_cm_id *, const void *, u8); | 392 | int nes_reject(struct iw_cm_id *, const void *, u8); |
@@ -423,11 +398,4 @@ int nes_cm_recv(struct sk_buff *, struct net_device *); | |||
423 | int nes_cm_start(void); | 398 | int nes_cm_start(void); |
424 | int nes_cm_stop(void); | 399 | int nes_cm_stop(void); |
425 | 400 | ||
426 | /* CM event handler functions */ | ||
427 | void cm_event_connected(struct nes_cm_event *); | ||
428 | void cm_event_connect_error(struct nes_cm_event *); | ||
429 | void cm_event_reset(struct nes_cm_event *); | ||
430 | void cm_event_mpa_req(struct nes_cm_event *); | ||
431 | int 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 49e53e4c1eb..8b29bd82f3a 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 | ||
44 | u32 crit_err_count = 0; | 44 | static u32 crit_err_count; |
45 | u32 int_mod_timer_init; | 45 | u32 int_mod_timer_init; |
46 | u32 int_mod_cq_depth_256; | 46 | u32 int_mod_cq_depth_256; |
47 | u32 int_mod_cq_depth_128; | 47 | u32 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 | ||
56 | static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq); | ||
57 | static void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count); | ||
58 | static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, | ||
59 | u8 OneG_Mode); | ||
60 | static void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq); | ||
61 | static void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq); | ||
62 | static void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq); | ||
63 | static void nes_process_iwarp_aeqe(struct nes_device *nesdev, | ||
64 | struct nes_hw_aeqe *aeqe); | ||
65 | static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number); | ||
66 | static 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 |
58 | static unsigned char *nes_iwarp_state_str[] = { | 69 | static 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 | */ |
586 | unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode) | 597 | static 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 | */ |
694 | int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8 OneG_Mode) | 705 | static 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 | */ |
763 | void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count) | 775 | static 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 | */ |
1912 | void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq) | 1924 | static 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 | */ |
1952 | void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq) | 1964 | static 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 | */ |
2063 | void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) | 2075 | static 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 | ||
2208 | void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq) | 2220 | static 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 | */ |
2431 | void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq) | 2443 | static 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 | */ |
2570 | void nes_process_iwarp_aeqe(struct nes_device *nesdev, struct nes_hw_aeqe *aeqe) | 2582 | static 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 9bdfdcc92ff..840d5190009 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 | */ |
835 | void nes_netdev_set_multicast_list(struct net_device *netdev) | 835 | static 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 e1671d843fe..24597030267 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; | |||
49 | atomic_t qps_created; | 49 | atomic_t qps_created; |
50 | atomic_t sw_qps_destroyed; | 50 | atomic_t sw_qps_destroyed; |
51 | 51 | ||
52 | static 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 | */ |
3898 | void nes_unregister_ofa_device(struct nes_ib_device *nesibdev) | 3899 | static 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; |