summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/zns.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-04-07 15:03:16 +0200
committerChristoph Hellwig <hch@lst.de>2021-04-15 08:12:56 +0200
commita9e0e6bc728ebcfe9f6acdca84e5c6cafee895cf (patch)
tree3c4a7c33a0493dcfffecc2ac3ba9b86a7a734869 /drivers/nvme/host/zns.c
parentf5b9a51db29c31f4e486b08d1d823d6f75f2c2c7 (diff)
nvme: let namespace probing continue for unsupported features
Instead of failing to scan the namespace entirely when unsupported features are detected, just mark the gendisk hidden but allow other access like the upcoming per-namespace character device. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Javier González <javier.gonz@samsung.com>
Diffstat (limited to 'drivers/nvme/host/zns.c')
-rw-r--r--drivers/nvme/host/zns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c
index bc2f344f0ae0..475dd45c3db4 100644
--- a/drivers/nvme/host/zns.c
+++ b/drivers/nvme/host/zns.c
@@ -96,7 +96,7 @@ int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf)
dev_warn(ns->ctrl->device,
"zone operations:%x not supported for namespace:%u\n",
le16_to_cpu(id->zoc), ns->head->ns_id);
- status = -EINVAL;
+ status = -ENODEV;
goto free_data;
}
@@ -105,7 +105,7 @@ int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf)
dev_warn(ns->ctrl->device,
"invalid zone size:%llu for namespace:%u\n",
ns->zsze, ns->head->ns_id);
- status = -EINVAL;
+ status = -ENODEV;
goto free_data;
}