Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 2009 13:39:30 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198394 - head/sys/cam
Message-ID:  <200910231339.n9NDdUTP062088@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Oct 23 13:39:30 2009
New Revision: 198394
URL: http://svn.freebsd.org/changeset/base/198394

Log:
  Make "Retrying Command" to be printed before actual retrying.
  It should make debug/error log a bit more readable.

Modified:
  head/sys/cam/cam_periph.c

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c	Fri Oct 23 13:35:00 2009	(r198393)
+++ head/sys/cam/cam_periph.c	Fri Oct 23 13:39:30 2009	(r198394)
@@ -1767,16 +1767,27 @@ cam_periph_error(union ccb *ccb, cam_fla
 		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_fla
 					 /*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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910231339.n9NDdUTP062088>