diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-04-29 16:20:30 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:00:39 -0400 |
commit | 8f304c36ee415600c6bbc5de300e6fa3dbe59d6d (patch) | |
tree | cddff716ad1db48981b7779a8a4cc35ab1b5ab91 /drivers | |
parent | ab2e8f7d07f577ee39228fb3454b9f29eab0f312 (diff) |
isci: kill scic_remote_device_get_connection_rate
A function call to dereference a pointer is a tad much.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_request.c | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_smp_request.c | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_stp_request.c | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 13 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.h | 13 |
5 files changed, 3 insertions, 32 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c index fba642881092..ffc16072d1da 100644 --- a/drivers/scsi/isci/core/scic_sds_request.c +++ b/drivers/scsi/isci/core/scic_sds_request.c | |||
@@ -443,8 +443,7 @@ static void scu_ssp_reqeust_construct_task_context( | |||
443 | task_context->abort = 0; | 443 | task_context->abort = 0; |
444 | task_context->priority = 0; | 444 | task_context->priority = 0; |
445 | task_context->initiator_request = 1; | 445 | task_context->initiator_request = 1; |
446 | task_context->connection_rate = | 446 | task_context->connection_rate = target_device->connection_rate; |
447 | scic_remote_device_get_connection_rate(target_device); | ||
448 | task_context->protocol_engine_index = | 447 | task_context->protocol_engine_index = |
449 | scic_sds_controller_get_protocol_engine_group(controller); | 448 | scic_sds_controller_get_protocol_engine_group(controller); |
450 | task_context->logical_port_index = | 449 | task_context->logical_port_index = |
diff --git a/drivers/scsi/isci/core/scic_sds_smp_request.c b/drivers/scsi/isci/core/scic_sds_smp_request.c index fff86687c8bf..2815da288750 100644 --- a/drivers/scsi/isci/core/scic_sds_smp_request.c +++ b/drivers/scsi/isci/core/scic_sds_smp_request.c | |||
@@ -193,8 +193,7 @@ static void scu_smp_request_construct_task_context( | |||
193 | */ | 193 | */ |
194 | task_context->priority = 0; | 194 | task_context->priority = 0; |
195 | task_context->initiator_request = 1; | 195 | task_context->initiator_request = 1; |
196 | task_context->connection_rate = | 196 | task_context->connection_rate = sci_dev->connection_rate; |
197 | scic_remote_device_get_connection_rate(sci_dev); | ||
198 | task_context->protocol_engine_index = | 197 | task_context->protocol_engine_index = |
199 | scic_sds_controller_get_protocol_engine_group(controller); | 198 | scic_sds_controller_get_protocol_engine_group(controller); |
200 | task_context->logical_port_index = | 199 | task_context->logical_port_index = |
diff --git a/drivers/scsi/isci/core/scic_sds_stp_request.c b/drivers/scsi/isci/core/scic_sds_stp_request.c index ec215463092a..8c980235ea41 100644 --- a/drivers/scsi/isci/core/scic_sds_stp_request.c +++ b/drivers/scsi/isci/core/scic_sds_stp_request.c | |||
@@ -181,8 +181,7 @@ static void scu_sata_reqeust_construct_task_context( | |||
181 | task_context->abort = 0; | 181 | task_context->abort = 0; |
182 | task_context->priority = SCU_TASK_PRIORITY_NORMAL; | 182 | task_context->priority = SCU_TASK_PRIORITY_NORMAL; |
183 | task_context->initiator_request = 1; | 183 | task_context->initiator_request = 1; |
184 | task_context->connection_rate = | 184 | task_context->connection_rate = target_device->connection_rate; |
185 | scic_remote_device_get_connection_rate(target_device); | ||
186 | task_context->protocol_engine_index = | 185 | task_context->protocol_engine_index = |
187 | scic_sds_controller_get_protocol_engine_group(controller); | 186 | scic_sds_controller_get_protocol_engine_group(controller); |
188 | task_context->logical_port_index = | 187 | task_context->logical_port_index = |
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index f6da85e3f2af..834a3feaca63 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c | |||
@@ -152,22 +152,9 @@ enum sci_status scic_remote_device_reset_complete( | |||
152 | return sci_dev->state_handlers->reset_complete_handler(sci_dev); | 152 | return sci_dev->state_handlers->reset_complete_handler(sci_dev); |
153 | } | 153 | } |
154 | 154 | ||
155 | |||
156 | enum sas_linkrate scic_remote_device_get_connection_rate( | ||
157 | struct scic_sds_remote_device *sci_dev) | ||
158 | { | ||
159 | return sci_dev->connection_rate; | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * | ||
164 | * | ||
165 | * Remote device timer requirements | ||
166 | */ | ||
167 | #define SCIC_SDS_REMOTE_DEVICE_MINIMUM_TIMER_COUNT (0) | 155 | #define SCIC_SDS_REMOTE_DEVICE_MINIMUM_TIMER_COUNT (0) |
168 | #define SCIC_SDS_REMOTE_DEVICE_MAXIMUM_TIMER_COUNT (SCI_MAX_REMOTE_DEVICES) | 156 | #define SCIC_SDS_REMOTE_DEVICE_MAXIMUM_TIMER_COUNT (SCI_MAX_REMOTE_DEVICES) |
169 | 157 | ||
170 | |||
171 | /** | 158 | /** |
172 | * | 159 | * |
173 | * @sci_dev: The remote device for which the suspend is being requested. | 160 | * @sci_dev: The remote device for which the suspend is being requested. |
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h index dda217a6bd3a..fd24df31abd2 100644 --- a/drivers/scsi/isci/remote_device.h +++ b/drivers/scsi/isci/remote_device.h | |||
@@ -208,19 +208,6 @@ enum sci_status scic_remote_device_reset( | |||
208 | enum sci_status scic_remote_device_reset_complete( | 208 | enum sci_status scic_remote_device_reset_complete( |
209 | struct scic_sds_remote_device *remote_device); | 209 | struct scic_sds_remote_device *remote_device); |
210 | 210 | ||
211 | |||
212 | |||
213 | /** | ||
214 | * scic_remote_device_get_connection_rate() - This method simply returns the | ||
215 | * link rate at which communications to the remote device occur. | ||
216 | * @remote_device: This parameter specifies the device for which to get the | ||
217 | * connection rate. | ||
218 | * | ||
219 | * Return the link rate at which we transfer for the supplied remote device. | ||
220 | */ | ||
221 | enum sas_linkrate scic_remote_device_get_connection_rate( | ||
222 | struct scic_sds_remote_device *remote_device); | ||
223 | |||
224 | #define scic_remote_device_is_atapi(device_handle) false | 211 | #define scic_remote_device_is_atapi(device_handle) false |
225 | 212 | ||
226 | /** | 213 | /** |