]> err.no Git - linux-2.6/commitdiff
RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
authorSteve Wise <swise@opengridcomputing.com>
Thu, 26 Apr 2007 20:21:09 +0000 (15:21 -0500)
committerRoland Dreier <rolandd@cisco.com>
Tue, 1 May 2007 00:30:28 +0000 (17:30 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/cxio_wr.h
drivers/infiniband/hw/cxgb3/iwch_provider.c

index 90d7b8972cb46d21a554393abf88cd5d69730eff..ff7290eacefb7ee83ec95565384a29891a06f91b 100644 (file)
@@ -38,6 +38,7 @@
 #include "firmware_exports.h"
 
 #define T3_MAX_SGE      4
+#define T3_MAX_INLINE  64
 
 #define Q_EMPTY(rptr,wptr) ((rptr)==(wptr))
 #define Q_FULL(rptr,wptr,size_log2)  ( (((wptr)-(rptr))>>(size_log2)) && \
index af28a317016d058b3a824783126e7a4d209e1646..93038c007133ead419be5bd5a4d80a5e22b783e7 100644 (file)
@@ -780,6 +780,9 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd,
        if (rqsize > T3_MAX_RQ_SIZE)
                return ERR_PTR(-EINVAL);
 
+       if (attrs->cap.max_inline_data > T3_MAX_INLINE)
+               return ERR_PTR(-EINVAL);
+
        /*
         * NOTE: The SQ and total WQ sizes don't need to be
         * a power of two.  However, all the code assumes