[ofw] correcting a side-effect of a previous bugfix

Leonid Keller leonid at mellanox.co.il
Thu Nov 13 07:54:03 PST 2008


1361 fix added a bug: now all application, creating QP with zero receive
QP size, will fail with send completion error.

This patch fixes that.

 
 
Index: V:/svn/winib/trunk/hw/mthca/kernel/mthca_qp.c
===================================================================
--- V:/svn/winib/trunk/hw/mthca/kernel/mthca_qp.c (revision 3466)
+++ V:/svn/winib/trunk/hw/mthca/kernel/mthca_qp.c (revision 3467)
@@ -1374,6 +1374,12 @@
  if (qp->transport == MLX && cap->max_recv_sge + 2 >
(u32)dev->limits.max_sg)
   return -EINVAL;
 
+ /* Enable creating zero-sized QPs */
+ if (!cap->max_recv_wr)
+  cap->max_recv_wr = 1;
+ if (!cap->max_send_wr)
+  cap->max_send_wr = 1;
+ 
  if (mthca_is_memfree(dev)) {
   qp->rq.max = cap->max_recv_wr ?
    roundup_pow_of_two(cap->max_recv_wr) : 0;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081113/a4cfbb8f/attachment.html>


More information about the ofw mailing list