From dd047c8e2bca22856050dbe0378a37cf44eecc97 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 9 Jun 2011 11:06:58 -0700 Subject: 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 --- drivers/scsi/isci/port.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'drivers/scsi/isci/port.c') diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index e540281..fb66e30da 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 rnc->ssp.arbitration_wait_time = 0; } -/** - * scic_sds_port_construct_dummy_task() - create dummy task for si workaround - * @sci_port The logical port on which we need to create the - * remote node context. - * context. - * @tci The remote node index for this remote node context. - * - * This routine will construct a dummy task context data structure. This +/* + * construct a dummy task context data structure. This * structure will be posted to the hardwre to work around a scheduler error * in the hardware. - * */ -static void scic_sds_port_construct_dummy_task(struct scic_sds_port *sci_port, u16 tci) +static void scic_sds_port_construct_dummy_task(struct scic_sds_port *sci_port, u16 tag) { struct scu_task_context *task_context; - task_context = scic_sds_controller_get_task_context_buffer(sci_port->owning_controller, tci); + task_context = scic_sds_controller_get_task_context_buffer(sci_port->owning_controller, tag); memset(task_context, 0, sizeof(struct scu_task_context)); @@ -716,7 +709,7 @@ static void scic_sds_port_construct_dummy_task(struct scic_sds_port *sci_port, u task_context->protocol_engine_index = 0; task_context->logical_port_index = sci_port->physical_port_index; task_context->protocol_type = SCU_TASK_CONTEXT_PROTOCOL_SSP; - task_context->task_index = scic_sds_io_tag_get_index(tci); + task_context->task_index = ISCI_TAG_TCI(tag); task_context->valid = SCU_TASK_CONTEXT_VALID; task_context->context_type = SCU_TASK_CONTEXT_TYPE; -- cgit v1.1