Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1426058 > unrolled thread
| Started by | Jethro Beekman <kernel@jbeekman.nl> |
|---|---|
| First post | 2016-06-20 01:20 +0200 |
| Last post | 2016-06-20 01:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/3] nvme: When scanning namespaces, make sure the drive is not locked Jethro Beekman <kernel@jbeekman.nl> - 2016-06-20 01:20 +0200
| From | Jethro Beekman <kernel@jbeekman.nl> |
|---|---|
| Date | 2016-06-20 01:20 +0200 |
| Subject | [PATCH 1/3] nvme: When scanning namespaces, make sure the drive is not locked |
| Message-ID | <rLUat-pE-7@gated-at.bofh.it> |
Signed-off-by: Jethro Beekman <kernel@jbeekman.nl>
---
drivers/nvme/host/core.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 643f457..3a0d48c 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1377,6 +1377,12 @@ static void __nvme_scan_namespaces(struct nvme_ctrl *ctrl, unsigned nn)
}
}
+static bool nvme_security_is_locked(struct nvme_ctrl *ctrl,
+ struct nvme_id_ctrl *id)
+{
+ return false;
+}
+
void nvme_scan_namespaces(struct nvme_ctrl *ctrl)
{
struct nvme_id_ctrl *id;
@@ -1385,6 +1391,11 @@ void nvme_scan_namespaces(struct nvme_ctrl *ctrl)
if (nvme_identify_ctrl(ctrl, &id))
return;
+ if (nvme_security_is_locked(ctrl, id)) {
+ nvme_remove_namespaces(ctrl);
+ return;
+ }
+
mutex_lock(&ctrl->namespaces_mutex);
nn = le32_to_cpu(id->nn);
if (ctrl->vs >= NVME_VS(1, 1) &&
--
2.9.0
Back to top | Article view | linux.kernel
csiph-web