Date: Thu, 30 Apr 2026 19:54:02 +0000 From: Michael Osipov <michaelo@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: ea1764e5fcf0 - main - mfi(4)/mrsas(4): Set sysctl name for driver versions consistently Message-ID: <69f3b35a.3e0c3.1696fe86@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=ea1764e5fcf0fc11680dc104e663ae3d1d0fd7be commit ea1764e5fcf0fc11680dc104e663ae3d1d0fd7be Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2026-02-25 19:48:34 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-04-30 19:53:47 +0000 mfi(4)/mrsas(4): Set sysctl name for driver versions consistently Instead of printing the driver version over and over again if multiple controllers are used, set a sysctl name for the used driver version. Approved by: imp, ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56110 --- sys/dev/mfi/mfi.c | 7 ++++--- sys/dev/mrsas/mrsas.c | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 6f94e4203f1a..767d5ba0902c 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -371,9 +371,6 @@ mfi_attach(struct mfi_softc *sc) if (sc == NULL) return EINVAL; - device_printf(sc->mfi_dev, "LSI MegaRAID SAS driver version: %s\n", - MEGASAS_VERSION); - mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF); sx_init(&sc->mfi_config_lock, "MFI config"); TAILQ_INIT(&sc->mfi_ld_tqh); @@ -764,6 +761,10 @@ mfi_attach(struct mfi_softc *sc) sc->mfi_cdev, "%s", "megaraid_sas_ioctl_node"); if (sc->mfi_cdev != NULL) sc->mfi_cdev->si_drv1 = sc; + SYSCTL_ADD_STRING(device_get_sysctl_ctx(sc->mfi_dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->mfi_dev)), + OID_AUTO, "driver_version", CTLFLAG_RD, MEGASAS_VERSION, + strlen(MEGASAS_VERSION), "driver version"); SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->mfi_dev), SYSCTL_CHILDREN(device_get_sysctl_tree(sc->mfi_dev)), OID_AUTO, "delete_busy_volumes", CTLFLAG_RW, diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 379fcbcb19ca..e8f43ad52ed8 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -824,9 +824,6 @@ mrsas_attach(device_t dev) struct mrsas_softc *sc = device_get_softc(dev); uint32_t cmd, error; - device_printf(dev, "AVAGO MegaRAID SAS driver version: %s\n", - MRSAS_VERSION); - memset(sc, 0, sizeof(struct mrsas_softc)); /* Look up our softc and initialize its fields. */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f3b35a.3e0c3.1696fe86>
