aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-02-19 10:50:24 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2014-04-07 04:48:46 -0400
commitf93f3a70da9175b4641f93d466d779675eb83fa2 (patch)
tree98a7a3315ceda22991895b35ea401dea3b57428e /drivers/infiniband
parentd3e125dac1f4fd983bb6d8d654f152f243f7c953 (diff)
IB/isert: Accept RDMA_WRITE completions
In case of protected transactions, we will need to check the protection status of the transaction before sending SCSI response. So be ready for RDMA_WRITE completions. currently we don't ask for these completions, but for T10-PI we will. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 72063147933c..2eb07b943ed9 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -51,6 +51,8 @@ isert_unreg_rdma(struct isert_cmd *isert_cmd, struct isert_conn *isert_conn);
51static int 51static int
52isert_reg_rdma(struct iscsi_conn *conn, struct iscsi_cmd *cmd, 52isert_reg_rdma(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
53 struct isert_rdma_wr *wr); 53 struct isert_rdma_wr *wr);
54static int
55isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd);
54 56
55static void 57static void
56isert_qp_event_callback(struct ib_event *e, void *context) 58isert_qp_event_callback(struct ib_event *e, void *context)
@@ -1652,6 +1654,18 @@ isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd,
1652} 1654}
1653 1655
1654static void 1656static void
1657isert_completion_rdma_write(struct iser_tx_desc *tx_desc,
1658 struct isert_cmd *isert_cmd)
1659{
1660 struct iscsi_cmd *cmd = isert_cmd->iscsi_cmd;
1661 struct isert_conn *isert_conn = isert_cmd->conn;
1662 struct isert_device *device = isert_conn->conn_device;
1663
1664 device->unreg_rdma_mem(isert_cmd, isert_conn);
1665 isert_put_response(isert_conn->conn, cmd);
1666}
1667
1668static void
1655isert_completion_rdma_read(struct iser_tx_desc *tx_desc, 1669isert_completion_rdma_read(struct iser_tx_desc *tx_desc,
1656 struct isert_cmd *isert_cmd) 1670 struct isert_cmd *isert_cmd)
1657{ 1671{
@@ -1773,8 +1787,9 @@ __isert_send_completion(struct iser_tx_desc *tx_desc,
1773 isert_conn, ib_dev); 1787 isert_conn, ib_dev);
1774 break; 1788 break;
1775 case ISER_IB_RDMA_WRITE: 1789 case ISER_IB_RDMA_WRITE:
1776 pr_err("isert_send_completion: Got ISER_IB_RDMA_WRITE\n"); 1790 pr_debug("isert_send_completion: Got ISER_IB_RDMA_WRITE\n");
1777 dump_stack(); 1791 atomic_dec(&isert_conn->post_send_buf_count);
1792 isert_completion_rdma_write(tx_desc, isert_cmd);
1778 break; 1793 break;
1779 case ISER_IB_RDMA_READ: 1794 case ISER_IB_RDMA_READ:
1780 pr_debug("isert_send_completion: Got ISER_IB_RDMA_READ:\n"); 1795 pr_debug("isert_send_completion: Got ISER_IB_RDMA_READ:\n");