mirror of
https://github.com/qemu/qemu.git
synced 2024-12-17 09:13:44 +08:00
hw/block/nvme: rename PMR/CMB shift/mask fields
Use the correct field names. Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
709cc8fc68
commit
8e9e8b4821
@ -4501,7 +4501,7 @@ static void nvme_set_smart_warning(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
cap = NVME_SMART_SPARE | NVME_SMART_TEMPERATURE | NVME_SMART_RELIABILITY
|
||||
| NVME_SMART_MEDIA_READ_ONLY | NVME_SMART_FAILED_VOLATILE_MEDIA;
|
||||
if (NVME_CAP_PMR(n->bar.cap)) {
|
||||
if (NVME_CAP_PMRS(n->bar.cap)) {
|
||||
cap |= NVME_SMART_PMR_UNRELIABLE;
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,8 @@ enum NvmeCapShift {
|
||||
CAP_CSS_SHIFT = 37,
|
||||
CAP_MPSMIN_SHIFT = 48,
|
||||
CAP_MPSMAX_SHIFT = 52,
|
||||
CAP_PMR_SHIFT = 56,
|
||||
CAP_CMB_SHIFT = 57,
|
||||
CAP_PMRS_SHIFT = 56,
|
||||
CAP_CMBS_SHIFT = 57,
|
||||
};
|
||||
|
||||
enum NvmeCapMask {
|
||||
@ -49,8 +49,8 @@ enum NvmeCapMask {
|
||||
CAP_CSS_MASK = 0xff,
|
||||
CAP_MPSMIN_MASK = 0xf,
|
||||
CAP_MPSMAX_MASK = 0xf,
|
||||
CAP_PMR_MASK = 0x1,
|
||||
CAP_CMB_MASK = 0x1,
|
||||
CAP_PMRS_MASK = 0x1,
|
||||
CAP_CMBS_MASK = 0x1,
|
||||
};
|
||||
|
||||
#define NVME_CAP_MQES(cap) (((cap) >> CAP_MQES_SHIFT) & CAP_MQES_MASK)
|
||||
@ -62,7 +62,7 @@ enum NvmeCapMask {
|
||||
#define NVME_CAP_CSS(cap) (((cap) >> CAP_CSS_SHIFT) & CAP_CSS_MASK)
|
||||
#define NVME_CAP_MPSMIN(cap)(((cap) >> CAP_MPSMIN_SHIFT) & CAP_MPSMIN_MASK)
|
||||
#define NVME_CAP_MPSMAX(cap)(((cap) >> CAP_MPSMAX_SHIFT) & CAP_MPSMAX_MASK)
|
||||
#define NVME_CAP_PMR(cap) (((cap) >> CAP_PMR_SHIFT) & CAP_PMR_MASK)
|
||||
#define NVME_CAP_PMRS(cap) (((cap) >> CAP_PMRS_SHIFT) & CAP_PMRS_MASK)
|
||||
|
||||
#define NVME_CAP_SET_MQES(cap, val) (cap |= (uint64_t)(val & CAP_MQES_MASK) \
|
||||
<< CAP_MQES_SHIFT)
|
||||
@ -82,10 +82,10 @@ enum NvmeCapMask {
|
||||
<< CAP_MPSMIN_SHIFT)
|
||||
#define NVME_CAP_SET_MPSMAX(cap, val) (cap |= (uint64_t)(val & CAP_MPSMAX_MASK)\
|
||||
<< CAP_MPSMAX_SHIFT)
|
||||
#define NVME_CAP_SET_PMRS(cap, val) (cap |= (uint64_t)(val & CAP_PMR_MASK) \
|
||||
<< CAP_PMR_SHIFT)
|
||||
#define NVME_CAP_SET_CMBS(cap, val) (cap |= (uint64_t)(val & CAP_CMB_MASK) \
|
||||
<< CAP_CMB_SHIFT)
|
||||
#define NVME_CAP_SET_PMRS(cap, val) (cap |= (uint64_t)(val & CAP_PMRS_MASK) \
|
||||
<< CAP_PMRS_SHIFT)
|
||||
#define NVME_CAP_SET_CMBS(cap, val) (cap |= (uint64_t)(val & CAP_CMBS_MASK) \
|
||||
<< CAP_CMBS_SHIFT)
|
||||
|
||||
enum NvmeCapCss {
|
||||
NVME_CAP_CSS_NVM = 1 << 0,
|
||||
|
Loading…
Reference in New Issue
Block a user