From: Steve Wise <swise@opengridcomputing.com>
To: rdreier@cisco.com, jeff@garzik.org
Cc: divy@chelsio.com, general@lists.openfabrics.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 2.6.22 2/5] iw_cxgb3: Fail qp creation if the requested max_inline is too large.
Date: Thu, 26 Apr 2007 15:21:09 -0500 [thread overview]
Message-ID: <20070426202107.24234.91018.stgit@dell3.ogc.int> (raw)
In-Reply-To: <20070426202057.24234.56383.stgit@dell3.ogc.int>
Fail qp creation if the requested max_inline is too large.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
---
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 <linux/timer.h>
#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 24e0df0..b1128ec 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(stru
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
next prev parent reply other threads:[~2007-04-26 20:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 20:20 [PATCH 2.6.22 0/5] iw_cxgb3: Bug Fixes + Firmware update Steve Wise
2007-04-26 20:21 ` [PATCH 2.6.22 1/5] iw_cxgb3: Fix TERM codes Steve Wise
2007-04-26 20:21 ` Steve Wise [this message]
2007-04-26 20:21 ` [PATCH 2.6.22 3/5] iw_cxgb3: Initialize cpu_idx field in cpl_close_listserv_req message Steve Wise
2007-04-26 20:21 ` [PATCH 2.6.22 4/5] iw_cxgb3: Support for new abort logic Steve Wise
2007-04-26 20:21 ` [PATCH 2.6.22 5/5] iw_cxgb3: Update required firmware revision to 4.0.0 Steve Wise
2007-04-27 3:12 ` Roland Dreier
2007-04-27 13:03 ` Steve Wise
2007-04-27 16:52 ` Divy Le Ray
2007-04-30 23:59 ` Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070426202107.24234.91018.stgit@dell3.ogc.int \
--to=swise@opengridcomputing.com \
--cc=divy@chelsio.com \
--cc=general@lists.openfabrics.org \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rdreier@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®