diff options
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r-- | drivers/scsi/isci/request.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index c63064ede38d..063ef04080d5 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -2900,10 +2900,9 @@ static void isci_request_io_request_complete(struct isci_host *isci_host, | |||
2900 | isci_host_can_dequeue(isci_host, 1); | 2900 | isci_host_can_dequeue(isci_host, 1); |
2901 | } | 2901 | } |
2902 | 2902 | ||
2903 | static void scic_sds_request_started_state_enter(void *object) | 2903 | static void scic_sds_request_started_state_enter(struct sci_base_state_machine *sm) |
2904 | { | 2904 | { |
2905 | struct scic_sds_request *sci_req = object; | 2905 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2906 | struct sci_base_state_machine *sm = &sci_req->state_machine; | ||
2907 | struct isci_request *ireq = sci_req_to_ireq(sci_req); | 2906 | struct isci_request *ireq = sci_req_to_ireq(sci_req); |
2908 | struct domain_device *dev = sci_dev_to_domain(sci_req->target_device); | 2907 | struct domain_device *dev = sci_dev_to_domain(sci_req->target_device); |
2909 | struct sas_task *task; | 2908 | struct sas_task *task; |
@@ -2942,9 +2941,9 @@ static void scic_sds_request_started_state_enter(void *object) | |||
2942 | } | 2941 | } |
2943 | } | 2942 | } |
2944 | 2943 | ||
2945 | static void scic_sds_request_completed_state_enter(void *object) | 2944 | static void scic_sds_request_completed_state_enter(struct sci_base_state_machine *sm) |
2946 | { | 2945 | { |
2947 | struct scic_sds_request *sci_req = object; | 2946 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2948 | struct scic_sds_controller *scic = sci_req->owning_controller; | 2947 | struct scic_sds_controller *scic = sci_req->owning_controller; |
2949 | struct isci_host *ihost = scic_to_ihost(scic); | 2948 | struct isci_host *ihost = scic_to_ihost(scic); |
2950 | struct isci_request *ireq = sci_req_to_ireq(sci_req); | 2949 | struct isci_request *ireq = sci_req_to_ireq(sci_req); |
@@ -2957,42 +2956,41 @@ static void scic_sds_request_completed_state_enter(void *object) | |||
2957 | isci_task_request_complete(ihost, ireq, sci_req->sci_status); | 2956 | isci_task_request_complete(ihost, ireq, sci_req->sci_status); |
2958 | } | 2957 | } |
2959 | 2958 | ||
2960 | static void scic_sds_request_aborting_state_enter(void *object) | 2959 | static void scic_sds_request_aborting_state_enter(struct sci_base_state_machine *sm) |
2961 | { | 2960 | { |
2962 | struct scic_sds_request *sci_req = object; | 2961 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2963 | 2962 | ||
2964 | /* Setting the abort bit in the Task Context is required by the silicon. */ | 2963 | /* Setting the abort bit in the Task Context is required by the silicon. */ |
2965 | sci_req->task_context_buffer->abort = 1; | 2964 | sci_req->task_context_buffer->abort = 1; |
2966 | } | 2965 | } |
2967 | 2966 | ||
2968 | static void scic_sds_stp_request_started_non_data_await_h2d_completion_enter( | 2967 | static void scic_sds_stp_request_started_non_data_await_h2d_completion_enter(struct sci_base_state_machine *sm) |
2969 | void *object) | ||
2970 | { | 2968 | { |
2971 | struct scic_sds_request *sci_req = object; | 2969 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2972 | 2970 | ||
2973 | scic_sds_remote_device_set_working_request(sci_req->target_device, | 2971 | scic_sds_remote_device_set_working_request(sci_req->target_device, |
2974 | sci_req); | 2972 | sci_req); |
2975 | } | 2973 | } |
2976 | 2974 | ||
2977 | static void scic_sds_stp_request_started_pio_await_h2d_completion_enter(void *object) | 2975 | static void scic_sds_stp_request_started_pio_await_h2d_completion_enter(struct sci_base_state_machine *sm) |
2978 | { | 2976 | { |
2979 | struct scic_sds_request *sci_req = object; | 2977 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2980 | 2978 | ||
2981 | scic_sds_remote_device_set_working_request(sci_req->target_device, | 2979 | scic_sds_remote_device_set_working_request(sci_req->target_device, |
2982 | sci_req); | 2980 | sci_req); |
2983 | } | 2981 | } |
2984 | 2982 | ||
2985 | static void scic_sds_stp_request_started_soft_reset_await_h2d_asserted_completion_enter(void *object) | 2983 | static void scic_sds_stp_request_started_soft_reset_await_h2d_asserted_completion_enter(struct sci_base_state_machine *sm) |
2986 | { | 2984 | { |
2987 | struct scic_sds_request *sci_req = object; | 2985 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2988 | 2986 | ||
2989 | scic_sds_remote_device_set_working_request(sci_req->target_device, | 2987 | scic_sds_remote_device_set_working_request(sci_req->target_device, |
2990 | sci_req); | 2988 | sci_req); |
2991 | } | 2989 | } |
2992 | 2990 | ||
2993 | static void scic_sds_stp_request_started_soft_reset_await_h2d_diagnostic_completion_enter(void *object) | 2991 | static void scic_sds_stp_request_started_soft_reset_await_h2d_diagnostic_completion_enter(struct sci_base_state_machine *sm) |
2994 | { | 2992 | { |
2995 | struct scic_sds_request *sci_req = object; | 2993 | struct scic_sds_request *sci_req = container_of(sm, typeof(*sci_req), state_machine); |
2996 | struct scu_task_context *task_context; | 2994 | struct scu_task_context *task_context; |
2997 | struct host_to_dev_fis *h2d_fis; | 2995 | struct host_to_dev_fis *h2d_fis; |
2998 | enum sci_status status; | 2996 | enum sci_status status; |
@@ -3052,8 +3050,9 @@ static void scic_sds_general_request_construct(struct scic_sds_controller *scic, | |||
3052 | struct scic_sds_remote_device *sci_dev, | 3050 | struct scic_sds_remote_device *sci_dev, |
3053 | u16 io_tag, struct scic_sds_request *sci_req) | 3051 | u16 io_tag, struct scic_sds_request *sci_req) |
3054 | { | 3052 | { |
3055 | sci_base_state_machine_construct(&sci_req->state_machine, sci_req, | 3053 | sci_base_state_machine_construct(&sci_req->state_machine, |
3056 | scic_sds_request_state_table, SCI_BASE_REQUEST_STATE_INITIAL); | 3054 | scic_sds_request_state_table, |
3055 | SCI_BASE_REQUEST_STATE_INITIAL); | ||
3057 | sci_base_state_machine_start(&sci_req->state_machine); | 3056 | sci_base_state_machine_start(&sci_req->state_machine); |
3058 | 3057 | ||
3059 | sci_req->io_tag = io_tag; | 3058 | sci_req->io_tag = io_tag; |