git: 9c2203a691ba - main - nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Jun 2023 03:38:29 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2203a691baaa52f2045d0ae69eb108509284e8 commit 9c2203a691baaa52f2045d0ae69eb108509284e8 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-06-27 03:32:29 +0000 Commit: John Baldwin <jhb@FreeBSD.org> 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; }