diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 1999-10-16 23:53:09 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 1999-10-16 23:53:09 +0000 |
| commit | af51b059b591ffe6af89d8114a5de9547291865f (patch) | |
| tree | ded5e6bfaab51b648a4ae9fe1aeedc92cc4f6916 | |
| parent | 0642b69a16bb31a2993d93ee39f7daeea3b50a01 (diff) | |
Notes
| -rw-r--r-- | sys/cam/cam_periph.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 6ed5ddf76ef07..089c5f095ab4d 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1522,15 +1522,18 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, /* * Restart the queue after either another * command completes or a 1 second timeout. + * If we have any retries left, that is. */ - /* - * XXX KDM ask JTG about this again, do we need to - * be looking at the retry count here? - */ - error = ERESTART; - relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT - | RELSIM_RELEASE_AFTER_CMDCMPLT; - timeout = 1000; + retry = ccb->ccb_h.retry_count > 0; + if (retry) { + ccb->ccb_h.retry_count--; + error = ERESTART; + relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT + | RELSIM_RELEASE_AFTER_CMDCMPLT; + timeout = 1000; + } else { + error = EIO; + } break; case SCSI_STATUS_RESERV_CONFLICT: error = EIO; |
