On Aug 25 22:53, Francis Pravin Antony Michael Raj wrote: > As per the NVMe command set specification section-3.2.2, > If: > i) The namespace is formatted to use 16b Guard Protection Information > (i.e., pif = 0) and > ii) The Descriptor Format is not cleared to 0h > Then the copy command should be aborted with the status code of Invalid > Namespace or Format > > Signed-off-by: Francis Pravin Antony Michael Raj > <francis.mich...@solidigm.com> > Signed-off-by: Jonathan Derrick <jonathan.derr...@solidigm.com> > --- > hw/nvme/ctrl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c > index 87aeba0564..cb4c0f80bc 100644 > --- a/hw/nvme/ctrl.c > +++ b/hw/nvme/ctrl.c > @@ -3040,7 +3040,7 @@ static uint16_t nvme_copy(NvmeCtrl *n, NvmeRequest *req) > goto invalid; > } > > - if (ns->pif && format != 0x1) { > + if ((ns->pif == 0x0 && format != 0x0) || (ns->pif && format != 0x1)) { > status = NVME_INVALID_FORMAT | NVME_DNR; > goto invalid; > } > -- > 2.25.1 >
Thanks, looks good. Reviewed-by: Klaus Jensen <k.jen...@samsung.com>
signature.asc
Description: PGP signature