diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes.h | 18 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h index 1595dc7bba9d..13a5bb1a7bcf 100644 --- a/drivers/infiniband/hw/nes/nes.h +++ b/drivers/infiniband/hw/nes/nes.h | |||
@@ -137,14 +137,18 @@ | |||
137 | 137 | ||
138 | #ifdef CONFIG_INFINIBAND_NES_DEBUG | 138 | #ifdef CONFIG_INFINIBAND_NES_DEBUG |
139 | #define nes_debug(level, fmt, args...) \ | 139 | #define nes_debug(level, fmt, args...) \ |
140 | do { \ | ||
140 | if (level & nes_debug_level) \ | 141 | if (level & nes_debug_level) \ |
141 | printk(KERN_ERR PFX "%s[%u]: " fmt, __func__, __LINE__, ##args) | 142 | printk(KERN_ERR PFX "%s[%u]: " fmt, __func__, __LINE__, ##args); \ |
142 | 143 | } while (0) | |
143 | #define assert(expr) \ | 144 | |
144 | if (!(expr)) { \ | 145 | #define assert(expr) \ |
145 | printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \ | 146 | do { \ |
146 | #expr, __FILE__, __func__, __LINE__); \ | 147 | if (!(expr)) { \ |
147 | } | 148 | printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \ |
149 | #expr, __FILE__, __func__, __LINE__); \ | ||
150 | } \ | ||
151 | } while (0) | ||
148 | 152 | ||
149 | #define NES_EVENT_TIMEOUT 1200000 | 153 | #define NES_EVENT_TIMEOUT 1200000 |
150 | #else | 154 | #else |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index f241ca104d16..aa373c5f8d84 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -92,7 +92,7 @@ static int mini_cm_dealloc_core(struct nes_cm_core *); | |||
92 | static int mini_cm_get(struct nes_cm_core *); | 92 | static int mini_cm_get(struct nes_cm_core *); |
93 | static int mini_cm_set(struct nes_cm_core *, u32, u32); | 93 | static int mini_cm_set(struct nes_cm_core *, u32, u32); |
94 | 94 | ||
95 | static struct sk_buff *form_cm_frame(struct sk_buff *, struct nes_cm_node *, | 95 | static void form_cm_frame(struct sk_buff *, struct nes_cm_node *, |
96 | void *, u32, void *, u32, u8); | 96 | void *, u32, void *, u32, u8); |
97 | static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node); | 97 | static struct sk_buff *get_free_pkt(struct nes_cm_node *cm_node); |
98 | static int add_ref_cm_node(struct nes_cm_node *); | 98 | static int add_ref_cm_node(struct nes_cm_node *); |
@@ -251,7 +251,7 @@ static int parse_mpa(struct nes_cm_node *cm_node, u8 *buffer, u32 len) | |||
251 | * form_cm_frame - get a free packet and build empty frame Use | 251 | * form_cm_frame - get a free packet and build empty frame Use |
252 | * node info to build. | 252 | * node info to build. |
253 | */ | 253 | */ |
254 | static struct sk_buff *form_cm_frame(struct sk_buff *skb, | 254 | static void form_cm_frame(struct sk_buff *skb, |
255 | struct nes_cm_node *cm_node, void *options, u32 optionsize, | 255 | struct nes_cm_node *cm_node, void *options, u32 optionsize, |
256 | void *data, u32 datasize, u8 flags) | 256 | void *data, u32 datasize, u8 flags) |
257 | { | 257 | { |
@@ -339,7 +339,6 @@ static struct sk_buff *form_cm_frame(struct sk_buff *skb, | |||
339 | skb_shinfo(skb)->nr_frags = 0; | 339 | skb_shinfo(skb)->nr_frags = 0; |
340 | cm_packets_created++; | 340 | cm_packets_created++; |
341 | 341 | ||
342 | return skb; | ||
343 | } | 342 | } |
344 | 343 | ||
345 | 344 | ||
@@ -381,8 +380,6 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb, | |||
381 | int ret = 0; | 380 | int ret = 0; |
382 | u32 was_timer_set; | 381 | u32 was_timer_set; |
383 | 382 | ||
384 | if (!cm_node) | ||
385 | return -EINVAL; | ||
386 | new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC); | 383 | new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC); |
387 | if (!new_send) | 384 | if (!new_send) |
388 | return -1; | 385 | return -1; |
@@ -1325,7 +1322,6 @@ static void drop_packet(struct sk_buff *skb) | |||
1325 | static void handle_fin_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, | 1322 | static void handle_fin_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, |
1326 | struct tcphdr *tcph) | 1323 | struct tcphdr *tcph) |
1327 | { | 1324 | { |
1328 | atomic_inc(&cm_resets_recvd); | ||
1329 | nes_debug(NES_DBG_CM, "Received FIN, cm_node = %p, state = %u. " | 1325 | nes_debug(NES_DBG_CM, "Received FIN, cm_node = %p, state = %u. " |
1330 | "refcnt=%d\n", cm_node, cm_node->state, | 1326 | "refcnt=%d\n", cm_node, cm_node->state, |
1331 | atomic_read(&cm_node->ref_count)); | 1327 | atomic_read(&cm_node->ref_count)); |