Lines Matching refs:rtn
122 int rtn; in scmd_eh_abort_handler() local
132 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd); in scmd_eh_abort_handler()
133 if (rtn == SUCCESS) { in scmd_eh_abort_handler()
158 (rtn == FAST_IO_FAIL) ? in scmd_eh_abort_handler()
271 enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED; in scsi_times_out() local
281 rtn = host->transportt->eh_timed_out(scmd); in scsi_times_out()
283 rtn = host->hostt->eh_timed_out(scmd); in scsi_times_out()
285 if (rtn == BLK_EH_NOT_HANDLED) { in scsi_times_out()
292 rtn = BLK_EH_HANDLED; in scsi_times_out()
295 return rtn; in scsi_times_out()
747 int rtn; in scsi_try_host_reset() local
757 rtn = hostt->eh_host_reset_handler(scmd); in scsi_try_host_reset()
759 if (rtn == SUCCESS) { in scsi_try_host_reset()
767 return rtn; in scsi_try_host_reset()
777 int rtn; in scsi_try_bus_reset() local
787 rtn = hostt->eh_bus_reset_handler(scmd); in scsi_try_bus_reset()
789 if (rtn == SUCCESS) { in scsi_try_bus_reset()
797 return rtn; in scsi_try_bus_reset()
819 int rtn; in scsi_try_target_reset() local
826 rtn = hostt->eh_target_reset_handler(scmd); in scsi_try_target_reset()
827 if (rtn == SUCCESS) { in scsi_try_target_reset()
834 return rtn; in scsi_try_target_reset()
849 int rtn; in scsi_try_bus_device_reset() local
855 rtn = hostt->eh_device_reset_handler(scmd); in scsi_try_bus_device_reset()
856 if (rtn == SUCCESS) in scsi_try_bus_device_reset()
858 return rtn; in scsi_try_bus_device_reset()
1019 int rtn; in scsi_send_eh_cmnd() local
1027 rtn = shost->hostt->queuecommand(shost, scmd); in scsi_send_eh_cmnd()
1028 if (rtn) { in scsi_send_eh_cmnd()
1037 rtn = FAILED; in scsi_send_eh_cmnd()
1040 rtn = SUCCESS; in scsi_send_eh_cmnd()
1045 scsi_log_completion(scmd, rtn); in scsi_send_eh_cmnd()
1061 rtn = scsi_eh_completed_normally(scmd); in scsi_send_eh_cmnd()
1063 "%s: scsi_eh_completed_normally %x\n", __func__, rtn)); in scsi_send_eh_cmnd()
1065 switch (rtn) { in scsi_send_eh_cmnd()
1071 rtn = NEEDS_RETRY; in scsi_send_eh_cmnd()
1074 rtn = FAILED; in scsi_send_eh_cmnd()
1077 } else if (rtn != FAILED) { in scsi_send_eh_cmnd()
1079 rtn = FAILED; in scsi_send_eh_cmnd()
1084 return rtn; in scsi_send_eh_cmnd()
1101 static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) in scsi_eh_action() argument
1106 rtn = sdrv->eh_action(scmd, rtn); in scsi_eh_action()
1108 return rtn; in scsi_eh_action()
1156 int rtn; in scsi_eh_get_sense() local
1183 rtn = scsi_request_sense(scmd); in scsi_eh_get_sense()
1184 if (rtn != SUCCESS) in scsi_eh_get_sense()
1191 rtn = scsi_decide_disposition(scmd); in scsi_eh_get_sense()
1197 if (rtn == SUCCESS) in scsi_eh_get_sense()
1203 else if (rtn != NEEDS_RETRY) in scsi_eh_get_sense()
1223 int retry_cnt = 1, rtn; in scsi_eh_tur() local
1226 rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, in scsi_eh_tur()
1230 "%s return: %x\n", __func__, rtn)); in scsi_eh_tur()
1232 switch (rtn) { in scsi_eh_tur()
1317 int rtn; in scsi_eh_abort_cmds() local
1335 rtn = scsi_try_to_abort_cmd(shost->hostt, scmd); in scsi_eh_abort_cmds()
1336 if (rtn == FAILED) { in scsi_eh_abort_cmds()
1345 if (rtn == FAST_IO_FAIL) in scsi_eh_abort_cmds()
1366 int i, rtn = NEEDS_RETRY; in scsi_eh_try_stu() local
1368 for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) in scsi_eh_try_stu()
1369 rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0); in scsi_eh_try_stu()
1371 if (rtn == SUCCESS) in scsi_eh_try_stu()
1459 int rtn; in scsi_eh_bus_device_reset() local
1482 rtn = scsi_try_bus_device_reset(bdr_scmd); in scsi_eh_bus_device_reset()
1483 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_device_reset()
1485 rtn == FAST_IO_FAIL || in scsi_eh_bus_device_reset()
1490 scsi_eh_action(scmd, rtn) != FAILED) in scsi_eh_bus_device_reset()
1525 int rtn; in scsi_eh_target_reset() local
1546 rtn = scsi_try_target_reset(scmd); in scsi_eh_target_reset()
1547 if (rtn != SUCCESS && rtn != FAST_IO_FAIL) in scsi_eh_target_reset()
1557 if (rtn == SUCCESS) in scsi_eh_target_reset()
1559 else if (rtn == FAST_IO_FAIL) in scsi_eh_target_reset()
1583 int rtn; in scsi_eh_bus_reset() local
1620 rtn = scsi_try_bus_reset(chan_scmd); in scsi_eh_bus_reset()
1621 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_reset()
1624 if (rtn == FAST_IO_FAIL) in scsi_eh_bus_reset()
1654 int rtn; in scsi_eh_host_reset() local
1665 rtn = scsi_try_host_reset(scmd); in scsi_eh_host_reset()
1666 if (rtn == SUCCESS) { in scsi_eh_host_reset()
1668 } else if (rtn == FAST_IO_FAIL) { in scsi_eh_host_reset()
1761 int rtn; in scsi_decide_disposition() local
1898 rtn = scsi_check_sense(scmd); in scsi_decide_disposition()
1899 if (rtn == NEEDS_RETRY) in scsi_decide_disposition()
1905 return rtn; in scsi_decide_disposition()
2323 int error = 0, rtn, val; in scsi_ioctl_reset() local
2358 rtn = SUCCESS; in scsi_ioctl_reset()
2361 rtn = scsi_try_bus_device_reset(scmd); in scsi_ioctl_reset()
2362 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2366 rtn = scsi_try_target_reset(scmd); in scsi_ioctl_reset()
2367 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2371 rtn = scsi_try_bus_reset(scmd); in scsi_ioctl_reset()
2372 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2376 rtn = scsi_try_host_reset(scmd); in scsi_ioctl_reset()
2377 if (rtn == SUCCESS) in scsi_ioctl_reset()
2381 rtn = FAILED; in scsi_ioctl_reset()
2385 error = (rtn == SUCCESS) ? 0 : -EIO; in scsi_ioctl_reset()