From owner-freebsd-scsi@FreeBSD.ORG Sat May 7 10:09:19 2011 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49AD01065670 for ; Sat, 7 May 2011 10:09:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 933118FC13 for ; Sat, 7 May 2011 10:09:18 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA06217 for ; Sat, 07 May 2011 13:09:17 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QIeRo-0004CO-PZ for freebsd-scsi@freebsd.org; Sat, 07 May 2011 13:09:16 +0300 Message-ID: <4DC51A4C.5070603@FreeBSD.org> Date: Sat, 07 May 2011 13:09:16 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-scsi@FreeBSD.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: cam: pull logging of a number of conditions from under bootverbose X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:09:19 -0000 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