Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1860cdf802310e4a988e0b8fca41cc97da36f779
Commit:     1860cdf802310e4a988e0b8fca41cc97da36f779
Parent:     4a97d47ef7946cf31b76945c3199b0b5cad6a8ed
Author:     Steve Wise <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 26 15:21:09 2007 -0500
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Mon Apr 30 17:30:28 2007 -0700

    RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
    
    Signed-off-by: Steve Wise <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/cxgb3/cxio_wr.h       |    1 +
 drivers/infiniband/hw/cxgb3/iwch_provider.c |    3 +++
 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 90d7b89..ff7290e 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_wr.h
+++ b/drivers/infiniband/hw/cxgb3/cxio_wr.h
@@ -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)) && \
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c 
b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index af28a31..93038c0 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,
        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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to