summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-08-09 09:54:29 +0000
committermav <mav@FreeBSD.org>2015-08-09 09:54:29 +0000
commit30a2b84ce8d55ac387fdd09308fec2ac49bbd03c (patch)
tree9c2db8ab6d15ec415f27f4a7cd2612cc51d8a1eb
parent8de2d0e8336f8a1e2d4ae423abd6db19c039e7d9 (diff)
downloadFreeBSD-src-30a2b84ce8d55ac387fdd09308fec2ac49bbd03c.zip
FreeBSD-src-30a2b84ce8d55ac387fdd09308fec2ac49bbd03c.tar.gz
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 MFC after: 1 week
-rw-r--r--sys/cam/ctl/ctl.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 1b6c149..bdf5e6a 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -1188,8 +1188,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.
@@ -1272,9 +1270,6 @@ ctl_shutdown(void)
free(control_softc, M_DEVBUF);
control_softc = NULL;
-
- if (bootverbose)
- printf("ctl: CAM Target Layer unloaded\n");
}
static int
@@ -13651,7 +13646,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);
@@ -13758,27 +13753,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
OpenPOWER on IntegriCloud