diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c --- a/sys/dev/nvmf/host/nvmf.c +++ b/sys/dev/nvmf/host/nvmf.c @@ -376,10 +376,10 @@ MPASS(nsid == nslist->ns[nitems(nslist->ns) - 1] && nsid != 0); - if (nsid >= 0xfffffffd) + if (nsid >= NVME_GLOBAL_NAMESPACE_TAG - 1) *nsidp = 0; else - *nsidp = nsid + 1; + *nsidp = nsid; return (true); }