Commit 1a855fbf authored by Roland Dreier's avatar Roland Dreier

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 71e0957c
...@@ -92,7 +92,7 @@ module_param_named(debug_level, nes_debug_level, uint, 0644); ...@@ -92,7 +92,7 @@ module_param_named(debug_level, nes_debug_level, uint, 0644);
MODULE_PARM_DESC(debug_level, "Enable debug output level"); MODULE_PARM_DESC(debug_level, "Enable debug output level");
LIST_HEAD(nes_adapter_list); LIST_HEAD(nes_adapter_list);
LIST_HEAD(nes_dev_list); static LIST_HEAD(nes_dev_list);
atomic_t qps_destroyed; atomic_t qps_destroyed;
......
...@@ -176,9 +176,6 @@ extern unsigned int nes_drv_opt; ...@@ -176,9 +176,6 @@ extern unsigned int nes_drv_opt;
extern unsigned int nes_debug_level; extern unsigned int nes_debug_level;
extern struct list_head nes_adapter_list; extern struct list_head nes_adapter_list;
extern struct list_head nes_dev_list;
extern struct nes_cm_core *g_cm_core;
extern atomic_t cm_connects; extern atomic_t cm_connects;
extern atomic_t cm_accepts; extern atomic_t cm_accepts;
...@@ -208,7 +205,6 @@ extern atomic_t cm_nodes_destroyed; ...@@ -208,7 +205,6 @@ extern atomic_t cm_nodes_destroyed;
extern atomic_t cm_accel_dropped_pkts; extern atomic_t cm_accel_dropped_pkts;
extern atomic_t cm_resets_recvd; extern atomic_t cm_resets_recvd;
extern u32 crit_err_count;
extern u32 int_mod_timer_init; extern u32 int_mod_timer_init;
extern u32 int_mod_cq_depth_256; extern u32 int_mod_cq_depth_256;
extern u32 int_mod_cq_depth_128; extern u32 int_mod_cq_depth_128;
...@@ -501,9 +497,6 @@ struct ib_qp *nes_get_qp(struct ib_device *, int); ...@@ -501,9 +497,6 @@ struct ib_qp *nes_get_qp(struct ib_device *, int);
/* nes_hw.c */ /* nes_hw.c */
struct nes_adapter *nes_init_adapter(struct nes_device *, u8); struct nes_adapter *nes_init_adapter(struct nes_device *, u8);
void nes_nic_init_timer_defaults(struct nes_device *, u8); void nes_nic_init_timer_defaults(struct nes_device *, u8);
unsigned int nes_reset_adapter_ne020(struct nes_device *, u8 *);
int nes_init_serdes(struct nes_device *, u8, u8, u8);
void nes_init_csr_ne020(struct nes_device *, u8, u8);
void nes_destroy_adapter(struct nes_adapter *); void nes_destroy_adapter(struct nes_adapter *);
int nes_init_cqp(struct nes_device *); int nes_init_cqp(struct nes_device *);
int nes_init_phy(struct nes_device *); int nes_init_phy(struct nes_device *);
...@@ -511,19 +504,12 @@ int nes_init_nic_qp(struct nes_device *, struct net_device *); ...@@ -511,19 +504,12 @@ int nes_init_nic_qp(struct nes_device *, struct net_device *);
void nes_destroy_nic_qp(struct nes_vnic *); void nes_destroy_nic_qp(struct nes_vnic *);
int nes_napi_isr(struct nes_device *); int nes_napi_isr(struct nes_device *);
void nes_dpc(unsigned long); void nes_dpc(unsigned long);
void nes_process_ceq(struct nes_device *, struct nes_hw_ceq *);
void nes_process_aeq(struct nes_device *, struct nes_hw_aeq *);
void nes_process_mac_intr(struct nes_device *, u32);
void nes_nic_napi_ce_handler(struct nes_device *, struct nes_hw_nic_cq *);
void nes_nic_ce_handler(struct nes_device *, struct nes_hw_nic_cq *); void nes_nic_ce_handler(struct nes_device *, struct nes_hw_nic_cq *);
void nes_cqp_ce_handler(struct nes_device *, struct nes_hw_cq *);
void nes_process_iwarp_aeqe(struct nes_device *, struct nes_hw_aeqe *);
void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *); void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *);
int nes_destroy_cqp(struct nes_device *); int nes_destroy_cqp(struct nes_device *);
int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); int nes_nic_cm_xmit(struct sk_buff *, struct net_device *);
/* nes_nic.c */ /* nes_nic.c */
void nes_netdev_set_multicast_list(struct net_device *);
struct net_device *nes_netdev_init(struct nes_device *, void __iomem *); struct net_device *nes_netdev_init(struct nes_device *, void __iomem *);
void nes_netdev_destroy(struct net_device *); void nes_netdev_destroy(struct net_device *);
int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); 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,7 +520,6 @@ int nes_cm_recv(struct sk_buff *, struct net_device *);
void nes_update_arp(unsigned char *, u32, u32, u16, u16); void nes_update_arp(unsigned char *, u32, u32, u16, u16);
void nes_manage_arp_cache(struct net_device *, unsigned char *, u32, u32); void nes_manage_arp_cache(struct net_device *, unsigned char *, u32, u32);
void nes_sock_release(struct nes_qp *, unsigned long *); void nes_sock_release(struct nes_qp *, unsigned long *);
struct nes_cm_core *nes_cm_alloc_core(void);
void flush_wqes(struct nes_device *nesdev, struct nes_qp *, u32, u32); void flush_wqes(struct nes_device *nesdev, struct nes_qp *, u32, u32);
int nes_manage_apbvt(struct nes_vnic *, u32, u32, u32); int nes_manage_apbvt(struct nes_vnic *, u32, u32, u32);
int nes_cm_disconn(struct nes_qp *); 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,7 +531,6 @@ int nes_modify_qp(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *);
struct nes_ib_device *nes_init_ofa_device(struct net_device *); struct nes_ib_device *nes_init_ofa_device(struct net_device *);
void nes_destroy_ofa_device(struct nes_ib_device *); void nes_destroy_ofa_device(struct nes_ib_device *);
int nes_register_ofa_device(struct nes_ib_device *); int nes_register_ofa_device(struct nes_ib_device *);
void nes_unregister_ofa_device(struct nes_ib_device *);
/* nes_util.c */ /* nes_util.c */
int nes_read_eeprom_values(struct nes_device *, struct nes_adapter *); int nes_read_eeprom_values(struct nes_device *, struct nes_adapter *);
......
...@@ -80,7 +80,30 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *, ...@@ -80,7 +80,30 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *,
static int add_ref_cm_node(struct nes_cm_node *); static int add_ref_cm_node(struct nes_cm_node *);
static int rem_ref_cm_node(struct nes_cm_core *, struct nes_cm_node *); static int rem_ref_cm_node(struct nes_cm_core *, struct nes_cm_node *);
static int mini_cm_del_listen(struct nes_cm_core *, struct nes_cm_listener *); static int mini_cm_del_listen(struct nes_cm_core *, struct nes_cm_listener *);
static struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *,
void *, u32, void *, u32, u8);
static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node);
static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *,
struct nes_vnic *,
struct ietf_mpa_frame *,
struct nes_cm_info *);
static int mini_cm_accept(struct nes_cm_core *, struct ietf_mpa_frame *,
struct nes_cm_node *);
static int mini_cm_reject(struct nes_cm_core *, struct ietf_mpa_frame *,
struct nes_cm_node *);
static int mini_cm_close(struct nes_cm_core *, struct nes_cm_node *);
static int mini_cm_recv_pkt(struct nes_cm_core *, struct nes_vnic *,
struct sk_buff *);
static int mini_cm_dealloc_core(struct nes_cm_core *);
static int mini_cm_get(struct nes_cm_core *);
static int mini_cm_set(struct nes_cm_core *, u32, u32);
static int nes_cm_disconn_true(struct nes_qp *);
static int nes_cm_post_event(struct nes_cm_event *event);
static int nes_disconnect(struct nes_qp *nesqp, int abrupt);
static void nes_disconnect_worker(struct work_struct *work);
static int send_ack(struct nes_cm_node *cm_node);
static int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb);
/* External CM API Interface */ /* External CM API Interface */
/* instance of function pointers for client API */ /* instance of function pointers for client API */
...@@ -99,7 +122,7 @@ static struct nes_cm_ops nes_cm_api = { ...@@ -99,7 +122,7 @@ static struct nes_cm_ops nes_cm_api = {
mini_cm_set mini_cm_set
}; };
struct nes_cm_core *g_cm_core; static struct nes_cm_core *g_cm_core;
atomic_t cm_connects; atomic_t cm_connects;
atomic_t cm_accepts; atomic_t cm_accepts;
...@@ -149,7 +172,7 @@ static struct nes_cm_event *create_event(struct nes_cm_node *cm_node, ...@@ -149,7 +172,7 @@ static struct nes_cm_event *create_event(struct nes_cm_node *cm_node,
/** /**
* send_mpa_request * send_mpa_request
*/ */
int send_mpa_request(struct nes_cm_node *cm_node) static int send_mpa_request(struct nes_cm_node *cm_node)
{ {
struct sk_buff *skb; struct sk_buff *skb;
int ret; int ret;
...@@ -243,8 +266,9 @@ static int handle_exception_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb ...@@ -243,8 +266,9 @@ static int handle_exception_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb
* form_cm_frame - get a free packet and build empty frame Use * form_cm_frame - get a free packet and build empty frame Use
* node info to build. * node info to build.
*/ */
struct sk_buff *form_cm_frame(struct sk_buff *skb, struct nes_cm_node *cm_node, static struct sk_buff *form_cm_frame(struct sk_buff *skb, struct nes_cm_node *cm_node,
void *options, u32 optionsize, void *data, u32 datasize, u8 flags) void *options, u32 optionsize, void *data,
u32 datasize, u8 flags)
{ {
struct tcphdr *tcph; struct tcphdr *tcph;
struct iphdr *iph; struct iphdr *iph;
...@@ -442,7 +466,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb, ...@@ -442,7 +466,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
/** /**
* nes_cm_timer_tick * nes_cm_timer_tick
*/ */
void nes_cm_timer_tick(unsigned long pass) static void nes_cm_timer_tick(unsigned long pass)
{ {
unsigned long flags, qplockflags; unsigned long flags, qplockflags;
unsigned long nexttimeout = jiffies + NES_LONG_TIME; unsigned long nexttimeout = jiffies + NES_LONG_TIME;
...@@ -644,7 +668,7 @@ void nes_cm_timer_tick(unsigned long pass) ...@@ -644,7 +668,7 @@ void nes_cm_timer_tick(unsigned long pass)
/** /**
* send_syn * send_syn
*/ */
int send_syn(struct nes_cm_node *cm_node, u32 sendack) static int send_syn(struct nes_cm_node *cm_node, u32 sendack)
{ {
int ret; int ret;
int flags = SET_SYN; int flags = SET_SYN;
...@@ -710,7 +734,7 @@ int send_syn(struct nes_cm_node *cm_node, u32 sendack) ...@@ -710,7 +734,7 @@ int send_syn(struct nes_cm_node *cm_node, u32 sendack)
/** /**
* send_reset * send_reset
*/ */
int send_reset(struct nes_cm_node *cm_node) static int send_reset(struct nes_cm_node *cm_node)
{ {
int ret; int ret;
struct sk_buff *skb = get_free_pkt(cm_node); struct sk_buff *skb = get_free_pkt(cm_node);
...@@ -732,7 +756,7 @@ int send_reset(struct nes_cm_node *cm_node) ...@@ -732,7 +756,7 @@ int send_reset(struct nes_cm_node *cm_node)
/** /**
* send_ack * send_ack
*/ */
int send_ack(struct nes_cm_node *cm_node) static int send_ack(struct nes_cm_node *cm_node)
{ {
int ret; int ret;
struct sk_buff *skb = get_free_pkt(cm_node); struct sk_buff *skb = get_free_pkt(cm_node);
...@@ -752,7 +776,7 @@ int send_ack(struct nes_cm_node *cm_node) ...@@ -752,7 +776,7 @@ int send_ack(struct nes_cm_node *cm_node)
/** /**
* send_fin * send_fin
*/ */
int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb) static int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb)
{ {
int ret; int ret;
...@@ -775,7 +799,7 @@ int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb) ...@@ -775,7 +799,7 @@ int send_fin(struct nes_cm_node *cm_node, struct sk_buff *skb)
/** /**
* get_free_pkt * get_free_pkt
*/ */
struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node) static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node)
{ {
struct sk_buff *skb, *new_skb; struct sk_buff *skb, *new_skb;
...@@ -1272,7 +1296,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, u32 opti ...@@ -1272,7 +1296,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, u32 opti
/** /**
* process_packet * process_packet
*/ */
int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb, static int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb,
struct nes_cm_core *cm_core) struct nes_cm_core *cm_core)
{ {
int optionsize; int optionsize;
...@@ -1631,8 +1655,9 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *cm_core, ...@@ -1631,8 +1655,9 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *cm_core,
/** /**
* mini_cm_connect - make a connection node with params * mini_cm_connect - make a connection node with params
*/ */
struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core, static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
struct nes_vnic *nesvnic, struct ietf_mpa_frame *mpa_frame, struct nes_vnic *nesvnic,
struct ietf_mpa_frame *mpa_frame,
struct nes_cm_info *cm_info) struct nes_cm_info *cm_info)
{ {
int ret = 0; int ret = 0;
...@@ -1717,7 +1742,7 @@ struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core, ...@@ -1717,7 +1742,7 @@ struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
* mini_cm_accept - accept a connection * mini_cm_accept - accept a connection
* This function is never called * This function is never called
*/ */
int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame, static int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame,
struct nes_cm_node *cm_node) struct nes_cm_node *cm_node)
{ {
return 0; return 0;
...@@ -1727,7 +1752,7 @@ int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame ...@@ -1727,7 +1752,7 @@ int mini_cm_accept(struct nes_cm_core *cm_core, struct ietf_mpa_frame *mpa_frame
/** /**
* mini_cm_reject - reject and teardown a connection * mini_cm_reject - reject and teardown a connection
*/ */
int mini_cm_reject(struct nes_cm_core *cm_core, static int mini_cm_reject(struct nes_cm_core *cm_core,
struct ietf_mpa_frame *mpa_frame, struct ietf_mpa_frame *mpa_frame,
struct nes_cm_node *cm_node) struct nes_cm_node *cm_node)
{ {
...@@ -1761,7 +1786,7 @@ int mini_cm_reject(struct nes_cm_core *cm_core, ...@@ -1761,7 +1786,7 @@ int mini_cm_reject(struct nes_cm_core *cm_core,
/** /**
* mini_cm_close * mini_cm_close
*/ */
int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node) static int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node)
{ {
int ret = 0; int ret = 0;
...@@ -1808,7 +1833,7 @@ int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node) ...@@ -1808,7 +1833,7 @@ int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node)
* recv_pkt - recv an ETHERNET packet, and process it through CM * recv_pkt - recv an ETHERNET packet, and process it through CM
* node state machine * node state machine
*/ */
int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic, static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct nes_cm_node *cm_node = NULL; struct nes_cm_node *cm_node = NULL;
...@@ -1898,7 +1923,7 @@ int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic, ...@@ -1898,7 +1923,7 @@ int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvnic,
/** /**
* nes_cm_alloc_core - allocate a top level instance of a cm core * nes_cm_alloc_core - allocate a top level instance of a cm core
*/ */
struct nes_cm_core *nes_cm_alloc_core(void) static struct nes_cm_core *nes_cm_alloc_core(void)
{ {
int i; int i;
...@@ -1958,7 +1983,7 @@ struct nes_cm_core *nes_cm_alloc_core(void) ...@@ -1958,7 +1983,7 @@ struct nes_cm_core *nes_cm_alloc_core(void)
/** /**
* mini_cm_dealloc_core - deallocate a top level instance of a cm core * mini_cm_dealloc_core - deallocate a top level instance of a cm core
*/ */
int mini_cm_dealloc_core(struct nes_cm_core *cm_core) static int mini_cm_dealloc_core(struct nes_cm_core *cm_core)
{ {
nes_debug(NES_DBG_CM, "De-Alloc CM Core (%p)\n", cm_core); nes_debug(NES_DBG_CM, "De-Alloc CM Core (%p)\n", cm_core);
...@@ -1983,7 +2008,7 @@ int mini_cm_dealloc_core(struct nes_cm_core *cm_core) ...@@ -1983,7 +2008,7 @@ int mini_cm_dealloc_core(struct nes_cm_core *cm_core)
/** /**
* mini_cm_get * mini_cm_get
*/ */
int mini_cm_get(struct nes_cm_core *cm_core) static int mini_cm_get(struct nes_cm_core *cm_core)
{ {
return cm_core->state; return cm_core->state;
} }
...@@ -1992,7 +2017,7 @@ int mini_cm_get(struct nes_cm_core *cm_core) ...@@ -1992,7 +2017,7 @@ int mini_cm_get(struct nes_cm_core *cm_core)
/** /**
* mini_cm_set * mini_cm_set
*/ */
int mini_cm_set(struct nes_cm_core *cm_core, u32 type, u32 value) static int mini_cm_set(struct nes_cm_core *cm_core, u32 type, u32 value)
{ {
int ret = 0; int ret = 0;
...@@ -2109,7 +2134,7 @@ int nes_cm_disconn(struct nes_qp *nesqp) ...@@ -2109,7 +2134,7 @@ int nes_cm_disconn(struct nes_qp *nesqp)
/** /**
* nes_disconnect_worker * nes_disconnect_worker
*/ */
void nes_disconnect_worker(struct work_struct *work) static void nes_disconnect_worker(struct work_struct *work)
{ {
struct nes_qp *nesqp = container_of(work, struct nes_qp, disconn_work); struct nes_qp *nesqp = container_of(work, struct nes_qp, disconn_work);
...@@ -2122,7 +2147,7 @@ void nes_disconnect_worker(struct work_struct *work) ...@@ -2122,7 +2147,7 @@ void nes_disconnect_worker(struct work_struct *work)
/** /**
* nes_cm_disconn_true * nes_cm_disconn_true
*/ */
int nes_cm_disconn_true(struct nes_qp *nesqp) static int nes_cm_disconn_true(struct nes_qp *nesqp)
{ {
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
...@@ -2265,7 +2290,7 @@ int nes_cm_disconn_true(struct nes_qp *nesqp) ...@@ -2265,7 +2290,7 @@ int nes_cm_disconn_true(struct nes_qp *nesqp)
/** /**
* nes_disconnect * nes_disconnect
*/ */
int nes_disconnect(struct nes_qp *nesqp, int abrupt) static int nes_disconnect(struct nes_qp *nesqp, int abrupt)
{ {
int ret = 0; int ret = 0;
struct nes_vnic *nesvnic; struct nes_vnic *nesvnic;
...@@ -2740,7 +2765,7 @@ int nes_cm_stop(void) ...@@ -2740,7 +2765,7 @@ int nes_cm_stop(void)
* cm_event_connected * cm_event_connected
* handle a connected event, setup QPs and HW * handle a connected event, setup QPs and HW
*/ */
void cm_event_connected(struct nes_cm_event *event) static void cm_event_connected(struct nes_cm_event *event)
{ {
u64 u64temp; u64 u64temp;
struct nes_qp *nesqp; struct nes_qp *nesqp;
...@@ -2877,7 +2902,7 @@ void cm_event_connected(struct nes_cm_event *event) ...@@ -2877,7 +2902,7 @@ void cm_event_connected(struct nes_cm_event *event)
/** /**
* cm_event_connect_error * cm_event_connect_error
*/ */
void cm_event_connect_error(struct nes_cm_event *event) static void cm_event_connect_error(struct nes_cm_event *event)
{ {
struct nes_qp *nesqp; struct nes_qp *nesqp;
struct iw_cm_id *cm_id; struct iw_cm_id *cm_id;
...@@ -2930,7 +2955,7 @@ void cm_event_connect_error(struct nes_cm_event *event) ...@@ -2930,7 +2955,7 @@ void cm_event_connect_error(struct nes_cm_event *event)
/** /**
* cm_event_reset * cm_event_reset
*/ */
void cm_event_reset(struct nes_cm_event *event) static void cm_event_reset(struct nes_cm_event *event)
{ {
struct nes_qp *nesqp; struct nes_qp *nesqp;
struct iw_cm_id *cm_id; struct iw_cm_id *cm_id;
...@@ -2973,7 +2998,7 @@ void cm_event_reset(struct nes_cm_event *event) ...@@ -2973,7 +2998,7 @@ void cm_event_reset(struct nes_cm_event *event)
/** /**
* cm_event_mpa_req * cm_event_mpa_req
*/ */
void cm_event_mpa_req(struct nes_cm_event *event) static void cm_event_mpa_req(struct nes_cm_event *event)
{ {
struct iw_cm_id *cm_id; struct iw_cm_id *cm_id;
struct iw_cm_event cm_event; struct iw_cm_event cm_event;
...@@ -3019,7 +3044,7 @@ static void nes_cm_event_handler(struct work_struct *); ...@@ -3019,7 +3044,7 @@ static void nes_cm_event_handler(struct work_struct *);
* nes_cm_post_event * nes_cm_post_event
* post an event to the cm event handler * post an event to the cm event handler
*/ */
int nes_cm_post_event(struct nes_cm_event *event) static int nes_cm_post_event(struct nes_cm_event *event)
{ {
atomic_inc(&event->cm_node->cm_core->events_posted); atomic_inc(&event->cm_node->cm_core->events_posted);
add_ref_cm_node(event->cm_node); add_ref_cm_node(event->cm_node);
......
...@@ -383,35 +383,10 @@ struct nes_cm_ops { ...@@ -383,35 +383,10 @@ struct nes_cm_ops {
int (*set)(struct nes_cm_core *, u32, u32); int (*set)(struct nes_cm_core *, u32, u32);
}; };
int send_mpa_request(struct nes_cm_node *);
struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *,
void *, u32, void *, u32, u8);
int schedule_nes_timer(struct nes_cm_node *, struct sk_buff *, int schedule_nes_timer(struct nes_cm_node *, struct sk_buff *,
enum nes_timer_type, int, int); enum nes_timer_type, int, int);
void nes_cm_timer_tick(unsigned long);
int send_syn(struct nes_cm_node *, u32);
int send_reset(struct nes_cm_node *);
int send_ack(struct nes_cm_node *);
int send_fin(struct nes_cm_node *, struct sk_buff *);
struct sk_buff *get_free_pkt(struct nes_cm_node *);
int process_packet(struct nes_cm_node *, struct sk_buff *, struct nes_cm_core *);
struct nes_cm_node * mini_cm_connect(struct nes_cm_core *,
struct nes_vnic *, struct ietf_mpa_frame *, struct nes_cm_info *);
int mini_cm_accept(struct nes_cm_core *, struct ietf_mpa_frame *, struct nes_cm_node *);
int mini_cm_reject(struct nes_cm_core *, struct ietf_mpa_frame *, struct nes_cm_node *);
int mini_cm_close(struct nes_cm_core *, struct nes_cm_node *);
int mini_cm_recv_pkt(struct nes_cm_core *, struct nes_vnic *, struct sk_buff *);
struct nes_cm_core *mini_cm_alloc_core(struct nes_cm_info *);
int mini_cm_dealloc_core(struct nes_cm_core *);
int mini_cm_get(struct nes_cm_core *);
int mini_cm_set(struct nes_cm_core *, u32, u32);
int nes_cm_disconn(struct nes_qp *); int nes_cm_disconn(struct nes_qp *);
void nes_disconnect_worker(struct work_struct *);
int nes_cm_disconn_true(struct nes_qp *);
int nes_disconnect(struct nes_qp *, int);
int nes_accept(struct iw_cm_id *, struct iw_cm_conn_param *); int nes_accept(struct iw_cm_id *, struct iw_cm_conn_param *);
int nes_reject(struct iw_cm_id *, const void *, u8); 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,11 +398,4 @@ int nes_cm_recv(struct sk_buff *, struct net_device *);
int nes_cm_start(void); int nes_cm_start(void);
int nes_cm_stop(void); int nes_cm_stop(void);
/* CM event handler functions */
void cm_event_connected(struct nes_cm_event *);
void cm_event_connect_error(struct nes_cm_event *);
void cm_event_reset(struct nes_cm_event *);
void cm_event_mpa_req(struct nes_cm_event *);
int nes_cm_post_event(struct nes_cm_event *);
#endif /* NES_CM_H */ #endif /* NES_CM_H */
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "nes.h" #include "nes.h"
u32 crit_err_count = 0; static u32 crit_err_count;
u32 int_mod_timer_init; u32 int_mod_timer_init;
u32 int_mod_cq_depth_256; u32 int_mod_cq_depth_256;
u32 int_mod_cq_depth_128; u32 int_mod_cq_depth_128;
...@@ -53,6 +53,17 @@ u32 int_mod_cq_depth_1; ...@@ -53,6 +53,17 @@ u32 int_mod_cq_depth_1;
#include "nes_cm.h" #include "nes_cm.h"
static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq);
static void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count);
static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
u8 OneG_Mode);
static void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq);
static void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq);
static void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq);
static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
struct nes_hw_aeqe *aeqe);
static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number);
static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode);
#ifdef CONFIG_INFINIBAND_NES_DEBUG #ifdef CONFIG_INFINIBAND_NES_DEBUG
static unsigned char *nes_iwarp_state_str[] = { 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,7 +594,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
/** /**
* nes_reset_adapter_ne020 * nes_reset_adapter_ne020
*/ */
unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode) static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode)
{ {
u32 port_count; u32 port_count;
u32 u32temp; u32 u32temp;
...@@ -691,7 +702,8 @@ unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode) ...@@ -691,7 +702,8 @@ unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode)
/** /**
* nes_init_serdes * nes_init_serdes
*/ */
int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8 OneG_Mode) static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
u8 OneG_Mode)
{ {
int i; int i;
u32 u32temp; u32 u32temp;
...@@ -760,7 +772,7 @@ int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8 One ...@@ -760,7 +772,7 @@ int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8 One
* nes_init_csr_ne020 * nes_init_csr_ne020
* Initialize registers for ne020 hardware * Initialize registers for ne020 hardware
*/ */
void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count) static void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count)
{ {
u32 u32temp; u32 u32temp;
...@@ -1909,7 +1921,7 @@ void nes_dpc(unsigned long param) ...@@ -1909,7 +1921,7 @@ void nes_dpc(unsigned long param)
/** /**
* nes_process_ceq * nes_process_ceq
*/ */
void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq) static void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq)
{ {
u64 u64temp; u64 u64temp;
struct nes_hw_cq *cq; struct nes_hw_cq *cq;
...@@ -1949,7 +1961,7 @@ void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq) ...@@ -1949,7 +1961,7 @@ void nes_process_ceq(struct nes_device *nesdev, struct nes_hw_ceq *ceq)
/** /**
* nes_process_aeq * nes_process_aeq
*/ */
void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq) static void nes_process_aeq(struct nes_device *nesdev, struct nes_hw_aeq *aeq)
{ {
// u64 u64temp; // u64 u64temp;
u32 head; u32 head;
...@@ -2060,7 +2072,7 @@ static void nes_reset_link(struct nes_device *nesdev, u32 mac_index) ...@@ -2060,7 +2072,7 @@ static void nes_reset_link(struct nes_device *nesdev, u32 mac_index)
/** /**
* nes_process_mac_intr * nes_process_mac_intr
*/ */
void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
{ {
unsigned long flags; unsigned long flags;
u32 pcs_control_status; u32 pcs_control_status;
...@@ -2205,7 +2217,7 @@ void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) ...@@ -2205,7 +2217,7 @@ void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq) static void nes_nic_napi_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
{ {
struct nes_vnic *nesvnic = container_of(cq, struct nes_vnic, nic_cq); struct nes_vnic *nesvnic = container_of(cq, struct nes_vnic, nic_cq);
...@@ -2428,7 +2440,7 @@ void nes_nic_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq) ...@@ -2428,7 +2440,7 @@ void nes_nic_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
/** /**
* nes_cqp_ce_handler * nes_cqp_ce_handler
*/ */
void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq) static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq)
{ {
u64 u64temp; u64 u64temp;
unsigned long flags; unsigned long flags;
...@@ -2567,7 +2579,8 @@ void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq) ...@@ -2567,7 +2579,8 @@ void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq)
/** /**
* nes_process_iwarp_aeqe * nes_process_iwarp_aeqe
*/ */
void nes_process_iwarp_aeqe(struct nes_device *nesdev, struct nes_hw_aeqe *aeqe) static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
struct nes_hw_aeqe *aeqe)
{ {
u64 context; u64 context;
u64 aeqe_context = 0; u64 aeqe_context = 0;
......
...@@ -832,7 +832,7 @@ static int nes_netdev_set_mac_address(struct net_device *netdev, void *p) ...@@ -832,7 +832,7 @@ static int nes_netdev_set_mac_address(struct net_device *netdev, void *p)
/** /**
* nes_netdev_set_multicast_list * nes_netdev_set_multicast_list
*/ */
void nes_netdev_set_multicast_list(struct net_device *netdev) static void nes_netdev_set_multicast_list(struct net_device *netdev)
{ {
struct nes_vnic *nesvnic = netdev_priv(netdev); struct nes_vnic *nesvnic = netdev_priv(netdev);
struct nes_device *nesdev = nesvnic->nesdev; struct nes_device *nesdev = nesvnic->nesdev;
......
...@@ -49,6 +49,7 @@ atomic_t mod_qp_timouts; ...@@ -49,6 +49,7 @@ atomic_t mod_qp_timouts;
atomic_t qps_created; atomic_t qps_created;
atomic_t sw_qps_destroyed; atomic_t sw_qps_destroyed;
static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
/** /**
* nes_alloc_mw * nes_alloc_mw
...@@ -3895,7 +3896,7 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev) ...@@ -3895,7 +3896,7 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev)
/** /**
* nes_unregister_ofa_device * nes_unregister_ofa_device
*/ */
void nes_unregister_ofa_device(struct nes_ib_device *nesibdev) static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev)
{ {
struct nes_vnic *nesvnic = nesibdev->nesvnic; struct nes_vnic *nesvnic = nesibdev->nesvnic;
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment