diff options
-rw-r--r-- | hw/nvme/ctrl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 73c870a..9a9857c 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -3034,7 +3034,8 @@ static uint16_t nvme_copy(NvmeCtrl *n, NvmeRequest *req) goto invalid; } - if (ns->pif && format != 0x1) { + if ((ns->pif == 0x0 && format != 0x0) || + (ns->pif != 0x0 && format != 0x1)) { status = NVME_INVALID_FORMAT | NVME_DNR; goto invalid; } |