cam: pull logging of a number of conditions from under bootverbose

Andriy Gapon avg at FreeBSD.org
Sat May 7 10:09:19 UTC 2011


I wonder why those error reports are hidden under bootverbose.
They all seem to be sufficiently serious (and abnormal with non-faulty hardware)
to be always reported.

    [test] cam: pull logging of a number of conditions from under bootverbose

diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index dd51bca..4b4dce6 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1717,40 +1717,40 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
 		error = EIO;	/* we have to kill the command */
 		break;
 	case CAM_ATA_STATUS_ERROR:
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print(ccb->ccb_h.path, "ATA status error\n");
 			cam_error_print(ccb, CAM_ESF_ALL, CAM_EPF_ALL);
 			printed++;
 		}
 		/* FALLTHROUGH */
 	case CAM_REQ_CMP_ERR:
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print(ccb->ccb_h.path,
 			    "Request completed with CAM_REQ_CMP_ERR\n");
 			printed++;
 		}
 		/* FALLTHROUGH */
 	case CAM_CMD_TIMEOUT:
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print(ccb->ccb_h.path, "Command timed out\n");
 			printed++;
 		}
 		/* FALLTHROUGH */
 	case CAM_UNEXP_BUSFREE:
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print(ccb->ccb_h.path, "Unexpected Bus Free\n");
 			printed++;
 		}
 		/* FALLTHROUGH */
 	case CAM_UNCOR_PARITY:
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print(ccb->ccb_h.path,
 			    "Uncorrected parity error\n");
 			printed++;
 		}
 		/* FALLTHROUGH */
 	case CAM_DATA_RUN_ERR:
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print(ccb->ccb_h.path, "Data overrun\n");
 			printed++;
 		}
@@ -1779,7 +1779,7 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,

 				ccb->ccb_h.retry_count--;
 				error = ERESTART;
-				if (bootverbose && printed == 0) {
+				if (printed == 0) {
 					xpt_print(ccb->ccb_h.path,
 					    "Selection timeout\n");
 					printed++;
@@ -1830,7 +1830,7 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
 		 * these events and should be unconditionally
 		 * retried.
 		 */
-		if (bootverbose && printed == 0) {
+		if (printed == 0) {
 			xpt_print_path(ccb->ccb_h.path);
 			if (status == CAM_BDR_SENT)
 				printf("Bus Device Reset sent\n");
@@ -1863,7 +1863,7 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
 		if (ccb->ccb_h.retry_count > 0) {
 			ccb->ccb_h.retry_count--;
 			error = ERESTART;
-			if (bootverbose && printed == 0) {
+			if (printed == 0) {
 				xpt_print(ccb->ccb_h.path, "CAM status 0x%x\n",
 				    status);
 				printed++;

-- 
Andriy Gapon


More information about the freebsd-scsi mailing list