]> www.infradead.org Git - users/hch/misc.git/commitdiff
nvmet: implement crto property
authorKeith Busch <kbusch@kernel.org>
Mon, 4 Nov 2024 22:17:59 +0000 (14:17 -0800)
committerKeith Busch <kbusch@kernel.org>
Mon, 11 Nov 2024 17:49:49 +0000 (09:49 -0800)
This property is required for nvme 2.1. The target only supports ready
with media, so this is just the same value as CAP.TO.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/fabrics-cmd.c

index 28a84af1b4c031d75305c35f42dfaced54368ce0..c49904ebb6c2d7ae36cd304f8fa95485dc4a37f6 100644 (file)
@@ -64,6 +64,9 @@ static void nvmet_execute_prop_get(struct nvmet_req *req)
                case NVME_REG_CSTS:
                        val = ctrl->csts;
                        break;
+               case NVME_REG_CRTO:
+                       val = NVME_CAP_TIMEOUT(ctrl->csts);
+                       break;
                default:
                        status = NVME_SC_INVALID_FIELD | NVME_STATUS_DNR;
                        break;