From nobody Mon Oct 14 05:40:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XRmKy1vfXz5ZChh; Mon, 14 Oct 2024 05:40:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRmKy0LkFz40k2; Mon, 14 Oct 2024 05:40:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+u9fQZ+XSNQbPJsn6CL6AU0a4w7oAym0hMqBlOgPMo8=; b=ti4yrd/MHdxwe5l8ibaZyV98eeUJSgTG54Z98EQKvjWdcveMmpJSpbJTmlSrvkxniR7zpK bDuGmW5RSeJOqfcEOR79OoMPHPdboolLHCA2n0Ubft7yX2oE1ZK7SyW9XssguQPJmThsbU xiCiCgbVDfe+bA1azEWPuaMX/nB1kbD5gnhC7eXaI/oEbUiu/Mibms3t4QUzQnKviWTCru QVYqyjRaM2KvyQaRnoudUfTYioX6bQ5DZkCHNo4bztA1rDxxZRq2x4Fidm9zFn4GMPxfhr liIg1Vs6YOgpb/HrT4jH+TU5YVZ3fHfGiXoE0s8dSrrVZ4G53p+6sLL7YdifVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+u9fQZ+XSNQbPJsn6CL6AU0a4w7oAym0hMqBlOgPMo8=; b=JMAPBMqMKhHdNgUWTLcYt809N3jSURG4pENE2U6pcg4ORJto1ZUFlBgABA/yFdE2M82jk7 +znGkTVMqgG2r4u6xPfmNXxCyRjIJ7LrNl7EOG8JNsBb+j7f8VNwtbsKcy4ijqOsel/o2k cJOBtERkfB6AZ5G8X0bfeV02xExCeajKG6MtU/n+jIdhCfSRt2WM7QBu4tJpJQjjaBA7PH lXPG3kjSJN5HnoIiksSbLDWh6ApNWd2NbL/rnoD5RjttZA/jF5y2xyV7GyCdI7LKaqX/DX i3JgZpjb1UvHHoRDwOw9aNAer6v9JGpriNie6SbFhIExcvTuJ8AsrqCvEycu6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884454; a=rsa-sha256; cv=none; b=Ey9GnVuK5mQaDIEOp+mKRZ6Y3pE3xuIGuAtzEYYZdNVSgmHwnGJtOvHRXYv/tjeW9lO3wj eh27UHMyGqi9Q7hL1R8zsS+zM2Os+nIrzt63TtCNFposPFBjgBeqdT2oxAIVy1Wkl3mml2 57ZgHIC1KreZyKvf5xFcjmLctwnu8nfTynA8zMWhMoefZXDdG1UdrDufS2yE0n6GPuomCx 3vuxt1juSqyytoK84BMfr/7EVyTkh+APKfnYW64W0t4c4vOxebdOC6LlnusCqVaVOoOKuf RlXoeQGoZyPulPLpoI5xf6m1IyhQMwhKeYD3gzpKZzshTArJoFD5C9xrwqxHrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XRmKx6f1xzQRP; Mon, 14 Oct 2024 05:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49E5erpi089399; Mon, 14 Oct 2024 05:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5erhl089396; Mon, 14 Oct 2024 05:40:53 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:53 GMT Message-Id: <202410140540.49E5erhl089396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f373e6b866b9 - main - ciss: Add sysctl/tunable hw.ciss.verbose List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f373e6b866b9efafc66ccc5355e1ea0aeeedfb6a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f373e6b866b9efafc66ccc5355e1ea0aeeedfb6a commit f373e6b866b9efafc66ccc5355e1ea0aeeedfb6a Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:17 +0000 ciss: Add sysctl/tunable hw.ciss.verbose Add tuneable to turn on/off verbosity for debugging purposes. This is approximately the same as bootverbose, but will print even more information when > 1. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 06c7ed5f3318..168d1892e59d 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -252,6 +252,13 @@ SYSCTL_INT(_hw_ciss, OID_AUTO, base_transfer_speed, CTLFLAG_RDTUN, &ciss_base_transfer_speed, 0, "force a specific base transfer_speed"); +/* + * This tunable can be set to make the driver be more verbose + */ +static int ciss_verbose = 0; +SYSCTL_INT(_hw_ciss, OID_AUTO, verbose, CTLFLAG_RWTUN, &ciss_verbose, 0, + "enable verbose messages"); + /* * This tunable can be set at boot time and controls whether physical devices * that are marked hidden by the firmware should be exposed anyways. @@ -914,7 +921,7 @@ ciss_setup_msix(struct ciss_softc *sc) } sc->ciss_msi = val; - if (bootverbose) + if (bootverbose || ciss_verbose) ciss_printf(sc, "Using %d MSIX interrupt%s\n", val, (val != 1) ? "s" : ""); @@ -1132,7 +1139,7 @@ ciss_init_requests(struct ciss_softc *sc) debug_called(1); - if (bootverbose) + if (bootverbose || ciss_verbose) ciss_printf(sc, "using %d of %d available commands\n", sc->ciss_max_requests, sc->ciss_cfg->max_outstanding_commands); @@ -1264,13 +1271,22 @@ ciss_identify_adapter(struct ciss_softc *sc) if (sc->ciss_cfg->max_physical_supported == 0) sc->ciss_cfg->max_physical_supported = CISS_MAX_PHYSICAL; /* print information */ - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, " %d logical drive%s configured\n", sc->ciss_id->configured_logical_drives, (sc->ciss_id->configured_logical_drives == 1) ? "" : "s"); ciss_printf(sc, " firmware %4.4s\n", sc->ciss_id->running_firmware_revision); ciss_printf(sc, " %d SCSI channels\n", sc->ciss_id->scsi_chip_count); + if (ciss_verbose > 1) { + ciss_printf(sc, " %d FC channels\n", sc->ciss_id->fibre_chip_count); + ciss_printf(sc, " %d enclosures\n", sc->ciss_id->bEnclosureCount); + ciss_printf(sc, " %d expanders\n", sc->ciss_id->bExpanderCount); + ciss_printf(sc, " maximum blocks: %d\n", sc->ciss_id->maximum_blocks); + ciss_printf(sc, " controller clock: %d\n", sc->ciss_id->controller_clock); + ciss_printf(sc, " %d MB controller memory\n", sc->ciss_id->total_controller_mem_mb); + } + ciss_printf(sc, " signature '%.4s'\n", sc->ciss_cfg->signature); ciss_printf(sc, " valence %d\n", sc->ciss_cfg->valence); ciss_printf(sc, " supported I/O methods 0x%b\n", @@ -1436,7 +1452,7 @@ ciss_init_logical(struct ciss_softc *sc) /* * Save logical drive information. */ - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, "%d logical drive%s\n", ndrives, (ndrives > 1 || ndrives == 0) ? "s" : ""); } @@ -1511,7 +1527,7 @@ ciss_init_physical(struct ciss_softc *sc) nphys = (ntohl(cll->list_size) / sizeof(union ciss_device_address)); - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, "%d physical device%s\n", nphys, (nphys > 1 || nphys == 0) ? "s" : ""); } @@ -1779,7 +1795,7 @@ ciss_identify_logical(struct ciss_softc *sc, struct ciss_ldrive *ld) /* * Print the drive's basic characteristics. */ - if (bootverbose) { + if (bootverbose || ciss_verbose) { ciss_printf(sc, "logical drive (b%dt%d): %s, %dMB ", CISS_LUN_TO_BUS(ld->cl_address.logical.lun), CISS_LUN_TO_TARGET(ld->cl_address.logical.lun),