diff options
author | John Baldwin <jhb@FreeBSD.org> | 2023-06-27 03:32:29 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2023-06-27 03:32:29 +0000 |
commit | 9c2203a691baaa52f2045d0ae69eb108509284e8 (patch) | |
tree | 5d8c9109c5c85607e22c9ff36b78ea06a92e1928 | |
parent | 1aaa8f670a0188677bd7d2ff1c83e18906715144 (diff) | |
download | src-9c2203a691baaa52f2045d0ae69eb108509284e8.tar.gz src-9c2203a691baaa52f2045d0ae69eb108509284e8.zip |
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
-rw-r--r-- | sys/dev/nvme/nvme_sim.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |