Lines Matching refs:rtn
124 int rtn; in scmd_eh_abort_handler() local
134 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd); in scmd_eh_abort_handler()
135 if (rtn == SUCCESS) { in scmd_eh_abort_handler()
160 (rtn == FAST_IO_FAIL) ? in scmd_eh_abort_handler()
273 enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED; in scsi_times_out() local
283 rtn = host->transportt->eh_timed_out(scmd); in scsi_times_out()
285 rtn = host->hostt->eh_timed_out(scmd); in scsi_times_out()
287 if (rtn == BLK_EH_NOT_HANDLED) { in scsi_times_out()
294 rtn = BLK_EH_HANDLED; in scsi_times_out()
297 return rtn; in scsi_times_out()
752 int rtn; in scsi_try_host_reset() local
762 rtn = hostt->eh_host_reset_handler(scmd); in scsi_try_host_reset()
764 if (rtn == SUCCESS) { in scsi_try_host_reset()
772 return rtn; in scsi_try_host_reset()
782 int rtn; in scsi_try_bus_reset() local
792 rtn = hostt->eh_bus_reset_handler(scmd); in scsi_try_bus_reset()
794 if (rtn == SUCCESS) { in scsi_try_bus_reset()
802 return rtn; in scsi_try_bus_reset()
824 int rtn; in scsi_try_target_reset() local
831 rtn = hostt->eh_target_reset_handler(scmd); in scsi_try_target_reset()
832 if (rtn == SUCCESS) { in scsi_try_target_reset()
839 return rtn; in scsi_try_target_reset()
854 int rtn; in scsi_try_bus_device_reset() local
860 rtn = hostt->eh_device_reset_handler(scmd); in scsi_try_bus_device_reset()
861 if (rtn == SUCCESS) in scsi_try_bus_device_reset()
863 return rtn; in scsi_try_bus_device_reset()
1024 int rtn; in scsi_send_eh_cmnd() local
1032 rtn = shost->hostt->queuecommand(shost, scmd); in scsi_send_eh_cmnd()
1033 if (rtn) { in scsi_send_eh_cmnd()
1042 rtn = FAILED; in scsi_send_eh_cmnd()
1045 rtn = SUCCESS; in scsi_send_eh_cmnd()
1050 scsi_log_completion(scmd, rtn); in scsi_send_eh_cmnd()
1066 rtn = scsi_eh_completed_normally(scmd); in scsi_send_eh_cmnd()
1068 "%s: scsi_eh_completed_normally %x\n", __func__, rtn)); in scsi_send_eh_cmnd()
1070 switch (rtn) { in scsi_send_eh_cmnd()
1076 rtn = NEEDS_RETRY; in scsi_send_eh_cmnd()
1079 rtn = FAILED; in scsi_send_eh_cmnd()
1082 } else if (rtn != FAILED) { in scsi_send_eh_cmnd()
1084 rtn = FAILED; in scsi_send_eh_cmnd()
1089 return rtn; in scsi_send_eh_cmnd()
1106 static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) in scsi_eh_action() argument
1111 rtn = sdrv->eh_action(scmd, rtn); in scsi_eh_action()
1113 return rtn; in scsi_eh_action()
1161 int rtn; in scsi_eh_get_sense() local
1193 rtn = scsi_request_sense(scmd); in scsi_eh_get_sense()
1194 if (rtn != SUCCESS) in scsi_eh_get_sense()
1201 rtn = scsi_decide_disposition(scmd); in scsi_eh_get_sense()
1207 if (rtn == SUCCESS) in scsi_eh_get_sense()
1213 else if (rtn != NEEDS_RETRY) in scsi_eh_get_sense()
1233 int retry_cnt = 1, rtn; in scsi_eh_tur() local
1236 rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, in scsi_eh_tur()
1240 "%s return: %x\n", __func__, rtn)); in scsi_eh_tur()
1242 switch (rtn) { in scsi_eh_tur()
1327 int rtn; in scsi_eh_abort_cmds() local
1345 rtn = scsi_try_to_abort_cmd(shost->hostt, scmd); in scsi_eh_abort_cmds()
1346 if (rtn == FAILED) { in scsi_eh_abort_cmds()
1355 if (rtn == FAST_IO_FAIL) in scsi_eh_abort_cmds()
1376 int i, rtn = NEEDS_RETRY; in scsi_eh_try_stu() local
1378 for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) in scsi_eh_try_stu()
1379 rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0); in scsi_eh_try_stu()
1381 if (rtn == SUCCESS) in scsi_eh_try_stu()
1469 int rtn; in scsi_eh_bus_device_reset() local
1492 rtn = scsi_try_bus_device_reset(bdr_scmd); in scsi_eh_bus_device_reset()
1493 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_device_reset()
1495 rtn == FAST_IO_FAIL || in scsi_eh_bus_device_reset()
1500 scsi_eh_action(scmd, rtn) != FAILED) in scsi_eh_bus_device_reset()
1535 int rtn; in scsi_eh_target_reset() local
1556 rtn = scsi_try_target_reset(scmd); in scsi_eh_target_reset()
1557 if (rtn != SUCCESS && rtn != FAST_IO_FAIL) in scsi_eh_target_reset()
1567 if (rtn == SUCCESS) in scsi_eh_target_reset()
1569 else if (rtn == FAST_IO_FAIL) in scsi_eh_target_reset()
1593 int rtn; in scsi_eh_bus_reset() local
1630 rtn = scsi_try_bus_reset(chan_scmd); in scsi_eh_bus_reset()
1631 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_reset()
1634 if (rtn == FAST_IO_FAIL) in scsi_eh_bus_reset()
1664 int rtn; in scsi_eh_host_reset() local
1675 rtn = scsi_try_host_reset(scmd); in scsi_eh_host_reset()
1676 if (rtn == SUCCESS) { in scsi_eh_host_reset()
1678 } else if (rtn == FAST_IO_FAIL) { in scsi_eh_host_reset()
1771 int rtn; in scsi_decide_disposition() local
1908 rtn = scsi_check_sense(scmd); in scsi_decide_disposition()
1909 if (rtn == NEEDS_RETRY) in scsi_decide_disposition()
1915 return rtn; in scsi_decide_disposition()
2333 int error = 0, rtn, val; in scsi_ioctl_reset() local
2368 rtn = SUCCESS; in scsi_ioctl_reset()
2371 rtn = scsi_try_bus_device_reset(scmd); in scsi_ioctl_reset()
2372 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2376 rtn = scsi_try_target_reset(scmd); in scsi_ioctl_reset()
2377 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2381 rtn = scsi_try_bus_reset(scmd); in scsi_ioctl_reset()
2382 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2386 rtn = scsi_try_host_reset(scmd); in scsi_ioctl_reset()
2387 if (rtn == SUCCESS) in scsi_ioctl_reset()
2391 rtn = FAILED; in scsi_ioctl_reset()
2395 error = (rtn == SUCCESS) ? 0 : -EIO; in scsi_ioctl_reset()