From 2cb2c64704541dc972ea93a0297bb6f5c33880b8 Mon Sep 17 00:00:00 2001 From: trasz Date: Wed, 7 May 2014 06:24:46 +0000 Subject: [PATCH] MFC r263979: 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. Sponsored by: The FreeBSD Foundation --- sys/cam/ctl/ctl.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index a1f97948aeb6..6203b393a665 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -325,6 +325,10 @@ static int worker_threads = 1; TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads); SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, &worker_threads, 1, "Number of worker threads"); +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) @@ -12351,7 +12355,8 @@ ctl_process_done(union ctl_io *io, int have_lock) 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 @@ -12607,7 +12612,8 @@ ctl_process_done(union ctl_io *io, int have_lock) "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) @@ -12618,7 +12624,8 @@ ctl_process_done(union ctl_io *io, int have_lock) 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)