[patch 8/8] NES - ib_post_recv fixes

frank zago
2009-11-24T17:36:56Z

Always set ib_post_recv()'s bad_wr.

Signed-off-by: Frank Zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
Index: linux-2.6.31/drivers/infiniband/hw/nes/nes_verbs.c
===================================================================
--- linux-2.6.31.orig/drivers/infiniband/hw/nes/nes_verbs.c 2009-11-23
21:59:04.000000000 -0600
+++ linux-2.6.31/drivers/infiniband/hw/nes/nes_verbs.c 2009-11-23
21:59:05.000000000 -0600
@@ -3554,8 +3554,10 @@
u32 counter;
u32 total_payload_length;

- if (nesqp->ibqp_state > IB_QPS_RTS)
- return -EINVAL;
+ if (nesqp->ibqp_state > IB_QPS_RTS) {
+ err = -EINVAL;
+ goto out;
+ }

spin_lock_irqsave(&nesqp->lock, flags);

@@ -3618,6 +3620,7 @@

spin_unlock_irqrestore(&nesqp->lock, flags);

+out:
if (err)
*bad_wr = ib_wr;
return err;