Date: Sat, 07 May 2011 13:09:16 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: freebsd-scsi@FreeBSD.org Subject: cam: pull logging of a number of conditions from under bootverbose Message-ID: <4DC51A4C.5070603@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DC51A4C.5070603>