@@ -240,10 +240,12 @@ static inline bool nvme_is_64bit_reg(__u32 offset)
240240 * @NVME_CAP_NSSRC_SHIFT: Shift amount to get the NVM subsystem reset supported
241241 * @NVME_CAP_CSS_SHIFT: Shift amount to get the command sets supported
242242 * @NVME_CAP_BPS_SHIFT: Shift amount to get the boot partition support
243+ * @NVME_CAP_CPS_SHIFT: Shift amount to get the controller power scope
243244 * @NVME_CAP_MPSMIN_SHIFT: Shift amount to get the memory page size minimum
244245 * @NVME_CAP_MPSMAX_SHIFT: Shift amount to get the memory page size maximum
245246 * @NVME_CAP_PMRS_SHIFT: Shift amount to get the persistent memory region supported
246247 * @NVME_CAP_CMBS_SHIFT: Shift amount to get the controller memory buffer supported
248+ * @NVME_CAP_NSSS_SHIFT: Shift amount to get the NVM subsystem shutdown supported
247249 * @NVME_CAP_CRMS_SHIFT: Shift amount to get the controller ready modes supported
248250 * @NVME_CAP_MQES_MASK: Mask to get the maximum queue entries supported
249251 * @NVME_CAP_CQR_MASK: Mask to get the contiguous queues required
@@ -253,16 +255,22 @@ static inline bool nvme_is_64bit_reg(__u32 offset)
253255 * @NVME_CAP_NSSRC_MASK: Mask to get the NVM subsystem reset supported
254256 * @NVME_CAP_CSS_MASK: Mask to get the command sets supported
255257 * @NVME_CAP_BPS_MASK: Mask to get the boot partition support
258+ * @NVME_CAP_CPS_MASK: Mask to get the controller power scope
256259 * @NVME_CAP_MPSMIN_MASK: Mask to get the memory page size minimum
257260 * @NVME_CAP_MPSMAX_MASK: Mask to get the memory page size maximum
258261 * @NVME_CAP_PMRS_MASK: Mask to get the persistent memory region supported
259262 * @NVME_CAP_CMBS_MASK: Mask to get the controller memory buffer supported
263+ * @NVME_CAP_NSSS_MASK: Mask to get the NVM subsystem shutdown supported
260264 * @NVME_CAP_CRMS_MASK: Mask to get the controller ready modes supported
261265 * @NVME_CAP_AMS_WRR: Weighted round robin with urgent priority class
262266 * @NVME_CAP_AMS_VS: Vendor specific
263267 * @NVME_CAP_CSS_NVM: NVM command set or a discovery controller
264268 * @NVME_CAP_CSS_CSI: Controller supports one or more I/O command sets
265269 * @NVME_CAP_CSS_ADMIN: No I/O command set is supported
270+ * @NVME_CAP_CPS_NONE: Not reported
271+ * @NVME_CAP_CPS_CTRL: Controller scope
272+ * @NVME_CAP_CPS_DOMAIN: Domain scope
273+ * @NVME_CAP_CPS_NVMS: NVM subsystem scope
266274 * @NVME_CAP_CRWMS: Controller ready with media support
267275 * @NVME_CAP_CRIMS: Controller ready independent of media support
268276 */
@@ -275,10 +283,12 @@ enum nvme_cap {
275283 NVME_CAP_NSSRC_SHIFT = 36 ,
276284 NVME_CAP_CSS_SHIFT = 37 ,
277285 NVME_CAP_BPS_SHIFT = 45 ,
286+ NVME_CAP_CPS_SHIFT = 46 ,
278287 NVME_CAP_MPSMIN_SHIFT = 48 ,
279288 NVME_CAP_MPSMAX_SHIFT = 52 ,
280289 NVME_CAP_PMRS_SHIFT = 56 ,
281290 NVME_CAP_CMBS_SHIFT = 57 ,
291+ NVME_CAP_NSSS_SHIFT = 58 ,
282292 NVME_CAP_CRMS_SHIFT = 59 ,
283293 NVME_CAP_MQES_MASK = 0xffff ,
284294 NVME_CAP_CQR_MASK = 0x1 ,
@@ -288,16 +298,22 @@ enum nvme_cap {
288298 NVME_CAP_NSSRC_MASK = 0x1 ,
289299 NVME_CAP_CSS_MASK = 0xff ,
290300 NVME_CAP_BPS_MASK = 0x1 ,
301+ NVME_CAP_CPS_MASK = 0x3 ,
291302 NVME_CAP_MPSMIN_MASK = 0xf ,
292303 NVME_CAP_MPSMAX_MASK = 0xf ,
293304 NVME_CAP_PMRS_MASK = 0x1 ,
294305 NVME_CAP_CMBS_MASK = 0x1 ,
306+ NVME_CAP_NSSS_MASK = 0x1 ,
295307 NVME_CAP_CRMS_MASK = 0x3 ,
296308 NVME_CAP_AMS_WRR = 1 << 0 ,
297309 NVME_CAP_AMS_VS = 1 << 1 ,
298310 NVME_CAP_CSS_NVM = 1 << 0 ,
299311 NVME_CAP_CSS_CSI = 1 << 6 ,
300312 NVME_CAP_CSS_ADMIN = 1 << 7 ,
313+ NVME_CAP_CPS_NONE = 0 ,
314+ NVME_CAP_CPS_CTRL = 1 ,
315+ NVME_CAP_CPS_DOMAIN = 2 ,
316+ NVME_CAP_CPS_NVMS = 3 ,
301317 NVME_CAP_CRWMS = 1 << 0 ,
302318 NVME_CAP_CRIMS = 1 << 1 ,
303319};
@@ -310,10 +326,12 @@ enum nvme_cap {
310326#define NVME_CAP_NSSRC (cap ) NVME_GET(cap, CAP_NSSRC)
311327#define NVME_CAP_CSS (cap ) NVME_GET(cap, CAP_CSS)
312328#define NVME_CAP_BPS (cap ) NVME_GET(cap, CAP_BPS)
329+ #define NVME_CAP_CPS (cap ) NVME_GET(cap, CAP_CPS)
313330#define NVME_CAP_MPSMIN (cap ) NVME_GET(cap, CAP_MPSMIN)
314331#define NVME_CAP_MPSMAX (cap ) NVME_GET(cap, CAP_MPSMAX)
315332#define NVME_CAP_PMRS (cap ) NVME_GET(cap, CAP_PMRS)
316333#define NVME_CAP_CMBS (cap ) NVME_GET(cap, CAP_CMBS)
334+ #define NVME_CAP_NSSS (cap ) NVME_GET(cap, CAP_NSSS)
317335#define NVME_CAP_CRMS (cap ) NVME_GET(cap, CAP_CRMS)
318336
319337enum nvme_vs {
0 commit comments