nvme: save hmpre and hmmin in struct nvme_ctrl
authorChristoph Hellwig <hch@lst.de>
Fri, 12 May 2017 15:16:10 +0000 (17:16 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 13 Jun 2017 09:45:35 +0000 (11:45 +0200)
We'll need the later for the HMB support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h

index 032cce3311e747a8696706946990e7550632eea3..767bcc6caae0ceff8369774fb1c68d2133e7ab65 100644 (file)
@@ -1633,6 +1633,8 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
                }
        } else {
                ctrl->cntlid = le16_to_cpu(id->cntlid);
+               ctrl->hmpre = le32_to_cpu(id->hmpre);
+               ctrl->hmmin = le32_to_cpu(id->hmmin);
        }
 
        kfree(id);
index 22ee60b2a3e8501c5becdacd62ace48559e561b4..e2e341bba619e6898dca1e23fc2622710d37b3f4 100644 (file)
@@ -166,6 +166,9 @@ struct nvme_ctrl {
        /* Power saving configuration */
        u64 ps_max_latency_us;
 
+       u32 hmpre;
+       u32 hmmin;
+
        /* Fabrics only */
        u16 sqsize;
        u32 ioccsz;