aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-12 12:27:52 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:49 -0400
commitf34d9e5d3f34f395a497a8747316b04ef3e865b1 (patch)
tree30a779e43cf6323cba5993e6df94acb4f6616faf
parented3efb7784cb0772558e9cc9440bd6c9a3139be4 (diff)
isci: unify rnc start{io|task} handlers
Unify rnc start{io|task} handlers and delete the state handler infrastructure. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/isci/remote_node_context.c306
-rw-r--r--drivers/scsi/isci/remote_node_context.h40
-rw-r--r--drivers/scsi/isci/state_machine.h8
3 files changed, 47 insertions, 307 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c
index 095d61288c3b..82507bd228d4 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -176,15 +176,6 @@ static void scic_sds_remote_node_context_setup_to_resume(
176 } 176 }
177} 177}
178 178
179/**
180 *
181 * @sci_rnc:
182 * @callback:
183 * @callback_parameter:
184 *
185 * This method will setup the remote node context object so it will transistion
186 * to its final state. none
187 */
188static void scic_sds_remote_node_context_setup_to_destory( 179static void scic_sds_remote_node_context_setup_to_destory(
189 struct scic_sds_remote_node_context *sci_rnc, 180 struct scic_sds_remote_node_context *sci_rnc,
190 scics_sds_remote_node_context_callback callback, 181 scics_sds_remote_node_context_callback callback,
@@ -195,146 +186,6 @@ static void scic_sds_remote_node_context_setup_to_destory(
195 sci_rnc->user_cookie = callback_parameter; 186 sci_rnc->user_cookie = callback_parameter;
196} 187}
197 188
198static enum sci_status scic_sds_remote_node_context_default_start_io_handler(
199 struct scic_sds_remote_node_context *sci_rnc,
200 struct scic_sds_request *sci_req)
201{
202 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),
203 "%s: SCIC Remote Node Context 0x%p requested to start io "
204 "0x%p while in wrong state %d\n",
205 __func__,
206 sci_rnc,
207 sci_req,
208 sci_base_state_machine_get_state(&sci_rnc->state_machine));
209
210 return SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED;
211}
212
213static enum sci_status scic_sds_remote_node_context_default_start_task_handler(
214 struct scic_sds_remote_node_context *sci_rnc,
215 struct scic_sds_request *sci_req)
216{
217 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),
218 "%s: SCIC Remote Node Context 0x%p requested to start "
219 "task 0x%p while in wrong state %d\n",
220 __func__,
221 sci_rnc,
222 sci_req,
223 sci_base_state_machine_get_state(&sci_rnc->state_machine));
224
225 return SCI_FAILURE;
226}
227
228/**
229 *
230 * @sci_rnc: The rnc for which the task request is targeted.
231 * @sci_req: The request which is going to be started.
232 *
233 * This method determines if the task request can be started by the SCU
234 * hardware. When the RNC is in the ready state any task can be started.
235 * enum sci_status SCI_SUCCESS
236 */
237static enum sci_status scic_sds_remote_node_context_success_start_task_handler(
238 struct scic_sds_remote_node_context *sci_rnc,
239 struct scic_sds_request *sci_req)
240{
241 return SCI_SUCCESS;
242}
243
244/**
245 *
246 * @sci_rnc: The rnc for which the io request is targeted.
247 * @sci_req: The request which is going to be started.
248 *
249 * This method determines if the io request can be started by the SCU hardware.
250 * When the RNC is in the ready state any io request can be started. enum sci_status
251 * SCI_SUCCESS
252 */
253static enum sci_status scic_sds_remote_node_context_ready_state_start_io_handler(
254 struct scic_sds_remote_node_context *sci_rnc,
255 struct scic_sds_request *sci_req)
256{
257 return SCI_SUCCESS;
258}
259
260/**
261 *
262 * @sci_rnc: The remote node context which is to receive the task request.
263 * @sci_req: The task request to be transmitted to to the remote target
264 * device.
265 *
266 * This method will report a success or failure attempt to start a new task
267 * request to the hardware. Since all task requests are sent on the high
268 * priority queue they can be sent when the RCN is in a TX suspend state.
269 * enum sci_status SCI_SUCCESS
270 */
271static enum sci_status scic_sds_remote_node_context_suspended_start_task_handler(
272 struct scic_sds_remote_node_context *sci_rnc,
273 struct scic_sds_request *sci_req)
274{
275 scic_sds_remote_node_context_resume(sci_rnc, NULL, NULL);
276
277 return SCI_SUCCESS;
278}
279
280/**
281 *
282 * @sci_rnc: The remote node context which is to receive the task request.
283 * @sci_req: The task request to be transmitted to to the remote target
284 * device.
285 *
286 * This method will report a success or failure attempt to start a new task
287 * request to the hardware. Since all task requests are sent on the high
288 * priority queue they can be sent when the RCN is in a TX suspend state.
289 * enum sci_status SCI_SUCCESS
290 */
291static enum sci_status scic_sds_remote_node_context_await_suspension_state_start_task_handler(
292 struct scic_sds_remote_node_context *sci_rnc,
293 struct scic_sds_request *sci_req)
294{
295 return SCI_SUCCESS;
296}
297
298static struct scic_sds_remote_node_context_handlers scic_sds_remote_node_context_state_handler_table[] = {
299 [SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE] = {
300 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
301 .start_task_handler = scic_sds_remote_node_context_default_start_task_handler,
302 },
303 [SCIC_SDS_REMOTE_NODE_CONTEXT_POSTING_STATE] = {
304 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
305 .start_task_handler = scic_sds_remote_node_context_default_start_task_handler,
306 },
307 [SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE] = {
308 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
309 .start_task_handler = scic_sds_remote_node_context_default_start_task_handler,
310 },
311 [SCIC_SDS_REMOTE_NODE_CONTEXT_RESUMING_STATE] = {
312 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
313 .start_task_handler = scic_sds_remote_node_context_success_start_task_handler,
314 },
315 [SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE] = {
316 .start_io_handler = scic_sds_remote_node_context_ready_state_start_io_handler,
317 .start_task_handler = scic_sds_remote_node_context_success_start_task_handler,
318 },
319 [SCIC_SDS_REMOTE_NODE_CONTEXT_TX_SUSPENDED_STATE] = {
320 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
321 .start_task_handler = scic_sds_remote_node_context_suspended_start_task_handler,
322 },
323 [SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE] = {
324 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
325 .start_task_handler = scic_sds_remote_node_context_suspended_start_task_handler,
326 },
327 [SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE] = {
328 .start_io_handler = scic_sds_remote_node_context_default_start_io_handler,
329 .start_task_handler = scic_sds_remote_node_context_await_suspension_state_start_task_handler,
330 }
331};
332
333/*
334 * *****************************************************************************
335 * * REMOTE NODE CONTEXT PRIVATE METHODS
336 * ***************************************************************************** */
337
338/** 189/**
339 * 190 *
340 * 191 *
@@ -415,80 +266,34 @@ static void scic_sds_remote_node_context_invalidate_context_buffer(
415 SCU_CONTEXT_COMMAND_POST_RNC_INVALIDATE); 266 SCU_CONTEXT_COMMAND_POST_RNC_INVALIDATE);
416} 267}
417 268
418/*
419 * *****************************************************************************
420 * * REMOTE NODE CONTEXT STATE ENTER AND EXIT METHODS
421 * ***************************************************************************** */
422
423/**
424 *
425 *
426 *
427 */
428static void scic_sds_remote_node_context_initial_state_enter(void *object) 269static void scic_sds_remote_node_context_initial_state_enter(void *object)
429{ 270{
430 struct scic_sds_remote_node_context *rnc = object; 271 struct scic_sds_remote_node_context *rnc = object;
272 struct sci_base_state_machine *sm = &rnc->state_machine;
431 273
432 SET_STATE_HANDLER( 274 /* Check to see if we have gotten back to the initial state because
433 rnc, 275 * someone requested to destroy the remote node context object.
434 scic_sds_remote_node_context_state_handler_table, 276 */
435 SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE 277 if (sm->previous_state_id == SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE) {
436 );
437
438 /*
439 * Check to see if we have gotten back to the initial state because someone
440 * requested to destroy the remote node context object. */
441 if (
442 rnc->state_machine.previous_state_id
443 == SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE
444 ) {
445 rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_UNSPECIFIED; 278 rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_UNSPECIFIED;
446
447 scic_sds_remote_node_context_notify_user(rnc); 279 scic_sds_remote_node_context_notify_user(rnc);
448 } 280 }
449} 281}
450 282
451/**
452 *
453 *
454 *
455 */
456static void scic_sds_remote_node_context_posting_state_enter(void *object) 283static void scic_sds_remote_node_context_posting_state_enter(void *object)
457{ 284{
458 struct scic_sds_remote_node_context *sci_rnc = object; 285 struct scic_sds_remote_node_context *sci_rnc = object;
459 286
460 SET_STATE_HANDLER(
461 sci_rnc,
462 scic_sds_remote_node_context_state_handler_table,
463 SCIC_SDS_REMOTE_NODE_CONTEXT_POSTING_STATE
464 );
465
466 scic_sds_remote_node_context_validate_context_buffer(sci_rnc); 287 scic_sds_remote_node_context_validate_context_buffer(sci_rnc);
467} 288}
468 289
469/**
470 *
471 *
472 *
473 */
474static void scic_sds_remote_node_context_invalidating_state_enter(void *object) 290static void scic_sds_remote_node_context_invalidating_state_enter(void *object)
475{ 291{
476 struct scic_sds_remote_node_context *rnc = object; 292 struct scic_sds_remote_node_context *rnc = object;
477 293
478 SET_STATE_HANDLER(
479 rnc,
480 scic_sds_remote_node_context_state_handler_table,
481 SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE
482 );
483
484 scic_sds_remote_node_context_invalidate_context_buffer(rnc); 294 scic_sds_remote_node_context_invalidate_context_buffer(rnc);
485} 295}
486 296
487/**
488 *
489 *
490 *
491 */
492static void scic_sds_remote_node_context_resuming_state_enter(void *object) 297static void scic_sds_remote_node_context_resuming_state_enter(void *object)
493{ 298{
494 struct scic_sds_remote_node_context *rnc = object; 299 struct scic_sds_remote_node_context *rnc = object;
@@ -498,12 +303,6 @@ static void scic_sds_remote_node_context_resuming_state_enter(void *object)
498 sci_dev = rnc_to_dev(rnc); 303 sci_dev = rnc_to_dev(rnc);
499 dev = sci_dev_to_domain(sci_dev); 304 dev = sci_dev_to_domain(sci_dev);
500 305
501 SET_STATE_HANDLER(
502 rnc,
503 scic_sds_remote_node_context_state_handler_table,
504 SCIC_SDS_REMOTE_NODE_CONTEXT_RESUMING_STATE
505 );
506
507 /* 306 /*
508 * For direct attached SATA devices we need to clear the TLCR 307 * For direct attached SATA devices we need to clear the TLCR
509 * NCQ to TCi tag mapping on the phy and in cases where we 308 * NCQ to TCi tag mapping on the phy and in cases where we
@@ -518,84 +317,31 @@ static void scic_sds_remote_node_context_resuming_state_enter(void *object)
518 scic_sds_remote_device_post_request(sci_dev, SCU_CONTEXT_COMMAND_POST_RNC_RESUME); 317 scic_sds_remote_device_post_request(sci_dev, SCU_CONTEXT_COMMAND_POST_RNC_RESUME);
519} 318}
520 319
521/**
522 *
523 *
524 *
525 */
526static void scic_sds_remote_node_context_ready_state_enter(void *object) 320static void scic_sds_remote_node_context_ready_state_enter(void *object)
527{ 321{
528 struct scic_sds_remote_node_context *rnc = object; 322 struct scic_sds_remote_node_context *rnc = object;
529 323
530 SET_STATE_HANDLER(
531 rnc,
532 scic_sds_remote_node_context_state_handler_table,
533 SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE
534 );
535
536 rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_UNSPECIFIED; 324 rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_UNSPECIFIED;
537 325
538 if (rnc->user_callback != NULL) { 326 if (rnc->user_callback)
539 scic_sds_remote_node_context_notify_user(rnc); 327 scic_sds_remote_node_context_notify_user(rnc);
540 }
541} 328}
542 329
543/**
544 *
545 *
546 *
547 */
548static void scic_sds_remote_node_context_tx_suspended_state_enter(void *object) 330static void scic_sds_remote_node_context_tx_suspended_state_enter(void *object)
549{ 331{
550 struct scic_sds_remote_node_context *rnc = object; 332 struct scic_sds_remote_node_context *rnc = object;
551 333
552 SET_STATE_HANDLER(
553 rnc,
554 scic_sds_remote_node_context_state_handler_table,
555 SCIC_SDS_REMOTE_NODE_CONTEXT_TX_SUSPENDED_STATE
556 );
557
558 scic_sds_remote_node_context_continue_state_transitions(rnc); 334 scic_sds_remote_node_context_continue_state_transitions(rnc);
559} 335}
560 336
561/**
562 *
563 *
564 *
565 */
566static void scic_sds_remote_node_context_tx_rx_suspended_state_enter( 337static void scic_sds_remote_node_context_tx_rx_suspended_state_enter(
567 void *object) 338 void *object)
568{ 339{
569 struct scic_sds_remote_node_context *rnc = object; 340 struct scic_sds_remote_node_context *rnc = object;
570 341
571 SET_STATE_HANDLER(
572 rnc,
573 scic_sds_remote_node_context_state_handler_table,
574 SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE
575 );
576
577 scic_sds_remote_node_context_continue_state_transitions(rnc); 342 scic_sds_remote_node_context_continue_state_transitions(rnc);
578} 343}
579 344
580/**
581 *
582 *
583 *
584 */
585static void scic_sds_remote_node_context_await_suspension_state_enter(
586 void *object)
587{
588 struct scic_sds_remote_node_context *rnc = object;
589
590 SET_STATE_HANDLER(
591 rnc,
592 scic_sds_remote_node_context_state_handler_table,
593 SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE
594 );
595}
596
597/* --------------------------------------------------------------------------- */
598
599static const struct sci_base_state scic_sds_remote_node_context_state_table[] = { 345static const struct sci_base_state scic_sds_remote_node_context_state_table[] = {
600 [SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE] = { 346 [SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE] = {
601 .enter_state = scic_sds_remote_node_context_initial_state_enter, 347 .enter_state = scic_sds_remote_node_context_initial_state_enter,
@@ -618,9 +364,7 @@ static const struct sci_base_state scic_sds_remote_node_context_state_table[] =
618 [SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE] = { 364 [SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE] = {
619 .enter_state = scic_sds_remote_node_context_tx_rx_suspended_state_enter, 365 .enter_state = scic_sds_remote_node_context_tx_rx_suspended_state_enter,
620 }, 366 },
621 [SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE] = { 367 [SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE] = { },
622 .enter_state = scic_sds_remote_node_context_await_suspension_state_enter,
623 },
624}; 368};
625 369
626void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc, 370void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc,
@@ -875,3 +619,39 @@ enum sci_status scic_sds_remote_node_context_resume(struct scic_sds_remote_node_
875 return SCI_FAILURE_INVALID_STATE; 619 return SCI_FAILURE_INVALID_STATE;
876 } 620 }
877} 621}
622
623enum sci_status scic_sds_remote_node_context_start_io(struct scic_sds_remote_node_context *sci_rnc,
624 struct scic_sds_request *sci_req)
625{
626 enum scis_sds_remote_node_context_states state;
627
628 state = sci_rnc->state_machine.current_state_id;
629 if (state != SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE) {
630 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),
631 "%s: invalid state %d\n", __func__, state);
632 return SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED;
633 }
634 return SCI_SUCCESS;
635}
636
637enum sci_status scic_sds_remote_node_context_start_task(struct scic_sds_remote_node_context *sci_rnc,
638 struct scic_sds_request *sci_req)
639{
640 enum scis_sds_remote_node_context_states state;
641
642 state = sci_rnc->state_machine.current_state_id;
643 switch (state) {
644 case SCIC_SDS_REMOTE_NODE_CONTEXT_RESUMING_STATE:
645 case SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE:
646 case SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE:
647 return SCI_SUCCESS;
648 case SCIC_SDS_REMOTE_NODE_CONTEXT_TX_SUSPENDED_STATE:
649 case SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE:
650 scic_sds_remote_node_context_resume(sci_rnc, NULL, NULL);
651 return SCI_SUCCESS;
652 default:
653 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),
654 "%s: invalid state %d\n", __func__, state);
655 return SCI_FAILURE_INVALID_STATE;
656 }
657}
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h
index 68983748eba9..f53329f782c8 100644
--- a/drivers/scsi/isci/remote_node_context.h
+++ b/drivers/scsi/isci/remote_node_context.h
@@ -84,31 +84,6 @@ struct scic_sds_remote_node_context;
84 84
85typedef void (*scics_sds_remote_node_context_callback)(void *); 85typedef void (*scics_sds_remote_node_context_callback)(void *);
86 86
87typedef enum sci_status (*scic_sds_remote_node_context_operation)(
88 struct scic_sds_remote_node_context *sci_rnc,
89 scics_sds_remote_node_context_callback callback,
90 void *callback_parameter
91 );
92
93typedef enum sci_status (*scic_sds_remote_node_context_io_request)(
94 struct scic_sds_remote_node_context *sci_rnc,
95 struct scic_sds_request *sci_req
96 );
97
98struct scic_sds_remote_node_context_handlers {
99 /**
100 * This handler is invoked when there is a request to start an io request
101 * operation.
102 */
103 scic_sds_remote_node_context_io_request start_io_handler;
104
105 /**
106 * This handler is invoked when there is a request to start a task request
107 * operation.
108 */
109 scic_sds_remote_node_context_io_request start_task_handler;
110};
111
112/** 87/**
113 * This is the enumeration of the remote node context states. 88 * This is the enumeration of the remote node context states.
114 */ 89 */
@@ -220,8 +195,6 @@ struct scic_sds_remote_node_context {
220 * This field contains the data for the object's state machine. 195 * This field contains the data for the object's state machine.
221 */ 196 */
222 struct sci_base_state_machine state_machine; 197 struct sci_base_state_machine state_machine;
223
224 struct scic_sds_remote_node_context_handlers *state_handlers;
225}; 198};
226 199
227void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc, 200void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc,
@@ -236,24 +209,19 @@ bool scic_sds_remote_node_context_is_ready(
236 209
237enum sci_status scic_sds_remote_node_context_event_handler(struct scic_sds_remote_node_context *sci_rnc, 210enum sci_status scic_sds_remote_node_context_event_handler(struct scic_sds_remote_node_context *sci_rnc,
238 u32 event_code); 211 u32 event_code);
239
240enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc, 212enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc,
241 scics_sds_remote_node_context_callback callback, 213 scics_sds_remote_node_context_callback callback,
242 void *callback_parameter); 214 void *callback_parameter);
243
244enum sci_status scic_sds_remote_node_context_suspend(struct scic_sds_remote_node_context *sci_rnc, 215enum sci_status scic_sds_remote_node_context_suspend(struct scic_sds_remote_node_context *sci_rnc,
245 u32 suspend_type, 216 u32 suspend_type,
246 scics_sds_remote_node_context_callback cb_fn, 217 scics_sds_remote_node_context_callback cb_fn,
247 void *cb_p); 218 void *cb_p);
248
249enum sci_status scic_sds_remote_node_context_resume(struct scic_sds_remote_node_context *sci_rnc, 219enum sci_status scic_sds_remote_node_context_resume(struct scic_sds_remote_node_context *sci_rnc,
250 scics_sds_remote_node_context_callback cb_fn, 220 scics_sds_remote_node_context_callback cb_fn,
251 void *cb_p); 221 void *cb_p);
252 222enum sci_status scic_sds_remote_node_context_start_task(struct scic_sds_remote_node_context *sci_rnc,
253#define scic_sds_remote_node_context_start_io(rnc, request) \ 223 struct scic_sds_request *sci_req);
254 ((rnc)->state_handlers->start_io_handler(rnc, request)) 224enum sci_status scic_sds_remote_node_context_start_io(struct scic_sds_remote_node_context *sci_rnc,
255 225 struct scic_sds_request *sci_req);
256#define scic_sds_remote_node_context_start_task(rnc, task) \
257 ((rnc)->state_handlers->start_task_handler(rnc, task))
258 226
259#endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */ 227#endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */
diff --git a/drivers/scsi/isci/state_machine.h b/drivers/scsi/isci/state_machine.h
index c29eb4271d05..60ef1cf5abf4 100644
--- a/drivers/scsi/isci/state_machine.h
+++ b/drivers/scsi/isci/state_machine.h
@@ -84,14 +84,6 @@ struct sci_base_state {
84}; 84};
85 85
86/** 86/**
87 * SET_STATE_HANDLER() -
88 *
89 * This macro simply provides simplified retrieval of an objects state handler.
90 */
91#define SET_STATE_HANDLER(object, table, state) \
92 (object)->state_handlers = &(table)[(state)]
93
94/**
95 * struct sci_base_state_machine - This structure defines the fields common to 87 * struct sci_base_state_machine - This structure defines the fields common to
96 * all state machines. 88 * all state machines.
97 * 89 *