]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nvme: cache controller attributes
authorSagi Grimberg <sagi@grimberg.me>
Fri, 2 Nov 2018 17:28:14 +0000 (10:28 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:55 +0000 (22:26 -0700)
We get the controller attributes in identify, cache them as we'll need
them for traffic based keep alive support.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h

index e57c673ae73747c10971be20b684081f0435b7da..9de6244a345c6a08d04182934dcf1d8e03af6af2 100644 (file)
@@ -2409,6 +2409,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
        ctrl->sgls = le32_to_cpu(id->sgls);
        ctrl->kas = le16_to_cpu(id->kas);
        ctrl->max_namespaces = le32_to_cpu(id->mnan);
+       ctrl->ctratt = le32_to_cpu(id->ctratt);
 
        if (id->rtd3e) {
                /* us -> s */
index f1e4566e6ca8833acc93eba19eba6c5c109b4123..4be7bbcfe66d7845121c4f9846621f9c2bb57793 100644 (file)
@@ -194,6 +194,7 @@ struct nvme_ctrl {
        u8 apsta;
        u32 oaes;
        u32 aen_result;
+       u32 ctratt;
        unsigned int shutdown_timeout;
        unsigned int kato;
        bool subsystem;