From nobody Mon Oct 14 05:40:52 2024 X-Original-To: dev-commits-src-main@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 4XRmKx4Mp7z5ZCds; Mon, 14 Oct 2024 05:40:53 +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 4XRmKx0YKBz40y2; Mon, 14 Oct 2024 05:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884453; 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=JHPb2vz9NmkXCyOrOW3LmlF1fMB8RixBweo+uBYoPl0=; b=ltbp29bhvNsksHKUuY5oWoHga89eXoiWyfebW9O2Fv74cz5dUjwfkh++CVhzlXn+lM0QMj 6q6pp0Iwu58uSEel7LVXLEimr53eRZA/3uMI7saGu4Pbpx9WME2QN+Hh84uCheM2Ek6exg 2E5gGRQN7NrY1Qtttj/zDLS2mZ7j0XWAmx/VD/fvoI/Dru1Siff2vJlNxTQ69fkgsqv3Sl 1c0sIRlpRArwKFc5FkwfC8eYY1sBF9ek9HXdpUvYTA7GMzt/eoYk+pPKmhAn+JZK9ZSBIt wr6LIdFRW3yFLPMwQc71Rwu1o5vqsk/urz7q2L0gWtflOBAJTzBzmbxnhaLENw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728884453; 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=JHPb2vz9NmkXCyOrOW3LmlF1fMB8RixBweo+uBYoPl0=; b=WyxI1BL23gg5MiGpcJnrUZBzow9AHtufBNSUCAmktOh+y2qnmKffffAWHwHpEOdYIz0QuH RnKD3he6RKVWM2W11y90t5VWFTo+oQmkFGgCIGnGfRv6U2tosSxGh2E7y+qwfOWfuShK/t O6t4aI1FYBLyHhSkTfFO826gQxoCRFQF/NxySvLxT0IUVbCYCt1QwXKDMBbHzPYcywXPzA JXfAFWhZxPC6ZOI7Vthy29vpsMRl9u0eznOtvH2ttWMRa+6TQr5LZQrY5ARhiSjwUVk6Cn v8nZxpUv0EB83dbDDiKhobtKdlwiy15VH2vTPAwRgdsueYS9r7dhw7vu/7CgMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728884453; a=rsa-sha256; cv=none; b=n2MaYSzqSwwy9Pn5+rkKNtwd82ojUU5UVcF8QpIkMw0xtDs2w0zOXXkSEphZqXcQkho9mP svrG5aAZOGOAR33q6h84P/g9XeaRZZZX1rYhNIxxXkDDknpeDz6lALeI2cuXZb76VHQVxv y5RPWMdHvfXwA9cuhG+TmtmXSlRaGUV9odg7ul7TbFVSRskHsZN8Jx7oal8m6KVD5Ftv8Z asmOGrAU1TnanxssbXSNAuw1HhraaUiQTUBrmRgeNxeRL9jvK5mc9c1SaCedKNkEX6Qpnr 2TmD7QGn9iyjZKM+jLu49QiwYv20+ecMwVTEr2QQnbj04HkByy5IRhkOk+xwLw== 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 4XRmKw5mn7zQK6; Mon, 14 Oct 2024 05:40:52 +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 49E5eqMY089355; Mon, 14 Oct 2024 05:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49E5eqRR089352; Mon, 14 Oct 2024 05:40:52 GMT (envelope-from git) Date: Mon, 14 Oct 2024 05:40:52 GMT Message-Id: <202410140540.49E5eqRR089352@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: 74575d14284f - main - ciss: Add sysctl/tunable hw.ciss and hw.ciss.base_transfer_speed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 74575d14284fde2c7617ad14fd9a8bac897b4427 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=74575d14284fde2c7617ad14fd9a8bac897b4427 commit 74575d14284fde2c7617ad14fd9a8bac897b4427 Author: Peter Eriksson AuthorDate: 2024-10-14 04:01:33 +0000 Commit: Warner Losh CommitDate: 2024-10-14 05:23:08 +0000 ciss: Add sysctl/tunable hw.ciss and hw.ciss.base_transfer_speed Add a sysctl/tuneable to report a different base transfer speed than the default of 132*1024. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 866e67766818..06c7ed5f3318 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -242,6 +242,16 @@ static struct cdevsw ciss_cdevsw = { .d_name = "ciss", }; +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. + */ +static int ciss_base_transfer_speed = 132 * 1024; +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 at boot time and controls whether physical devices * that are marked hidden by the firmware should be exposed anyways. @@ -3029,7 +3039,7 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb) strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); - cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ + cpi->base_transfer_speed = ciss_base_transfer_speed; cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI;