diff options
author | Jacek Danecki <Jacek.Danecki@intel.com> | 2011-05-03 00:21:07 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:47 -0400 |
commit | a98a7426bc91700ac8613701daf8470efe2ad2d2 (patch) | |
tree | 9392fe150740a22b97b01d91224adb8121b5fb6d /drivers | |
parent | b9988b8e7fcd80404c60462dc223df8c1f31550d (diff) |
isci: rnc state machine table c99 conversion
This makes the subsequent patches to delete rnc->state_handler more
clear.
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/isci/remote_node_context.c | 124 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_node_context.h | 5 |
2 files changed, 58 insertions, 71 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index 49d2dc5374f4..5e85a18a06de 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c | |||
@@ -788,80 +788,70 @@ static enum sci_status scic_sds_remote_node_context_await_suspension_state_event | |||
788 | /* --------------------------------------------------------------------------- */ | 788 | /* --------------------------------------------------------------------------- */ |
789 | 789 | ||
790 | static struct scic_sds_remote_node_context_handlers | 790 | static struct scic_sds_remote_node_context_handlers |
791 | scic_sds_remote_node_context_state_handler_table[ | 791 | scic_sds_remote_node_context_state_handler_table[] = { |
792 | SCIC_SDS_REMOTE_NODE_CONTEXT_MAX_STATES] = | 792 | [SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE] = { |
793 | { | 793 | .destruct_handler = scic_sds_remote_node_context_default_destruct_handler, |
794 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE */ | 794 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
795 | { | 795 | .resume_handler = scic_sds_remote_node_context_initial_state_resume_handler, |
796 | scic_sds_remote_node_context_default_destruct_handler, | 796 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
797 | scic_sds_remote_node_context_default_suspend_handler, | 797 | .start_task_handler = scic_sds_remote_node_context_default_start_task_handler, |
798 | scic_sds_remote_node_context_initial_state_resume_handler, | 798 | .event_handler = scic_sds_remote_node_context_default_event_handler |
799 | scic_sds_remote_node_context_default_start_io_handler, | ||
800 | scic_sds_remote_node_context_default_start_task_handler, | ||
801 | scic_sds_remote_node_context_default_event_handler | ||
802 | }, | 799 | }, |
803 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_POSTING_STATE */ | 800 | [SCIC_SDS_REMOTE_NODE_CONTEXT_POSTING_STATE] = { |
804 | { | 801 | .destruct_handler = scic_sds_remote_node_context_general_destruct_handler, |
805 | scic_sds_remote_node_context_general_destruct_handler, | 802 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
806 | scic_sds_remote_node_context_default_suspend_handler, | 803 | .resume_handler = scic_sds_remote_node_context_continue_to_resume_handler, |
807 | scic_sds_remote_node_context_continue_to_resume_handler, | 804 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
808 | scic_sds_remote_node_context_default_start_io_handler, | 805 | .start_task_handler = scic_sds_remote_node_context_default_start_task_handler, |
809 | scic_sds_remote_node_context_default_start_task_handler, | 806 | .event_handler = scic_sds_remote_node_context_posting_state_event_handler |
810 | scic_sds_remote_node_context_posting_state_event_handler | ||
811 | }, | 807 | }, |
812 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE */ | 808 | [SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE] = { |
813 | { | 809 | .destruct_handler = scic_sds_remote_node_context_invalidating_state_destruct_handler, |
814 | scic_sds_remote_node_context_invalidating_state_destruct_handler, | 810 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
815 | scic_sds_remote_node_context_default_suspend_handler, | 811 | .resume_handler = scic_sds_remote_node_context_continue_to_resume_handler, |
816 | scic_sds_remote_node_context_continue_to_resume_handler, | 812 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
817 | scic_sds_remote_node_context_default_start_io_handler, | 813 | .start_task_handler = scic_sds_remote_node_context_default_start_task_handler, |
818 | scic_sds_remote_node_context_default_start_task_handler, | 814 | .event_handler = scic_sds_remote_node_context_invalidating_state_event_handler |
819 | scic_sds_remote_node_context_invalidating_state_event_handler | ||
820 | }, | 815 | }, |
821 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_RESUMING_STATE */ | 816 | [SCIC_SDS_REMOTE_NODE_CONTEXT_RESUMING_STATE] = { |
822 | { | 817 | .destruct_handler = scic_sds_remote_node_context_general_destruct_handler, |
823 | scic_sds_remote_node_context_general_destruct_handler, | 818 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
824 | scic_sds_remote_node_context_default_suspend_handler, | 819 | .resume_handler = scic_sds_remote_node_context_continue_to_resume_handler, |
825 | scic_sds_remote_node_context_continue_to_resume_handler, | 820 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
826 | scic_sds_remote_node_context_default_start_io_handler, | 821 | .start_task_handler = scic_sds_remote_node_context_success_start_task_handler, |
827 | scic_sds_remote_node_context_success_start_task_handler, | 822 | .event_handler = scic_sds_remote_node_context_resuming_state_event_handler |
828 | scic_sds_remote_node_context_resuming_state_event_handler | ||
829 | }, | 823 | }, |
830 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE */ | 824 | [SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE] = { |
831 | { | 825 | .destruct_handler = scic_sds_remote_node_context_general_destruct_handler, |
832 | scic_sds_remote_node_context_general_destruct_handler, | 826 | .suspend_handler = scic_sds_remote_node_context_ready_state_suspend_handler, |
833 | scic_sds_remote_node_context_ready_state_suspend_handler, | 827 | .resume_handler = scic_sds_remote_node_context_default_resume_handler, |
834 | scic_sds_remote_node_context_default_resume_handler, | 828 | .start_io_handler = scic_sds_remote_node_context_ready_state_start_io_handler, |
835 | scic_sds_remote_node_context_ready_state_start_io_handler, | 829 | .start_task_handler = scic_sds_remote_node_context_success_start_task_handler, |
836 | scic_sds_remote_node_context_success_start_task_handler, | 830 | .event_handler = scic_sds_remote_node_context_ready_state_event_handler |
837 | scic_sds_remote_node_context_ready_state_event_handler | ||
838 | }, | 831 | }, |
839 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_TX_SUSPENDED_STATE */ | 832 | [SCIC_SDS_REMOTE_NODE_CONTEXT_TX_SUSPENDED_STATE] = { |
840 | { | 833 | .destruct_handler = scic_sds_remote_node_context_general_destruct_handler, |
841 | scic_sds_remote_node_context_general_destruct_handler, | 834 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
842 | scic_sds_remote_node_context_default_suspend_handler, | 835 | .resume_handler = scic_sds_remote_node_context_tx_suspended_state_resume_handler, |
843 | scic_sds_remote_node_context_tx_suspended_state_resume_handler, | 836 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
844 | scic_sds_remote_node_context_default_start_io_handler, | 837 | .start_task_handler = scic_sds_remote_node_context_suspended_start_task_handler, |
845 | scic_sds_remote_node_context_suspended_start_task_handler, | 838 | .event_handler = scic_sds_remote_node_context_default_event_handler |
846 | scic_sds_remote_node_context_default_event_handler | ||
847 | }, | 839 | }, |
848 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE */ | 840 | [SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE] = { |
849 | { | 841 | .destruct_handler = scic_sds_remote_node_context_general_destruct_handler, |
850 | scic_sds_remote_node_context_general_destruct_handler, | 842 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
851 | scic_sds_remote_node_context_default_suspend_handler, | 843 | .resume_handler = scic_sds_remote_node_context_tx_rx_suspended_state_resume_handler, |
852 | scic_sds_remote_node_context_tx_rx_suspended_state_resume_handler, | 844 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
853 | scic_sds_remote_node_context_default_start_io_handler, | 845 | .start_task_handler = scic_sds_remote_node_context_suspended_start_task_handler, |
854 | scic_sds_remote_node_context_suspended_start_task_handler, | 846 | .event_handler = scic_sds_remote_node_context_default_event_handler |
855 | scic_sds_remote_node_context_default_event_handler | ||
856 | }, | 847 | }, |
857 | /* SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE */ | 848 | [SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE] = { |
858 | { | 849 | .destruct_handler = scic_sds_remote_node_context_general_destruct_handler, |
859 | scic_sds_remote_node_context_general_destruct_handler, | 850 | .suspend_handler = scic_sds_remote_node_context_default_suspend_handler, |
860 | scic_sds_remote_node_context_default_suspend_handler, | 851 | .resume_handler = scic_sds_remote_node_context_await_suspension_state_resume_handler, |
861 | scic_sds_remote_node_context_await_suspension_state_resume_handler, | 852 | .start_io_handler = scic_sds_remote_node_context_default_start_io_handler, |
862 | scic_sds_remote_node_context_default_start_io_handler, | 853 | .start_task_handler = scic_sds_remote_node_context_await_suspension_state_start_task_handler, |
863 | scic_sds_remote_node_context_await_suspension_state_start_task_handler, | 854 | .event_handler = scic_sds_remote_node_context_await_suspension_state_event_handler |
864 | scic_sds_remote_node_context_await_suspension_state_event_handler | ||
865 | } | 855 | } |
866 | }; | 856 | }; |
867 | 857 | ||
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h index bc7914beb0c5..540a49a9c94d 100644 --- a/drivers/scsi/isci/remote_node_context.h +++ b/drivers/scsi/isci/remote_node_context.h | |||
@@ -201,10 +201,7 @@ enum scis_sds_remote_node_context_states { | |||
201 | * there is a request to supend the remote node context or when there is a TC | 201 | * there is a request to supend the remote node context or when there is a TC |
202 | * completion where the remote node will be suspended by the hardware. | 202 | * completion where the remote node will be suspended by the hardware. |
203 | */ | 203 | */ |
204 | SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE, | 204 | SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE |
205 | |||
206 | SCIC_SDS_REMOTE_NODE_CONTEXT_MAX_STATES | ||
207 | |||
208 | }; | 205 | }; |
209 | 206 | ||
210 | /** | 207 | /** |