From nobody Tue Jun 27 03:38:29 2023 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 4Qqr5x2n2Rz4jr8D; Tue, 27 Jun 2023 03:38:29 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qqr5x2JLcz3Lxq; Tue, 27 Jun 2023 03:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837109; 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=5vL889eaMW6uk7nIb6m1inud6tP04O4sc7gFj4imjUc=; b=PQqsTNzVsNw5wblautzzuG33Dw4hKCA6jP3yEsKOj2BGMZB6ux4go0wQoj/lKVqwUPeO6S dcsXSoiWg+bTg91IPnbQvkoyOOJFnokqwLTuhngm1VwGeixUyv6t1DM8sJBWbsqxxPJnh0 M8MUSowp0EWkjzwx01eRJo7A3CRtD3654sd7d7JdKbyTzxqg9rP9rYQYPo7TX9ngZa6w9B V4+iUJsQF2WnGX5/dCn0UHYTcXO7X4RLPV/WxXudUelRslGqD+HLNSeXXxJU8cygklSDVQ QxOyg/3h9NXfhdRx7WVwjdySN/RCVt8FehZUd7j28eOLSdToFzmsw8Zdq6Ac9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837109; 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=5vL889eaMW6uk7nIb6m1inud6tP04O4sc7gFj4imjUc=; b=e6AAfM12coPUmyHvntsE8Bp11Iec9xYTTZJQwEc0LnQ8sViGKo2XvfScdioo+ScnGQvWdU o7PbkzIWerrnle8xOQuur9gTWPTFnEczOKR0JSBJ9QhpQuwkJlvyOHMlW/lp1ft4sApxK4 5lL3UuiC8VaCWanBanPZUJPoRiiZdhNzQRuJ4UWNe+VXGlR5XLJ+u1h/bD8K4NmCWr2Sf7 ofkAa5TPqSPQ268tS9gLXslnckPsCV69T//3qmjVX53hrfcad5dz9ESlJ738k3UpwXdPKc Z03rzKYwgRwaJQ4zOdVSaWuMkMWtlg/ogVMiHGMLRIiNTkTKQnuF46BBE8nKfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687837109; a=rsa-sha256; cv=none; b=kUuFn+ZmeWZOkl88741eDqHL8ttUsIl++tdF8sr+IT1Mr32kIY249bKvwo6uRjq/Mt+tEA v7X976tfYt2K/9R27cCg95NDgsKlYfiTg1k5nrSzH+l2Zskl/meps7+yNN4l4XregOAm/9 Sv3VdVCOJqJgR4Zid1FfY/lwPWS4OyypJhm80y3bMP77BTjczijsrWzfoCZRYOakcdMAg3 vx0saaVXQ0aJaoMKsHLQZYeDzikj1sSk1eWdPv62OY9SwmKS65BMgY/w16HjHFuDVRJJaB AYt7359bubvwzhD9ul+sWg/8LbA/xGWTjuI6vlsNozzBbqQblDamwD/f5WPROA== 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 4Qqr5x1NX7zcNN; Tue, 27 Jun 2023 03:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R3cTeF034521; Tue, 27 Jun 2023 03:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R3cT8C034520; Tue, 27 Jun 2023 03:38:29 GMT (envelope-from git) Date: Tue, 27 Jun 2023 03:38:29 GMT Message-Id: <202306270338.35R3cT8C034520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9c2203a691ba - main - nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c2203a691baaa52f2045d0ae69eb108509284e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2203a691baaa52f2045d0ae69eb108509284e8 commit 9c2203a691baaa52f2045d0ae69eb108509284e8 Author: John Baldwin AuthorDate: 2023-06-27 03:32:29 +0000 Commit: John Baldwin CommitDate: 2023-06-27 03:32:29 +0000 nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS. - Replace a magic number with CTS_NVME_VALID_SPEC. - Set the transport and protocol versions the same as for XPT_PATH_INQ. Probably we shouldn't bother with setting the version in the 'spec' member of ccb_trans_settings_nvme at all and use the transport and/or protocol version field instead. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40616 --- sys/dev/nvme/nvme_sim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index 9a191d3042be..ec8cc03cb774 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -243,11 +243,13 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) } /* XXX these should be something else maybe ? */ - nvmep->valid = 1; + nvmep->valid = CTS_NVME_VALID_SPEC; nvmep->spec = nvmex->spec; cts->transport = XPORT_NVME; + cts->transport_version = nvmex->spec; cts->protocol = PROTO_NVME; + cts->protocol_version = nvmex->spec; cts->ccb_h.status = CAM_REQ_CMP; break; }