diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-06-09 14:06:58 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:51 -0400 |
commit | dd047c8e2bca22856050dbe0378a37cf44eecc97 (patch) | |
tree | 5dab5c46acd144024f8cc961a34ae8374343a5d9 /drivers/scsi/isci/request.c | |
parent | ac668c69709c7d927015c5cf3d9e87bf4eaaf57d (diff) |
isci: cleanup tag macros
A tag is a 16 bit number where the upper four bits is a sequence number
and the remainder is the task context index (tci). Sanitize the macro
names and shave 256-bytes out of scic_sds_controller by reducing the size of
io_request_sequence.
scic_sds_io_tag_construct --> ISCI_TAG
scic_sds_io_tag_get_sequence --> ISCI_TAG_SEQ
scic_sds_io_tag_get_index() --> ISCI_TAG_TCI
scic_sds_io_sequence_increment() [delete / open code]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r-- | drivers/scsi/isci/request.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 433565c2b343..9d7531ad9a74 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -258,7 +258,7 @@ static void scu_ssp_reqeust_construct_task_context( | |||
258 | SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) | | 258 | SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) | |
259 | (scic_sds_port_get_index(target_port) << | 259 | (scic_sds_port_get_index(target_port) << |
260 | SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) | | 260 | SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) | |
261 | scic_sds_io_tag_get_index(sds_request->io_tag)); | 261 | ISCI_TAG_TCI(sds_request->io_tag)); |
262 | } else { | 262 | } else { |
263 | /* | 263 | /* |
264 | * Build the task context now since we have already read | 264 | * Build the task context now since we have already read |
@@ -433,7 +433,7 @@ static void scu_sata_reqeust_construct_task_context( | |||
433 | SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) | | 433 | SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) | |
434 | (scic_sds_port_get_index(target_port) << | 434 | (scic_sds_port_get_index(target_port) << |
435 | SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) | | 435 | SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) | |
436 | scic_sds_io_tag_get_index(sci_req->io_tag)); | 436 | ISCI_TAG_TCI(sci_req->io_tag)); |
437 | } else { | 437 | } else { |
438 | /* | 438 | /* |
439 | * Build the task context now since we have already read | 439 | * Build the task context now since we have already read |
@@ -741,7 +741,7 @@ static u32 sci_req_tx_bytes(struct scic_sds_request *sci_req) | |||
741 | */ | 741 | */ |
742 | ret_val = readl(scu_reg_base + | 742 | ret_val = readl(scu_reg_base + |
743 | (SCU_TASK_CONTEXT_SRAM + offsetof(struct scu_task_context, type.ssp.data_offset)) + | 743 | (SCU_TASK_CONTEXT_SRAM + offsetof(struct scu_task_context, type.ssp.data_offset)) + |
744 | ((sizeof(struct scu_task_context)) * scic_sds_io_tag_get_index(sci_req->io_tag))); | 744 | ((sizeof(struct scu_task_context)) * ISCI_TAG_TCI(sci_req->io_tag))); |
745 | } | 745 | } |
746 | 746 | ||
747 | return ret_val; | 747 | return ret_val; |
@@ -777,7 +777,7 @@ enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req) | |||
777 | if (sci_req->io_tag != SCI_CONTROLLER_INVALID_IO_TAG) { | 777 | if (sci_req->io_tag != SCI_CONTROLLER_INVALID_IO_TAG) { |
778 | task_context = sci_req->task_context_buffer; | 778 | task_context = sci_req->task_context_buffer; |
779 | 779 | ||
780 | task_context->task_index = scic_sds_io_tag_get_index(sci_req->io_tag); | 780 | task_context->task_index = ISCI_TAG_TCI(sci_req->io_tag); |
781 | 781 | ||
782 | switch (task_context->protocol_type) { | 782 | switch (task_context->protocol_type) { |
783 | case SCU_TASK_CONTEXT_PROTOCOL_SMP: | 783 | case SCU_TASK_CONTEXT_PROTOCOL_SMP: |
@@ -811,7 +811,7 @@ enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req) | |||
811 | scic_sds_controller_copy_task_context(scic, sci_req); | 811 | scic_sds_controller_copy_task_context(scic, sci_req); |
812 | 812 | ||
813 | /* Add to the post_context the io tag value */ | 813 | /* Add to the post_context the io tag value */ |
814 | sci_req->post_context |= scic_sds_io_tag_get_index(sci_req->io_tag); | 814 | sci_req->post_context |= ISCI_TAG_TCI(sci_req->io_tag); |
815 | 815 | ||
816 | /* Everything is good go ahead and change state */ | 816 | /* Everything is good go ahead and change state */ |
817 | sci_change_state(&sci_req->sm, SCI_REQ_STARTED); | 817 | sci_change_state(&sci_req->sm, SCI_REQ_STARTED); |
@@ -3325,7 +3325,7 @@ scu_smp_request_construct_task_context(struct scic_sds_request *sci_req, | |||
3325 | SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) | | 3325 | SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) | |
3326 | (scic_sds_port_get_index(sci_port) << | 3326 | (scic_sds_port_get_index(sci_port) << |
3327 | SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) | | 3327 | SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) | |
3328 | scic_sds_io_tag_get_index(sci_req->io_tag)); | 3328 | ISCI_TAG_TCI(sci_req->io_tag)); |
3329 | } else { | 3329 | } else { |
3330 | /* | 3330 | /* |
3331 | * Build the task context now since we have already read | 3331 | * Build the task context now since we have already read |