From owner-svn-src-all@FreeBSD.ORG Thu May 8 08:24:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FFCEFF4; Thu, 8 May 2014 08:24:09 +0000 (UTC) Received: from svn.freebsd.org (svn.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 13349E28; Thu, 8 May 2014 08:24:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s488O8N0085831; Thu, 8 May 2014 08:24:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s488O85F085830; Thu, 8 May 2014 08:24:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405080824.s488O85F085830@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 08:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265656 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 08:24:09 -0000 Author: mav Date: Thu May 8 08:24:08 2014 New Revision: 265656 URL: http://svnweb.freebsd.org/changeset/base/265656 Log: MFC r263979 (by trasz): Hide CTL messages about SCSI error responses. Too many users take them for actual target errors. They can be enabled back by setting kern.cam.ctl.verbose=1, or booting with bootverbose. Modified: stable/9/sys/cam/ctl/ctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Thu May 8 08:23:24 2014 (r265655) +++ stable/9/sys/cam/ctl/ctl.c Thu May 8 08:24:08 2014 (r265656) @@ -324,6 +324,10 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CT SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0, "Disable CTL"); TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable); +static int verbose = 0; +TUNABLE_INT("kern.cam.ctl.verbose", &verbose); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verbose, CTLFLAG_RWTUN, + &verbose, 0, "Show SCSI errors returned to initiator"); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -12264,7 +12268,8 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_SCSI: break; case CTL_IO_TASK: - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) ctl_free_io(io); else @@ -12520,7 +12525,8 @@ ctl_process_done(union ctl_io *io, int h "skipped", skipped_prints); #endif } - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); } } else { if (have_lock == 0) @@ -12531,7 +12537,8 @@ ctl_process_done(union ctl_io *io, int h case CTL_IO_TASK: if (have_lock == 0) mtx_unlock(&ctl_softc->ctl_lock); - ctl_io_error_print(io, NULL); + if (bootverbose || verbose > 0) + ctl_io_error_print(io, NULL); break; default: if (have_lock == 0)