From owner-svn-src-stable@freebsd.org Sun Aug 16 00:35:49 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F1BC9BAB6A; Sun, 16 Aug 2015 00:35:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6C8FFF6; Sun, 16 Aug 2015 00:35:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7G0ZmRI050981; Sun, 16 Aug 2015 00:35:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7G0ZmbT050980; Sun, 16 Aug 2015 00:35:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201508160035.t7G0ZmbT050980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 16 Aug 2015 00:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r286817 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2015 00:35:49 -0000 Author: mav Date: Sun Aug 16 00:35:48 2015 New Revision: 286817 URL: https://svnweb.freebsd.org/changeset/base/286817 Log: MFC r286514: Remove verbose CTL messages. Reporting SCSI errors to console is often useless, pollutes logs and may affect performance. For debugging there is kern.cam.ctl.debug sysctl Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sat Aug 15 22:55:32 2015 (r286816) +++ stable/10/sys/cam/ctl/ctl.c Sun Aug 16 00:35:48 2015 (r286817) @@ -1183,8 +1183,6 @@ ctl_init(void) ctl_pool_free(other_pool); return (error); } - if (bootverbose) - printf("ctl: CAM Target Layer loaded\n"); /* * Initialize the ioctl front end. @@ -1267,9 +1265,6 @@ ctl_shutdown(void) free(control_softc, M_DEVBUF); control_softc = NULL; - - if (bootverbose) - printf("ctl: CAM Target Layer unloaded\n"); } static int @@ -13635,7 +13630,7 @@ ctl_process_done(union ctl_io *io) case CTL_IO_SCSI: break; case CTL_IO_TASK: - if (bootverbose || (ctl_debug & CTL_DEBUG_INFO)) + if (ctl_debug & CTL_DEBUG_INFO) ctl_io_error_print(io, NULL); if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) ctl_free_io(io); @@ -13742,27 +13737,10 @@ bailout: /* * If enabled, print command error status. - * We don't print UAs unless debugging was enabled explicitly. */ - do { - if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) - break; - if (!bootverbose && (ctl_debug & CTL_DEBUG_INFO) == 0) - break; - if ((ctl_debug & CTL_DEBUG_INFO) == 0 && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR) && - (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) { - int error_code, sense_key, asc, ascq; - - scsi_extract_sense_len(&io->scsiio.sense_data, - io->scsiio.sense_len, &error_code, &sense_key, - &asc, &ascq, /*show_errors*/ 0); - if (sense_key == SSD_KEY_UNIT_ATTENTION) - break; - } - + if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS && + (ctl_debug & CTL_DEBUG_INFO) != 0) ctl_io_error_print(io, NULL); - } while (0); /* * Tell the FETD or the other shelf controller we're done with this