aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2007-04-26 16:21:09 -0400
committerRoland Dreier <rolandd@cisco.com>2007-04-30 20:30:28 -0400
commit1860cdf802310e4a988e0b8fca41cc97da36f779 (patch)
tree6b265513bba23982d16537f262eb651304f27f95 /drivers/infiniband
parent4a97d47ef7946cf31b76945c3199b0b5cad6a8ed (diff)
RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_wr.h1
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_provider.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_wr.h b/drivers/infiniband/hw/cxgb3/cxio_wr.h
index 90d7b8972cb4..ff7290eacefb 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_wr.h
+++ b/drivers/infiniband/hw/cxgb3/cxio_wr.h
@@ -38,6 +38,7 @@
38#include "firmware_exports.h" 38#include "firmware_exports.h"
39 39
40#define T3_MAX_SGE 4 40#define T3_MAX_SGE 4
41#define T3_MAX_INLINE 64
41 42
42#define Q_EMPTY(rptr,wptr) ((rptr)==(wptr)) 43#define Q_EMPTY(rptr,wptr) ((rptr)==(wptr))
43#define Q_FULL(rptr,wptr,size_log2) ( (((wptr)-(rptr))>>(size_log2)) && \ 44#define Q_FULL(rptr,wptr,size_log2) ( (((wptr)-(rptr))>>(size_log2)) && \
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index af28a317016d..93038c007133 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -780,6 +780,9 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd,
780 if (rqsize > T3_MAX_RQ_SIZE) 780 if (rqsize > T3_MAX_RQ_SIZE)
781 return ERR_PTR(-EINVAL); 781 return ERR_PTR(-EINVAL);
782 782
783 if (attrs->cap.max_inline_data > T3_MAX_INLINE)
784 return ERR_PTR(-EINVAL);
785
783 /* 786 /*
784 * NOTE: The SQ and total WQ sizes don't need to be 787 * NOTE: The SQ and total WQ sizes don't need to be
785 * a power of two. However, all the code assumes 788 * a power of two. However, all the code assumes