Lines Matching refs:rtn

121 	int rtn;
132 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd);
133 if (rtn == SUCCESS) {
160 "scmd %p abort failed, rtn %d\n",
161 scmd, rtn));
276 enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED;
286 rtn = host->transportt->eh_timed_out(scmd);
288 rtn = host->hostt->eh_timed_out(scmd);
290 if (rtn == BLK_EH_NOT_HANDLED) {
297 rtn = BLK_EH_HANDLED;
300 return rtn;
323 "%s: rtn: %d\n", __func__, online));
758 int rtn;
768 rtn = hostt->eh_host_reset_handler(scmd);
770 if (rtn == SUCCESS) {
778 return rtn;
788 int rtn;
798 rtn = hostt->eh_bus_reset_handler(scmd);
800 if (rtn == SUCCESS) {
808 return rtn;
830 int rtn;
837 rtn = hostt->eh_target_reset_handler(scmd);
838 if (rtn == SUCCESS) {
845 return rtn;
860 int rtn;
866 rtn = hostt->eh_device_reset_handler(scmd);
867 if (rtn == SUCCESS)
869 return rtn;
1012 int rtn;
1020 rtn = shost->hostt->queuecommand(shost, scmd);
1021 if (rtn) {
1030 rtn = NEEDS_RETRY;
1033 rtn = SUCCESS;
1038 scsi_log_completion(scmd, rtn);
1050 * ->queuecommand() kept returning non zero, use the rtn = FAILED
1054 rtn = scsi_eh_completed_normally(scmd);
1056 "%s: scsi_eh_completed_normally %x\n", __func__, rtn));
1058 switch (rtn) {
1064 rtn = NEEDS_RETRY;
1067 rtn = FAILED;
1070 } else if (!rtn) {
1072 rtn = FAILED;
1077 return rtn;
1094 static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn)
1099 rtn = sdrv->eh_action(scmd, rtn);
1101 return rtn;
1149 int rtn;
1176 rtn = scsi_request_sense(scmd);
1177 if (rtn != SUCCESS)
1185 rtn = scsi_decide_disposition(scmd);
1191 if (rtn == SUCCESS)
1197 else if (rtn != NEEDS_RETRY)
1217 int retry_cnt = 1, rtn;
1220 rtn = scsi_send_eh_cmnd(scmd, tur_command, 6,
1224 "%s: scmd %p rtn %x\n", __func__, scmd, rtn));
1226 switch (rtn) {
1311 int rtn;
1330 rtn = scsi_try_to_abort_cmd(shost->hostt, scmd);
1331 if (rtn == FAILED) {
1340 if (rtn == FAST_IO_FAIL)
1361 int i, rtn = NEEDS_RETRY;
1363 for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
1364 rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);
1366 if (rtn == SUCCESS)
1454 int rtn;
1478 rtn = scsi_try_bus_device_reset(bdr_scmd);
1479 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) {
1481 rtn == FAST_IO_FAIL ||
1486 scsi_eh_action(scmd, rtn) != FAILED)
1522 int rtn;
1543 rtn = scsi_try_target_reset(scmd);
1544 if (rtn != SUCCESS && rtn != FAST_IO_FAIL)
1554 if (rtn == SUCCESS)
1556 else if (rtn == FAST_IO_FAIL)
1580 int rtn;
1617 rtn = scsi_try_bus_reset(chan_scmd);
1618 if (rtn == SUCCESS || rtn == FAST_IO_FAIL) {
1621 if (rtn == FAST_IO_FAIL)
1651 int rtn;
1662 rtn = scsi_try_host_reset(scmd);
1663 if (rtn == SUCCESS) {
1665 } else if (rtn == FAST_IO_FAIL) {
1758 int rtn;
1895 rtn = scsi_check_sense(scmd);
1896 if (rtn == NEEDS_RETRY)
1898 /* if rtn == FAILED, we have no sense information;
1902 return rtn;
2319 int rtn;
2325 rtn = FAILED;
2331 rtn = FAILED;
2354 rtn = scsi_try_bus_device_reset(scmd);
2355 if (rtn == SUCCESS)
2359 rtn = scsi_try_target_reset(scmd);
2360 if (rtn == SUCCESS)
2364 rtn = scsi_try_bus_reset(scmd);
2365 if (rtn == SUCCESS)
2369 rtn = scsi_try_host_reset(scmd);
2372 rtn = FAILED;
2394 return rtn;