iser-target: Rename sense_buf_[dma,len] to pdu_[dma,len]
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 4 Jul 2013 02:39:37 +0000 (19:39 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 8 Jul 2013 01:36:47 +0000 (18:36 -0700)
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>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h

index 66712bd7dc118cbafe8fe48d1b4ab2f5016d4c0f..fa425180357792b6fa3ac7c3afda3e17a68f1b5f 100644 (file)
@@ -1286,11 +1286,11 @@ static void
 isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd,
                     struct ib_device *ib_dev)
 {
-       if (isert_cmd->sense_buf_dma != 0) {
-               pr_debug("Calling ib_dma_unmap_single for isert_cmd->sense_buf_dma\n");
-               ib_dma_unmap_single(ib_dev, isert_cmd->sense_buf_dma,
-                                   isert_cmd->sense_buf_len, DMA_TO_DEVICE);
-               isert_cmd->sense_buf_dma = 0;
+       if (isert_cmd->pdu_buf_dma != 0) {
+               pr_debug("Calling ib_dma_unmap_single for isert_cmd->pdu_buf_dma\n");
+               ib_dma_unmap_single(ib_dev, isert_cmd->pdu_buf_dma,
+                                   isert_cmd->pdu_buf_len, DMA_TO_DEVICE);
+               isert_cmd->pdu_buf_dma = 0;
        }
 
        isert_unmap_tx_desc(tx_desc, ib_dev);
@@ -1588,7 +1588,7 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
            (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) {
                struct ib_device *ib_dev = isert_conn->conn_cm_id->device;
                struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1];
-               u32 padding, sense_len;
+               u32 padding, pdu_len;
 
                put_unaligned_be16(cmd->se_cmd.scsi_sense_length,
                                   cmd->sense_buffer);
@@ -1596,15 +1596,15 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
 
                padding = -(cmd->se_cmd.scsi_sense_length) & 3;
                hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length);
-               sense_len = cmd->se_cmd.scsi_sense_length + padding;
+               pdu_len = cmd->se_cmd.scsi_sense_length + padding;
 
-               isert_cmd->sense_buf_dma = ib_dma_map_single(ib_dev,
-                               (void *)cmd->sense_buffer, sense_len,
+               isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev,
+                               (void *)cmd->sense_buffer, pdu_len,
                                DMA_TO_DEVICE);
 
-               isert_cmd->sense_buf_len = sense_len;
-               tx_dsg->addr    = isert_cmd->sense_buf_dma;
-               tx_dsg->length  = sense_len;
+               isert_cmd->pdu_buf_len = pdu_len;
+               tx_dsg->addr    = isert_cmd->pdu_buf_dma;
+               tx_dsg->length  = pdu_len;
                tx_dsg->lkey    = isert_conn->conn_mr->lkey;
                isert_cmd->tx_desc.num_sge = 2;
        }
@@ -1692,11 +1692,11 @@ isert_put_reject(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
        isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc);
 
        hton24(hdr->dlength, ISCSI_HDR_LEN);
-       isert_cmd->sense_buf_dma = ib_dma_map_single(ib_dev,
+       isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev,
                        (void *)cmd->buf_ptr, ISCSI_HDR_LEN,
                        DMA_TO_DEVICE);
-       isert_cmd->sense_buf_len = ISCSI_HDR_LEN;
-       tx_dsg->addr    = isert_cmd->sense_buf_dma;
+       isert_cmd->pdu_buf_len = ISCSI_HDR_LEN;
+       tx_dsg->addr    = isert_cmd->pdu_buf_dma;
        tx_dsg->length  = ISCSI_HDR_LEN;
        tx_dsg->lkey    = isert_conn->conn_mr->lkey;
        isert_cmd->tx_desc.num_sge = 2;
index 5795c82a23061c35c54395e231889c57eccbae91..191117b5b508771bf7a4fb42d9423bb26f72319a 100644 (file)
@@ -61,8 +61,8 @@ struct isert_cmd {
        uint32_t                write_stag;
        uint64_t                read_va;
        uint64_t                write_va;
-       u64                     sense_buf_dma;
-       u32                     sense_buf_len;
+       u64                     pdu_buf_dma;
+       u32                     pdu_buf_len;
        u32                     read_va_off;
        u32                     write_va_off;
        u32                     rdma_wr_num;