diff options
| author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-03 22:39:37 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-07 21:36:47 -0400 |
| commit | dbbc5d11074fc017488e6bdaaf9238d53e35ab07 (patch) | |
| tree | ef27cc5c41740c4ea8bba3afcb6fee4fc2ae986f | |
| parent | c5a2adbfcbc1d364371cd81c4180c7a83b73c5a0 (diff) | |
iser-target: Rename sense_buf_[dma,len] to pdu_[dma,len]
Now that these two variables are used for REJECT payloads as well
as SCSI response sense payloads, rename them to something that
makes more sense.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| -rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 30 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.h | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 66712bd7dc11..fa4251803577 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
| @@ -1286,11 +1286,11 @@ static void | |||
| 1286 | isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd, | 1286 | isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd, |
| 1287 | struct ib_device *ib_dev) | 1287 | struct ib_device *ib_dev) |
| 1288 | { | 1288 | { |
| 1289 | if (isert_cmd->sense_buf_dma != 0) { | 1289 | if (isert_cmd->pdu_buf_dma != 0) { |
| 1290 | pr_debug("Calling ib_dma_unmap_single for isert_cmd->sense_buf_dma\n"); | 1290 | pr_debug("Calling ib_dma_unmap_single for isert_cmd->pdu_buf_dma\n"); |
| 1291 | ib_dma_unmap_single(ib_dev, isert_cmd->sense_buf_dma, | 1291 | ib_dma_unmap_single(ib_dev, isert_cmd->pdu_buf_dma, |
| 1292 | isert_cmd->sense_buf_len, DMA_TO_DEVICE); | 1292 | isert_cmd->pdu_buf_len, DMA_TO_DEVICE); |
| 1293 | isert_cmd->sense_buf_dma = 0; | 1293 | isert_cmd->pdu_buf_dma = 0; |
| 1294 | } | 1294 | } |
| 1295 | 1295 | ||
| 1296 | isert_unmap_tx_desc(tx_desc, ib_dev); | 1296 | isert_unmap_tx_desc(tx_desc, ib_dev); |
| @@ -1588,7 +1588,7 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd) | |||
| 1588 | (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { | 1588 | (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { |
| 1589 | struct ib_device *ib_dev = isert_conn->conn_cm_id->device; | 1589 | struct ib_device *ib_dev = isert_conn->conn_cm_id->device; |
| 1590 | struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; | 1590 | struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; |
| 1591 | u32 padding, sense_len; | 1591 | u32 padding, pdu_len; |
| 1592 | 1592 | ||
| 1593 | put_unaligned_be16(cmd->se_cmd.scsi_sense_length, | 1593 | put_unaligned_be16(cmd->se_cmd.scsi_sense_length, |
| 1594 | cmd->sense_buffer); | 1594 | cmd->sense_buffer); |
| @@ -1596,15 +1596,15 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd) | |||
| 1596 | 1596 | ||
| 1597 | padding = -(cmd->se_cmd.scsi_sense_length) & 3; | 1597 | padding = -(cmd->se_cmd.scsi_sense_length) & 3; |
| 1598 | hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); | 1598 | hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); |
| 1599 | sense_len = cmd->se_cmd.scsi_sense_length + padding; | 1599 | pdu_len = cmd->se_cmd.scsi_sense_length + padding; |
| 1600 | 1600 | ||
| 1601 | isert_cmd->sense_buf_dma = ib_dma_map_single(ib_dev, | 1601 | isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev, |
| 1602 | (void *)cmd->sense_buffer, sense_len, | 1602 | (void *)cmd->sense_buffer, pdu_len, |
| 1603 | DMA_TO_DEVICE); | 1603 | DMA_TO_DEVICE); |
| 1604 | 1604 | ||
| 1605 | isert_cmd->sense_buf_len = sense_len; | 1605 | isert_cmd->pdu_buf_len = pdu_len; |
| 1606 | tx_dsg->addr = isert_cmd->sense_buf_dma; | 1606 | tx_dsg->addr = isert_cmd->pdu_buf_dma; |
| 1607 | tx_dsg->length = sense_len; | 1607 | tx_dsg->length = pdu_len; |
| 1608 | tx_dsg->lkey = isert_conn->conn_mr->lkey; | 1608 | tx_dsg->lkey = isert_conn->conn_mr->lkey; |
| 1609 | isert_cmd->tx_desc.num_sge = 2; | 1609 | isert_cmd->tx_desc.num_sge = 2; |
| 1610 | } | 1610 | } |
| @@ -1692,11 +1692,11 @@ isert_put_reject(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | |||
| 1692 | isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); | 1692 | isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); |
| 1693 | 1693 | ||
| 1694 | hton24(hdr->dlength, ISCSI_HDR_LEN); | 1694 | hton24(hdr->dlength, ISCSI_HDR_LEN); |
| 1695 | isert_cmd->sense_buf_dma = ib_dma_map_single(ib_dev, | 1695 | isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev, |
| 1696 | (void *)cmd->buf_ptr, ISCSI_HDR_LEN, | 1696 | (void *)cmd->buf_ptr, ISCSI_HDR_LEN, |
| 1697 | DMA_TO_DEVICE); | 1697 | DMA_TO_DEVICE); |
| 1698 | isert_cmd->sense_buf_len = ISCSI_HDR_LEN; | 1698 | isert_cmd->pdu_buf_len = ISCSI_HDR_LEN; |
| 1699 | tx_dsg->addr = isert_cmd->sense_buf_dma; | 1699 | tx_dsg->addr = isert_cmd->pdu_buf_dma; |
| 1700 | tx_dsg->length = ISCSI_HDR_LEN; | 1700 | tx_dsg->length = ISCSI_HDR_LEN; |
| 1701 | tx_dsg->lkey = isert_conn->conn_mr->lkey; | 1701 | tx_dsg->lkey = isert_conn->conn_mr->lkey; |
| 1702 | isert_cmd->tx_desc.num_sge = 2; | 1702 | isert_cmd->tx_desc.num_sge = 2; |
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index 5795c82a2306..191117b5b508 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h | |||
| @@ -61,8 +61,8 @@ struct isert_cmd { | |||
| 61 | uint32_t write_stag; | 61 | uint32_t write_stag; |
| 62 | uint64_t read_va; | 62 | uint64_t read_va; |
| 63 | uint64_t write_va; | 63 | uint64_t write_va; |
| 64 | u64 sense_buf_dma; | 64 | u64 pdu_buf_dma; |
| 65 | u32 sense_buf_len; | 65 | u32 pdu_buf_len; |
| 66 | u32 read_va_off; | 66 | u32 read_va_off; |
| 67 | u32 write_va_off; | 67 | u32 write_va_off; |
| 68 | u32 rdma_wr_num; | 68 | u32 rdma_wr_num; |
