Lines Matching refs:ihost
90 static void isci_remote_device_ready(struct isci_host *ihost, struct isci_remote_device *idev) in isci_remote_device_ready() argument
92 dev_dbg(&ihost->pdev->dev, in isci_remote_device_ready()
98 wake_up(&ihost->eventq); in isci_remote_device_ready()
102 struct isci_host *ihost, in sci_remote_device_terminate_req() argument
112 dev_dbg(&ihost->pdev->dev, in sci_remote_device_terminate_req()
118 return sci_controller_terminate_request(ihost, idev, ireq); in sci_remote_device_terminate_req()
125 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_terminate_reqs_checkabort() local
130 struct isci_request *ireq = ihost->reqs[i]; in sci_remote_device_terminate_reqs_checkabort()
133 s = sci_remote_device_terminate_req(ihost, idev, chk, ireq); in sci_remote_device_terminate_reqs_checkabort()
154 struct isci_host *ihost, in isci_check_reqterm() argument
162 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_check_reqterm()
165 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_check_reqterm()
171 struct isci_host *ihost, in isci_check_devempty() argument
178 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_check_devempty()
181 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_check_devempty()
187 struct isci_host *ihost, in isci_remote_device_terminate_requests() argument
195 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_terminate_requests()
198 dev_dbg(&ihost->pdev->dev, "%s: failed isci_get_device(idev=%p)\n", in isci_remote_device_terminate_requests()
200 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_terminate_requests()
209 dev_dbg(&ihost->pdev->dev, in isci_remote_device_terminate_requests()
220 sci_remote_device_terminate_req(ihost, idev, 0, ireq); in isci_remote_device_terminate_requests()
221 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_terminate_requests()
222 if (!wait_event_timeout(ihost->eventq, in isci_remote_device_terminate_requests()
223 isci_check_reqterm(ihost, idev, ireq, in isci_remote_device_terminate_requests()
227 dev_warn(&ihost->pdev->dev, "%s host%d timeout single\n", in isci_remote_device_terminate_requests()
228 __func__, ihost->id); in isci_remote_device_terminate_requests()
229 dev_dbg(&ihost->pdev->dev, in isci_remote_device_terminate_requests()
246 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_terminate_requests()
249 isci_free_tag(ihost, ireq->io_tag); in isci_remote_device_terminate_requests()
250 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_terminate_requests()
254 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_terminate_requests()
255 if (!wait_event_timeout(ihost->eventq, in isci_remote_device_terminate_requests()
256 isci_check_devempty(ihost, idev, in isci_remote_device_terminate_requests()
260 dev_warn(&ihost->pdev->dev, "%s host%d timeout all\n", in isci_remote_device_terminate_requests()
261 __func__, ihost->id); in isci_remote_device_terminate_requests()
262 dev_dbg(&ihost->pdev->dev, in isci_remote_device_terminate_requests()
280 dev_dbg(&ihost->pdev->dev, "%s: idev=%p, wait done\n", in isci_remote_device_terminate_requests()
297 static void isci_remote_device_not_ready(struct isci_host *ihost, in isci_remote_device_not_ready() argument
301 dev_dbg(&ihost->pdev->dev, in isci_remote_device_not_ready()
445 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_frame_handler() local
459 sci_controller_release_frame(ihost, frame_index); in sci_remote_device_frame_handler()
472 status = sci_unsolicited_frame_control_get_header(&ihost->uf_control, in sci_remote_device_frame_handler()
481 ireq = sci_request_by_tag(ihost, be16_to_cpu(hdr.tag)); in sci_remote_device_frame_handler()
489 sci_controller_release_frame(ihost, frame_index); in sci_remote_device_frame_handler()
496 status = sci_unsolicited_frame_control_get_header(&ihost->uf_control, in sci_remote_device_frame_handler()
519 sci_controller_release_frame(ihost, frame_index); in sci_remote_device_frame_handler()
654 enum sci_status sci_remote_device_start_io(struct isci_host *ihost, in sci_remote_device_start_io() argument
790 enum sci_status sci_remote_device_complete_io(struct isci_host *ihost, in sci_remote_device_complete_io() argument
872 enum sci_status sci_remote_device_start_task(struct isci_host *ihost, in sci_remote_device_start_task() argument
985 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_stp_remote_device_ready_idle_substate_resume_complete_handler() local
991 isci_remote_device_ready(ihost, idev); in sci_stp_remote_device_ready_idle_substate_resume_complete_handler()
1019 struct isci_host *ihost; in sci_remote_device_destruct() local
1027 ihost = idev->owning_port->owning_controller; in sci_remote_device_destruct()
1028 sci_controller_free_remote_node_context(ihost, idev, in sci_remote_device_destruct()
1042 static void isci_remote_device_deconstruct(struct isci_host *ihost, struct isci_remote_device *idev) in isci_remote_device_deconstruct() argument
1044 dev_dbg(&ihost->pdev->dev, in isci_remote_device_deconstruct()
1061 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_stopped_state_enter() local
1069 isci_remote_device_deconstruct(ihost, idev); in sci_remote_device_stopped_state_enter()
1071 sci_controller_remote_device_stopped(ihost, idev); in sci_remote_device_stopped_state_enter()
1077 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_starting_state_enter() local
1079 isci_remote_device_not_ready(ihost, idev, in sci_remote_device_starting_state_enter()
1086 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_ready_state_enter() local
1094 isci_remote_device_ready(ihost, idev); in sci_remote_device_ready_state_enter()
1103 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_ready_state_exit() local
1105 isci_remote_device_not_ready(ihost, idev, in sci_remote_device_ready_state_exit()
1113 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_resetting_state_enter() local
1115 dev_dbg(&ihost->pdev->dev, in sci_remote_device_resetting_state_enter()
1124 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_remote_device_resetting_state_exit() local
1126 dev_dbg(&ihost->pdev->dev, in sci_remote_device_resetting_state_exit()
1152 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_stp_remote_device_ready_cmd_substate_enter() local
1156 isci_remote_device_not_ready(ihost, idev, in sci_stp_remote_device_ready_cmd_substate_enter()
1163 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_stp_remote_device_ready_ncq_error_substate_enter() local
1166 isci_remote_device_not_ready(ihost, idev, in sci_stp_remote_device_ready_ncq_error_substate_enter()
1173 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_smp_remote_device_ready_idle_substate_enter() local
1175 isci_remote_device_ready(ihost, idev); in sci_smp_remote_device_ready_idle_substate_enter()
1181 struct isci_host *ihost = idev->owning_port->owning_controller; in sci_smp_remote_device_ready_cmd_substate_enter() local
1185 isci_remote_device_not_ready(ihost, idev, in sci_smp_remote_device_ready_cmd_substate_enter()
1357 struct isci_host *ihost = idev->owning_port->owning_controller; in isci_remote_device_resume_from_abort_complete() local
1369 wake_up(&ihost->eventq); in isci_remote_device_resume_from_abort_complete()
1373 struct isci_host *ihost, in isci_remote_device_test_resume_done() argument
1379 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_test_resume_done()
1383 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_test_resume_done()
1389 struct isci_host *ihost, in isci_remote_device_wait_for_resume_from_abort() argument
1392 dev_dbg(&ihost->pdev->dev, "%s: starting resume wait: %p\n", in isci_remote_device_wait_for_resume_from_abort()
1396 if (!wait_event_timeout(ihost->eventq, in isci_remote_device_wait_for_resume_from_abort()
1397 isci_remote_device_test_resume_done(ihost, idev), in isci_remote_device_wait_for_resume_from_abort()
1400 dev_warn(&ihost->pdev->dev, "%s: #### Timeout waiting for " in isci_remote_device_wait_for_resume_from_abort()
1405 dev_dbg(&ihost->pdev->dev, "%s: resume wait done: %p\n", in isci_remote_device_wait_for_resume_from_abort()
1410 struct isci_host *ihost, in isci_remote_device_resume_from_abort() argument
1417 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_resume_from_abort()
1430 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_resume_from_abort()
1432 isci_remote_device_wait_for_resume_from_abort(ihost, idev); in isci_remote_device_resume_from_abort()
1478 struct isci_host *ihost = iport->isci_host; in isci_remote_device_construct() local
1488 dev_dbg(&ihost->pdev->dev, "%s: construct failed: %d\n", in isci_remote_device_construct()
1498 dev_warn(&ihost->pdev->dev, "remote device start failed: %d\n", in isci_remote_device_construct()
1514 isci_remote_device_alloc(struct isci_host *ihost, struct isci_port *iport) in isci_remote_device_alloc() argument
1520 idev = &ihost->devices[i]; in isci_remote_device_alloc()
1526 dev_warn(&ihost->pdev->dev, "%s: failed\n", __func__); in isci_remote_device_alloc()
1538 struct isci_host *ihost = idev->isci_port->isci_host; in isci_remote_device_release() local
1548 wake_up(&ihost->eventq); in isci_remote_device_release()
1559 enum sci_status isci_remote_device_stop(struct isci_host *ihost, struct isci_remote_device *idev) in isci_remote_device_stop() argument
1564 dev_dbg(&ihost->pdev->dev, in isci_remote_device_stop()
1567 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_stop()
1573 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_stop()
1579 wait_for_device_stop(ihost, idev); in isci_remote_device_stop()
1581 dev_dbg(&ihost->pdev->dev, in isci_remote_device_stop()
1594 struct isci_host *ihost = dev_to_ihost(dev); in isci_remote_device_gone() local
1597 dev_dbg(&ihost->pdev->dev, in isci_remote_device_gone()
1601 isci_remote_device_stop(ihost, idev); in isci_remote_device_gone()
1660 struct isci_host *ihost, in isci_remote_device_suspend_terminate() argument
1668 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_suspend_terminate()
1671 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_suspend_terminate()
1674 status = isci_remote_device_terminate_requests(ihost, idev, ireq); in isci_remote_device_suspend_terminate()
1676 dev_dbg(&ihost->pdev->dev, in isci_remote_device_suspend_terminate()
1698 struct isci_host *ihost, in isci_remote_device_reset_complete() argument
1704 spin_lock_irqsave(&ihost->scic_lock, flags); in isci_remote_device_reset_complete()
1706 spin_unlock_irqrestore(&ihost->scic_lock, flags); in isci_remote_device_reset_complete()