[patch 1/8] Ammasso - ib_post_send fix

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

Always set ib_post_send()'s bad_wr.

Signed-off-by: Frank Zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
Index: linux-2.6.31/drivers/infiniband/hw/amso1100/c2_qp.c
===================================================================
--- linux-2.6.31.orig/drivers/infiniband/hw/amso1100/c2_qp.c 2009-11-23
20:22:19.000000000 -0600
+++ linux-2.6.31/drivers/infiniband/hw/amso1100/c2_qp.c 2009-11-23
20:25:55.000000000 -0600
@@ -798,8 +798,10 @@
u8 actual_sge_count;
u32 msg_size;

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

while (ib_wr) {

@@ -930,6 +932,7 @@
ib_wr = ib_wr->next;
}

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