hw/nvme: add identify namespace flbas/mc enums
Add enums for the Identify Namespace FLBAS and MC fields. Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com> [k.jensen: squashed separate flbas/mc commits into one] Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
f42be416cd
commit
18de1526ba
@ -82,10 +82,10 @@ static int nvme_ns_init(NvmeNamespace *ns, Error **errp)
|
||||
ms = ns->params.ms;
|
||||
|
||||
if (ns->params.ms) {
|
||||
id_ns->mc = 0x3;
|
||||
id_ns->mc = NVME_ID_NS_MC_EXTENDED | NVME_ID_NS_MC_SEPARATE;
|
||||
|
||||
if (ns->params.mset) {
|
||||
id_ns->flbas |= 0x10;
|
||||
id_ns->flbas |= NVME_ID_NS_FLBAS_EXTENDED;
|
||||
}
|
||||
|
||||
id_ns->dpc = 0x1f;
|
||||
|
@ -1341,6 +1341,15 @@ enum NvmeIdNsDps {
|
||||
NVME_ID_NS_DPS_FIRST_EIGHT = 8,
|
||||
};
|
||||
|
||||
enum NvmeIdNsFlbas {
|
||||
NVME_ID_NS_FLBAS_EXTENDED = 1 << 4,
|
||||
};
|
||||
|
||||
enum NvmeIdNsMc {
|
||||
NVME_ID_NS_MC_EXTENDED = 1 << 0,
|
||||
NVME_ID_NS_MC_SEPARATE = 1 << 1,
|
||||
};
|
||||
|
||||
#define NVME_ID_NS_DPS_TYPE(dps) (dps & NVME_ID_NS_DPS_TYPE_MASK)
|
||||
|
||||
typedef struct NvmeDifTuple {
|
||||
|
Loading…
Reference in New Issue
Block a user