summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_periph.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-10-23 13:39:30 +0000
committermav <mav@FreeBSD.org>2009-10-23 13:39:30 +0000
commite0351f030b433a4f2b7d50ed4a1e133392faf49a (patch)
tree31a34e05adbc99ead212660bddde8a0ecb1adce1 /sys/cam/cam_periph.c
parent552ae71ff30535a56b02d64161049180ff9df479 (diff)
downloadFreeBSD-src-e0351f030b433a4f2b7d50ed4a1e133392faf49a.zip
FreeBSD-src-e0351f030b433a4f2b7d50ed4a1e133392faf49a.tar.gz
Make "Retrying Command" to be printed before actual retrying.
It should make debug/error log a bit more readable.
Diffstat (limited to 'sys/cam/cam_periph.c')
-rw-r--r--sys/cam/cam_periph.c39
1 files changed, 17 insertions, 22 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 1a67a0c..14b655d 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1767,16 +1767,27 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
break;
}
+ /*
+ * If we have and error and are booting verbosely, whine
+ * *unless* this was a non-retryable selection timeout.
+ */
+ if (error != 0 && bootverbose &&
+ !(status == CAM_SEL_TIMEOUT && (camflags & CAM_RETRY_SELTO) == 0)) {
+ if (error != ERESTART) {
+ if (action_string == NULL)
+ action_string = "Unretryable Error";
+ xpt_print(ccb->ccb_h.path, "error %d\n", error);
+ xpt_print(ccb->ccb_h.path, "%s\n", action_string);
+ } else
+ xpt_print(ccb->ccb_h.path, "Retrying Command\n");
+ }
+
/* Attempt a retry */
- if (error == ERESTART || error == 0) {
+ if (error == ERESTART || error == 0) {
if (frozen != 0)
ccb->ccb_h.status &= ~CAM_DEV_QFRZN;
-
- if (error == ERESTART) {
- action_string = "Retrying Command";
+ if (error == ERESTART)
xpt_action(ccb);
- }
-
if (frozen != 0)
cam_release_devq(ccb->ccb_h.path,
relsim_flags,
@@ -1785,21 +1796,5 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
/*getcount_only*/0);
}
- /*
- * If we have and error and are booting verbosely, whine
- * *unless* this was a non-retryable selection timeout.
- */
- if (error != 0 && bootverbose &&
- !(status == CAM_SEL_TIMEOUT && (camflags & CAM_RETRY_SELTO) == 0)) {
-
-
- if (action_string == NULL)
- action_string = "Unretryable Error";
- if (error != ERESTART) {
- xpt_print(ccb->ccb_h.path, "error %d\n", error);
- }
- xpt_print(ccb->ccb_h.path, "%s\n", action_string);
- }
-
return (error);
}
OpenPOWER on IntegriCloud