summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/port.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-09 20:06:58 +0200
committerDan Williams <dan.j.williams@intel.com>2011-07-03 13:04:51 +0200
commitdd047c8e2bca22856050dbe0378a37cf44eecc97 (patch)
tree5dab5c46acd144024f8cc961a34ae8374343a5d9 /drivers/scsi/isci/port.c
parentisci: cleanup/optimize pool implementation (diff)
downloadlinux-dd047c8e2bca22856050dbe0378a37cf44eecc97.tar.xz
linux-dd047c8e2bca22856050dbe0378a37cf44eecc97.zip
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.c17
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
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;