Lines Matching refs:host
185 if (SCpnt->host->hostt->eh_ordered_queue_tag) { in scsi_times_out()
186 if ((*SCpnt->host->hostt->eh_ordered_queue_tag) (SCpnt)) { in scsi_times_out()
197 if (SCpnt->host->can_queue) { in scsi_times_out()
198 SCpnt->host->hostt->queuecommand(SCpnt, NULL); in scsi_times_out()
209 SCpnt->host->in_recovery = 1; in scsi_times_out()
210 SCpnt->host->host_failed++; in scsi_times_out()
213 atomic_read(&SCpnt->host->host_active), in scsi_times_out()
214 SCpnt->host->host_busy, in scsi_times_out()
215 SCpnt->host->host_failed)); in scsi_times_out()
221 if( SCpnt->host->eh_wait == NULL ) { in scsi_times_out()
223 SCpnt, SCpnt->host, __FILE__, __LINE__); in scsi_times_out()
225 if (SCpnt->host->host_busy == SCpnt->host->host_failed) { in scsi_times_out()
226 up(SCpnt->host->eh_wait); in scsi_times_out()
247 SCSI_SLEEP(&SDpnt->host->host_wait, SDpnt->host->in_recovery); in scsi_block_when_processing_errors()
274 if (SCpnt->host->eh_action != NULL) in scsi_eh_times_out()
275 up(SCpnt->host->eh_action); in scsi_eh_times_out()
320 if (SCpnt->host->eh_action != NULL) in scsi_eh_done()
321 up(SCpnt->host->eh_action); in scsi_eh_done()
344 if (SCpnt->host->eh_action != NULL) in scsi_eh_action_done()
345 up(SCpnt->host->eh_action); in scsi_eh_action_done()
423 scsi_result = (!SCpnt->host->hostt->unchecked_isa_dma) in scsi_request_sense()
580 struct Scsi_Host *host; in scsi_send_eh_cmnd() local
584 host = SCpnt->host; in scsi_send_eh_cmnd()
593 if (host->can_queue) { in scsi_send_eh_cmnd()
603 SCpnt->host->eh_action = &sem; in scsi_send_eh_cmnd()
607 host->hostt->queuecommand(SCpnt, scsi_eh_done); in scsi_send_eh_cmnd()
612 SCpnt->host->eh_action = NULL; in scsi_send_eh_cmnd()
632 if (SCpnt->host->hostt->eh_abort_handler) in scsi_send_eh_cmnd()
633 SCpnt->host->hostt->eh_abort_handler(SCpnt); in scsi_send_eh_cmnd()
652 temp = host->hostt->command(SCpnt); in scsi_send_eh_cmnd()
764 if (SCpnt->host->hostt->eh_abort_handler == NULL) { in scsi_try_to_abort_command()
777 rtn = SCpnt->host->hostt->eh_abort_handler(SCpnt); in scsi_try_to_abort_command()
803 if (SCpnt->host->hostt->eh_device_reset_handler == NULL) { in scsi_try_bus_device_reset()
809 rtn = SCpnt->host->hostt->eh_device_reset_handler(SCpnt); in scsi_try_bus_device_reset()
837 if (SCpnt->host->hostt->eh_bus_reset_handler == NULL) { in scsi_try_bus_reset()
842 rtn = SCpnt->host->hostt->eh_bus_reset_handler(SCpnt); in scsi_try_bus_reset()
855 for (SDloop = SCpnt->host->host_queue; SDloop; SDloop = SDloop->next) { in scsi_try_bus_reset()
884 if (SCpnt->host->hostt->eh_host_reset_handler == NULL) { in scsi_try_host_reset()
888 rtn = SCpnt->host->hostt->eh_host_reset_handler(SCpnt); in scsi_try_host_reset()
901 for (SDloop = SCpnt->host->host_queue; SDloop; SDloop = SDloop->next) { in scsi_try_host_reset()
1060 SCpnt->host->host_no, SCpnt->channel, in scsi_decide_disposition()
1233 STATIC void scsi_restart_operations(struct Scsi_Host *host) in scsi_restart_operations() argument
1247 wake_up(&host->host_wait); in scsi_restart_operations()
1256 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_restart_operations()
1258 if ((host->can_queue > 0 && (host->host_busy >= host->can_queue)) in scsi_restart_operations()
1259 || (host->host_blocked) in scsi_restart_operations()
1260 || (host->host_self_blocked) in scsi_restart_operations()
1300 STATIC int scsi_unjam_host(struct Scsi_Host *host) in scsi_unjam_host() argument
1324 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1373 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1396 SCpnt->host->host_failed--; in scsi_unjam_host()
1418 SCpnt->host->host_failed--; in scsi_unjam_host()
1430 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1455 if (host->host_failed == 0) { in scsi_unjam_host()
1469 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1482 SCloop->host->host_failed--; in scsi_unjam_host()
1493 if (host->host_failed == 0) { in scsi_unjam_host()
1509 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1537 SCloop->host->host_failed--; in scsi_unjam_host()
1544 if (host->host_failed == 0) { in scsi_unjam_host()
1561 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1573 for (SDloop = host->host_queue; SDloop; SDloop = SDloop->next) { in scsi_unjam_host()
1610 for (SDloop = host->host_queue; SDloop; SDloop = SDloop->next) { in scsi_unjam_host()
1625 SCpnt->host->host_failed--; in scsi_unjam_host()
1635 …retry failed after bus reset: host %d channel %d id %d lun %d\n", SDloop->host->host_no, SDloop->c… in scsi_unjam_host()
1638 SDloop->host->host_failed--; in scsi_unjam_host()
1647 if (host->host_failed == 0) { in scsi_unjam_host()
1667 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1711 for (SDloop = host->host_queue; SDloop; SDloop = SDloop->next) { in scsi_unjam_host()
1723 SCpnt->host->host_failed--; in scsi_unjam_host()
1728 …etry failed after host reset: host %d channel %d id %d lun %d\n", SDloop->host->host_no, SDloop->c… in scsi_unjam_host()
1730 SDloop->host->host_failed--; in scsi_unjam_host()
1742 if (host->host_failed == 0) { in scsi_unjam_host()
1754 for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) { in scsi_unjam_host()
1759 …command error recover failed: host %d channel %d id %d lun %d\n", SDloop->host->host_no, SDloop->c… in scsi_unjam_host()
1767 SCloop->host->host_failed--; in scsi_unjam_host()
1780 if (host->host_failed != 0) { in scsi_unjam_host()
1799 host->in_recovery = 0; in scsi_unjam_host()
1848 struct Scsi_Host *host = (struct Scsi_Host *) data; in scsi_error_handler() local
1857 if( host->loaded_as_module ) { in scsi_error_handler()
1876 sprintf(current->comm, "scsi_eh_%d", host->host_no); in scsi_error_handler()
1878 host->eh_wait = &sem; in scsi_error_handler()
1879 host->ehandler = current; in scsi_error_handler()
1886 SCSI_LOG_ERROR_RECOVERY(3, printk("Wake up parent %d\n", sem_getcount(host->eh_notify))); in scsi_error_handler()
1888 up(host->eh_notify); in scsi_error_handler()
1908 if( host->loaded_as_module ) { in scsi_error_handler()
1915 host->eh_active = 1; in scsi_error_handler()
1922 if (host->hostt->eh_strategy_handler != NULL) { in scsi_error_handler()
1923 rtn = host->hostt->eh_strategy_handler(host); in scsi_error_handler()
1925 rtn = scsi_unjam_host(host); in scsi_error_handler()
1928 host->eh_active = 0; in scsi_error_handler()
1937 scsi_restart_operations(host); in scsi_error_handler()
1946 host->eh_wait = NULL; in scsi_error_handler()
1954 host->in_recovery = 0; in scsi_error_handler()
1955 host->eh_active = 0; in scsi_error_handler()
1956 host->ehandler = NULL; in scsi_error_handler()
1966 if (host->eh_notify != NULL) in scsi_error_handler()
1967 up(host->eh_notify); in scsi_error_handler()