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/port.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/port.c')
-rw-r--r-- | drivers/scsi/isci/port.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index e540281ebd49..fb66e30da075 100644 --- a/drivers/scsi/isci/port.c +++ b/drivers/scsi/isci/port.c | |||
@@ -689,23 +689,16 @@ static void scic_sds_port_construct_dummy_rnc(struct scic_sds_port *sci_port, u1 | |||
689 | rnc->ssp.arbitration_wait_time = 0; | 689 | rnc->ssp.arbitration_wait_time = 0; |
690 | } | 690 | } |
691 | 691 | ||
692 | /** | 692 | /* |
693 | * scic_sds_port_construct_dummy_task() - create dummy task for si workaround | 693 | * construct a dummy task context data structure. This |
694 | * @sci_port The logical port on which we need to create the | ||
695 | * remote node context. | ||
696 | * context. | ||
697 | * @tci The remote node index for this remote node context. | ||
698 | * | ||
699 | * This routine will construct a dummy task context data structure. This | ||
700 | * structure will be posted to the hardwre to work around a scheduler error | 694 | * structure will be posted to the hardwre to work around a scheduler error |
701 | * in the hardware. | 695 | * in the hardware. |
702 | * | ||
703 | */ | 696 | */ |
704 | static void scic_sds_port_construct_dummy_task(struct scic_sds_port *sci_port, u16 tci) | 697 | static void scic_sds_port_construct_dummy_task(struct scic_sds_port *sci_port, u16 tag) |
705 | { | 698 | { |
706 | struct scu_task_context *task_context; | 699 | struct scu_task_context *task_context; |
707 | 700 | ||
708 | task_context = scic_sds_controller_get_task_context_buffer(sci_port->owning_controller, tci); | 701 | task_context = scic_sds_controller_get_task_context_buffer(sci_port->owning_controller, tag); |
709 | 702 | ||
710 | memset(task_context, 0, sizeof(struct scu_task_context)); | 703 | memset(task_context, 0, sizeof(struct scu_task_context)); |
711 | 704 | ||
@@ -716,7 +709,7 @@ static void scic_sds_port_construct_dummy_task(struct scic_sds_port *sci_port, u | |||
716 | task_context->protocol_engine_index = 0; | 709 | task_context->protocol_engine_index = 0; |
717 | task_context->logical_port_index = sci_port->physical_port_index; | 710 | task_context->logical_port_index = sci_port->physical_port_index; |
718 | task_context->protocol_type = SCU_TASK_CONTEXT_PROTOCOL_SSP; | 711 | task_context->protocol_type = SCU_TASK_CONTEXT_PROTOCOL_SSP; |
719 | task_context->task_index = scic_sds_io_tag_get_index(tci); | 712 | task_context->task_index = ISCI_TAG_TCI(tag); |
720 | task_context->valid = SCU_TASK_CONTEXT_VALID; | 713 | task_context->valid = SCU_TASK_CONTEXT_VALID; |
721 | task_context->context_type = SCU_TASK_CONTEXT_TYPE; | 714 | task_context->context_type = SCU_TASK_CONTEXT_TYPE; |
722 | 715 | ||