Lines Matching refs:rtn

143 	int rtn;  in scmd_eh_abort_handler()  local
153 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd); in scmd_eh_abort_handler()
154 if (rtn == SUCCESS) { in scmd_eh_abort_handler()
179 (rtn == FAST_IO_FAIL) ? in scmd_eh_abort_handler()
295 enum blk_eh_timer_return rtn = BLK_EH_DONE; in scsi_times_out() local
305 rtn = host->hostt->eh_timed_out(scmd); in scsi_times_out()
307 if (rtn == BLK_EH_DONE) { in scsi_times_out()
328 return rtn; in scsi_times_out()
798 int rtn; in scsi_try_host_reset() local
808 rtn = hostt->eh_host_reset_handler(scmd); in scsi_try_host_reset()
810 if (rtn == SUCCESS) { in scsi_try_host_reset()
818 return rtn; in scsi_try_host_reset()
828 int rtn; in scsi_try_bus_reset() local
838 rtn = hostt->eh_bus_reset_handler(scmd); in scsi_try_bus_reset()
840 if (rtn == SUCCESS) { in scsi_try_bus_reset()
848 return rtn; in scsi_try_bus_reset()
870 int rtn; in scsi_try_target_reset() local
877 rtn = hostt->eh_target_reset_handler(scmd); in scsi_try_target_reset()
878 if (rtn == SUCCESS) { in scsi_try_target_reset()
885 return rtn; in scsi_try_target_reset()
900 int rtn; in scsi_try_bus_device_reset() local
906 rtn = hostt->eh_device_reset_handler(scmd); in scsi_try_bus_device_reset()
907 if (rtn == SUCCESS) in scsi_try_bus_device_reset()
909 return rtn; in scsi_try_bus_device_reset()
1072 int rtn; in scsi_send_eh_cmnd() local
1098 rtn = shost->hostt->queuecommand(shost, scmd); in scsi_send_eh_cmnd()
1100 rtn = SCSI_MLQUEUE_DEVICE_BUSY; in scsi_send_eh_cmnd()
1103 if (rtn) { in scsi_send_eh_cmnd()
1112 rtn = FAILED; in scsi_send_eh_cmnd()
1115 rtn = SUCCESS; in scsi_send_eh_cmnd()
1120 scsi_log_completion(scmd, rtn); in scsi_send_eh_cmnd()
1136 rtn = scsi_eh_completed_normally(scmd); in scsi_send_eh_cmnd()
1138 "%s: scsi_eh_completed_normally %x\n", __func__, rtn)); in scsi_send_eh_cmnd()
1140 switch (rtn) { in scsi_send_eh_cmnd()
1146 rtn = NEEDS_RETRY; in scsi_send_eh_cmnd()
1149 rtn = FAILED; in scsi_send_eh_cmnd()
1152 } else if (rtn != FAILED) { in scsi_send_eh_cmnd()
1154 rtn = FAILED; in scsi_send_eh_cmnd()
1159 return rtn; in scsi_send_eh_cmnd()
1176 static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) in scsi_eh_action() argument
1181 rtn = sdrv->eh_action(scmd, rtn); in scsi_eh_action()
1183 return rtn; in scsi_eh_action()
1229 int rtn; in scsi_eh_get_sense() local
1260 rtn = scsi_request_sense(scmd); in scsi_eh_get_sense()
1261 if (rtn != SUCCESS) in scsi_eh_get_sense()
1268 rtn = scsi_decide_disposition(scmd); in scsi_eh_get_sense()
1274 if (rtn == SUCCESS) in scsi_eh_get_sense()
1287 else if (rtn != NEEDS_RETRY) in scsi_eh_get_sense()
1307 int retry_cnt = 1, rtn; in scsi_eh_tur() local
1310 rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, in scsi_eh_tur()
1314 "%s return: %x\n", __func__, rtn)); in scsi_eh_tur()
1316 switch (rtn) { in scsi_eh_tur()
1395 int i, rtn = NEEDS_RETRY; in scsi_eh_try_stu() local
1397 for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) in scsi_eh_try_stu()
1398 rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0); in scsi_eh_try_stu()
1400 if (rtn == SUCCESS) in scsi_eh_try_stu()
1489 int rtn; in scsi_eh_bus_device_reset() local
1513 rtn = scsi_try_bus_device_reset(bdr_scmd); in scsi_eh_bus_device_reset()
1514 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_device_reset()
1516 rtn == FAST_IO_FAIL || in scsi_eh_bus_device_reset()
1521 scsi_eh_action(scmd, rtn) != FAILED) in scsi_eh_bus_device_reset()
1556 int rtn; in scsi_eh_target_reset() local
1577 rtn = scsi_try_target_reset(scmd); in scsi_eh_target_reset()
1578 if (rtn != SUCCESS && rtn != FAST_IO_FAIL) in scsi_eh_target_reset()
1588 if (rtn == SUCCESS) in scsi_eh_target_reset()
1590 else if (rtn == FAST_IO_FAIL) in scsi_eh_target_reset()
1614 int rtn; in scsi_eh_bus_reset() local
1651 rtn = scsi_try_bus_reset(chan_scmd); in scsi_eh_bus_reset()
1652 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { in scsi_eh_bus_reset()
1655 if (rtn == FAST_IO_FAIL) in scsi_eh_bus_reset()
1685 int rtn; in scsi_eh_host_reset() local
1696 rtn = scsi_try_host_reset(scmd); in scsi_eh_host_reset()
1697 if (rtn == SUCCESS) { in scsi_eh_host_reset()
1699 } else if (rtn == FAST_IO_FAIL) { in scsi_eh_host_reset()
1793 int rtn; in scsi_decide_disposition() local
1929 rtn = scsi_check_sense(scmd); in scsi_decide_disposition()
1930 if (rtn == NEEDS_RETRY) in scsi_decide_disposition()
1936 return rtn; in scsi_decide_disposition()
2349 int error = 0, rtn, val; in scsi_ioctl_reset() local
2386 rtn = SUCCESS; in scsi_ioctl_reset()
2389 rtn = scsi_try_bus_device_reset(scmd); in scsi_ioctl_reset()
2390 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2394 rtn = scsi_try_target_reset(scmd); in scsi_ioctl_reset()
2395 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2399 rtn = scsi_try_bus_reset(scmd); in scsi_ioctl_reset()
2400 if (rtn == SUCCESS || (val & SG_SCSI_RESET_NO_ESCALATE)) in scsi_ioctl_reset()
2404 rtn = scsi_try_host_reset(scmd); in scsi_ioctl_reset()
2405 if (rtn == SUCCESS) in scsi_ioctl_reset()
2409 rtn = FAILED; in scsi_ioctl_reset()
2413 error = (rtn == SUCCESS) ? 0 : -EIO; in scsi_ioctl_reset()