From: Roland Dreier <rolandd@cisco.com>
To: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: openib-general@openib.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH/RFC v2] IB: Add SCSI RDMA Protocol (SRP) initiator
Date: Wed, 02 Nov 2005 14:08:35 -0800 [thread overview]
Message-ID: <52irva8zz0.fsf@cisco.com> (raw)
In-Reply-To: <20051102220358.GA27132@mellanox.co.il> (Michael S. Tsirkin's message of "Thu, 3 Nov 2005 00:03:58 +0200")
OK, I replaced the function with:
+static int srp_init_qp(struct srp_target_port *target,
+ struct ib_qp *qp)
+{
+ struct ib_qp_attr *attr;
+ int ret;
+
+ attr = kmalloc(sizeof *attr, GFP_KERNEL);
+ if (!attr)
+ return -ENOMEM;
+
+ ret = ib_find_cached_pkey(target->srp_host->dev,
+ target->srp_host->port,
+ be16_to_cpu(target->path.pkey),
+ &attr->pkey_index);
+ if (ret)
+ goto out;
+
+ attr->qp_state = IB_QPS_INIT;
+ attr->qp_access_flags = (IB_ACCESS_REMOTE_READ |
+ IB_ACCESS_REMOTE_WRITE);
+ attr->port_num = target->srp_host->port;
+
+ ret = ib_modify_qp(qp, attr,
+ IB_QP_STATE |
+ IB_QP_PKEY_INDEX |
+ IB_QP_ACCESS_FLAGS |
+ IB_QP_PORT);
+
+out:
+ kfree(attr);
+ return ret;
+}
next prev parent reply other threads:[~2005-11-02 22:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 17:23 [PATCH/RFC] IB: Add SCSI RDMA Protocol (SRP) initiator Roland Dreier
2005-11-01 0:28 ` [openib-general] " Grant Grundler
2005-11-01 4:51 ` Roland Dreier
2005-11-02 21:34 ` [PATCH/RFC v2] " Roland Dreier
2005-11-02 22:03 ` Michael S. Tsirkin
2005-11-02 22:04 ` Roland Dreier
2005-11-02 22:08 ` Roland Dreier [this message]
2005-11-01 2:04 ` [PATCH/RFC] " FUJITA Tomonori
2005-11-01 4:55 ` Roland Dreier
2005-11-01 4:58 ` [openib-general] " Christoph Hellwig
2005-11-01 5:03 ` Roland Dreier
2005-11-01 5:04 ` Christoph Hellwig
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=52irva8zz0.fsf@cisco.com \
--to=rolandd@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mst@mellanox.co.il \
--cc=openib-general@openib.org \
/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;
as well as URLs for NNTP newsgroup(s).