From nobody Mon Oct 14 05:41:01 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 4XRmL65V9Sz5ZCky; Mon, 14 Oct 2024 05:41:02 +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 4XRmL62rZYz40tb; Mon, 14 Oct 2024 05:41:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884462; 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=gDx2VEMsUuycjJZuJSVEhw69189jw2SIYepsjURlzXg=; b=ahR0UCW0gvQJYVNgbAgYPdiNLy506IFaQrTi7OvIzwjaArJeJ3xmdWZqOOJ5G/XExYreaX Bi2yzWWazo1N6a7Bp1ZrJaPTxIgplUItDN8WQoQ1uDU+PVN6zSunvjXSTt+B6jZw7DFML7 jn4QLuzCGlqRxl+3LLZxnXgd20URouqfh9OfnZHfDzU2p5KnXtoqGLuRM+OIgjR3yktfOS McgWnBxOrIRRDDlLHQy+AxiDmMMlzwYWvdk1FVbXm1rHShE49154XWVG6+po8pv57Hf2it 25RxI9ZrzThU3iOtfdj8sCInVjwAJez3C1lBdnmS/RrV2dDmE1tzQRsLQ80fZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884462; 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=gDx2VEMsUuycjJZuJSVEhw69189jw2SIYepsjURlzXg=; b=tu3vhOeGcWwlK9FfWaUGqnxl3zCceKFi7hJF/XgLRF9H8GYQ7QRlUhbfe/HaLckCnLv7FN wIxTOfAY3x8B2F4vsKExHOUB60DFzi5ya557E8H656+dGg0gJEj/Q5I451tioHumbqsGML AG8cDaI/IV6G8Hkcc1m21M32RJsx5malAHKUQ9cqeOob3B4SrIz7oQWlh9YxYr8XZNXLsH Dvo+gnHMerHs15GlycWWAkqwoMqbNTpcNo+gGhbYD4E3hYtjzHJvTkMdBA56Dgin6jFGD8 20J4np/ZI3jBbH/LoYRScUQIy184j4EmuDuSh+fBmBrfAUNS+hcDJ9CM2oTCFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884462; a=rsa-sha256; cv=none; b=uuzFVZSy1D24A5+88xzQDkpW9TdoN3wHYvHvvJQ56MGQr7FD1heBEqTjotYzOze/ycmp36 CJvcMB22FbK51w9KCIruVoON/RRvwVCfiR/SHmkcdRFcwtnor4rCbsvI+WkoiuSulA1aZM uRbXKAKs9VFARomQsMSOuK9feb69IWctLpJ5+7q+jcVnMcuTckwooHX3TL0kY654vzhSpf uF48xp8Xj9owgfwWAdwv8AaMyg2vXBMs5dYAFbK7hJcPJRmR3qZ/jMegwH7TuKqZvPymwZ JNizyf8gkDHluPk3+MbxQ+Afb/OFVdZ+Pbp0Y0A5Nay/SYxl2a59u0Y8pYzbcg== 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 4XRmL56qdjzQfs; Mon, 14 Oct 2024 05:41:01 +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 49E5f1ZG089742; Mon, 14 Oct 2024 05:41:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5f1Ev089739; Mon, 14 Oct 2024 05:41:01 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:41:01 GMT Message-Id: <202410140541.49E5f1Ev089739@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: fd95966af50b - main - ciss: hw.ciss.initator_id to set the initiator ID 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: fd95966af50bab6229bc5e67fadc7ffd915f77f5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd95966af50bab6229bc5e67fadc7ffd915f77f5 commit fd95966af50bab6229bc5e67fadc7ffd915f77f5 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:37:46 +0000 ciss: hw.ciss.initator_id to set the initiator ID Add hw.ciss.inititor_id to set the initiator to something other than the default. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index a6071735c87b..d4786302d928 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -245,7 +245,15 @@ static struct cdevsw ciss_cdevsw = { SYSCTL_NODE(_hw, OID_AUTO, ciss, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CISS sysctl tunables"); /* - * This tunable can be used to force a specific value for transfer speed. + * This tunable can be used to force a specific initiator id + */ +static int ciss_initiator_id = CAM_TARGET_WILDCARD; +SYSCTL_INT(_hw_ciss, OID_AUTO, initiator_id, CTLFLAG_RDTUN, + &ciss_initiator_id, 0, + "force a specific initiator id"); + +/* + * This tunable can be used to force a specific initiator id */ static int ciss_base_transfer_speed = 132 * 1024; SYSCTL_INT(_hw_ciss, OID_AUTO, base_transfer_speed, CTLFLAG_RDTUN, @@ -3073,7 +3081,10 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb) cpi->hba_misc = 0; cpi->max_target = MAX(sc->ciss_max_physical_target, sc->ciss_cfg->max_logical_supported); cpi->max_lun = 0; /* 'logical drive' channel only */ - cpi->initiator_id = sc->ciss_cfg->max_logical_supported; + if (ciss_initiator_id != CAM_TARGET_WILDCARD) + cpi->initiator_id = ciss_initiator_id; + else + cpi->initiator_id = sc->ciss_cfg->max_logical_supported; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "CISS", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);