Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2014 08:24:08 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
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
Message-ID:  <201405080824.s488O85F085830@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405080824.s488O85F085830>