Lines Matching refs:rtn

135 	int rtn;  in scmd_eh_abort_handler()  local
145 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd); in scmd_eh_abort_handler()
146 if (rtn == SUCCESS) { in scmd_eh_abort_handler()
171 (rtn == FAST_IO_FAIL) ? in scmd_eh_abort_handler()
287 enum blk_eh_timer_return rtn = BLK_EH_DONE; in scsi_times_out() local
297 rtn = host->hostt->eh_timed_out(scmd); in scsi_times_out()
299 if (rtn == BLK_EH_DONE) { in scsi_times_out()
320 return rtn; in scsi_times_out()
790 int rtn; in scsi_try_host_reset() local
800 rtn = hostt->eh_host_reset_handler(scmd); in scsi_try_host_reset()
802 if (rtn == SUCCESS) { in scsi_try_host_reset()
810 return rtn; in scsi_try_host_reset()
820 int rtn; in scsi_try_bus_reset() local
830 rtn = hostt->eh_bus_reset_handler(scmd); in scsi_try_bus_reset()
832 if (rtn == SUCCESS) { in scsi_try_bus_reset()
840 return rtn; in scsi_try_bus_reset()
862 int rtn; in scsi_try_target_reset() local
869 rtn = hostt->eh_target_reset_handler(scmd); in scsi_try_target_reset()
870 if (rtn == SUCCESS) { in scsi_try_target_reset()
877 return rtn; in scsi_try_target_reset()
892 int rtn; in scsi_try_bus_device_reset() local
898 rtn = hostt->eh_device_reset_handler(scmd); in scsi_try_bus_device_reset()
899 if (rtn == SUCCESS) in scsi_try_bus_device_reset()
901 return rtn; in scsi_try_bus_device_reset()
1064 int rtn; in scsi_send_eh_cmnd() local
1090 rtn = shost->hostt->queuecommand(shost, scmd); in scsi_send_eh_cmnd()
1092 rtn = SCSI_MLQUEUE_DEVICE_BUSY; in scsi_send_eh_cmnd()
1095 if (rtn) { in scsi_send_eh_cmnd()
1104 rtn = FAILED; in scsi_send_eh_cmnd()
1107 rtn = SUCCESS; in scsi_send_eh_cmnd()
1112 scsi_log_completion(scmd, rtn); in scsi_send_eh_cmnd()
1128 rtn = scsi_eh_completed_normally(scmd); in scsi_send_eh_cmnd()
1130 "%s: scsi_eh_completed_normally %x\n", __func__, rtn)); in scsi_send_eh_cmnd()
1132 switch (rtn) { in scsi_send_eh_cmnd()
1138 rtn = NEEDS_RETRY; in scsi_send_eh_cmnd()
1141 rtn = FAILED; in scsi_send_eh_cmnd()
1144 } else if (rtn != FAILED) { in scsi_send_eh_cmnd()
1146 rtn = FAILED; in scsi_send_eh_cmnd()
1151 return rtn; in scsi_send_eh_cmnd()
1168 static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) in scsi_eh_action() argument
1173 rtn = sdrv->eh_action(scmd, rtn); in scsi_eh_action()
1175 return rtn; in scsi_eh_action()
1221 int rtn; in scsi_eh_get_sense() local
1252 rtn = scsi_request_sense(scmd); in scsi_eh_get_sense()
1253 if (rtn != SUCCESS) in scsi_eh_get_sense()
1260 rtn = scsi_decide_disposition(scmd); in scsi_eh_get_sense()
1266 if (rtn == SUCCESS) in scsi_eh_get_sense()
1272 else if (rtn != NEEDS_RETRY) in scsi_eh_get_sense()
1292 int retry_cnt = 1, rtn; in scsi_eh_tur() local
1295 rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, in scsi_eh_tur()
1299 "%s return: %x\n", __func__, rtn)); in scsi_eh_tur()
1301 switch (rtn) { in scsi_eh_tur()
1380 int i, rtn = NEEDS_RETRY; in scsi_eh_try_stu() local
1382 for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) in scsi_eh_try_stu()
1383 rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0); in scsi_eh_try_stu()
1385 if (rtn == SUCCESS) in scsi_eh_try_stu()
1473 int rtn; in scsi_eh_bus_device_reset() local
1496 rtn = scsi_try_bus_device_reset(bdr_scmd); in scsi_eh_bus_device_reset()
1497 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_device_reset()
1499 rtn == FAST_IO_FAIL || in scsi_eh_bus_device_reset()
1504 scsi_eh_action(scmd, rtn) != FAILED) in scsi_eh_bus_device_reset()
1539 int rtn; in scsi_eh_target_reset() local
1560 rtn = scsi_try_target_reset(scmd); in scsi_eh_target_reset()
1561 if (rtn != SUCCESS && rtn != FAST_IO_FAIL) in scsi_eh_target_reset()
1571 if (rtn == SUCCESS) in scsi_eh_target_reset()
1573 else if (rtn == FAST_IO_FAIL) in scsi_eh_target_reset()
1597 int rtn; in scsi_eh_bus_reset() local
1634 rtn = scsi_try_bus_reset(chan_scmd); in scsi_eh_bus_reset()
1635 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_reset()
1638 if (rtn == FAST_IO_FAIL) in scsi_eh_bus_reset()
1668 int rtn; in scsi_eh_host_reset() local
1679 rtn = scsi_try_host_reset(scmd); in scsi_eh_host_reset()
1680 if (rtn == SUCCESS) { in scsi_eh_host_reset()
1682 } else if (rtn == FAST_IO_FAIL) { in scsi_eh_host_reset()
1776 int rtn; in scsi_decide_disposition() local
1912 rtn = scsi_check_sense(scmd); in scsi_decide_disposition()
1913 if (rtn == NEEDS_RETRY) in scsi_decide_disposition()
1919 return rtn; in scsi_decide_disposition()
2334 int error = 0, rtn, val; in scsi_ioctl_reset() local
2371 rtn = SUCCESS; in scsi_ioctl_reset()
2374 rtn = scsi_try_bus_device_reset(scmd); in scsi_ioctl_reset()
2375 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2379 rtn = scsi_try_target_reset(scmd); in scsi_ioctl_reset()
2380 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2384 rtn = scsi_try_bus_reset(scmd); in scsi_ioctl_reset()
2385 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2389 rtn = scsi_try_host_reset(scmd); in scsi_ioctl_reset()
2390 if (rtn == SUCCESS) in scsi_ioctl_reset()
2394 rtn = FAILED; in scsi_ioctl_reset()
2398 error = (rtn == SUCCESS) ? 0 : -EIO; in scsi_ioctl_reset()