summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/admin-cmd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-30 15:05:09 +0200
committerChristoph Hellwig <hch@lst.de>2018-06-01 14:37:35 +0200
commit55fdd6b6134fc91d4722149fa8e4f2df24c428fe (patch)
tree6d091a21477e56ac0ecbaba77212b25ec649493d /drivers/nvme/target/admin-cmd.c
parentc86b8f7b4144affc4daa8b4047cd4da936b087ef (diff)
downloadlinux-55fdd6b6134fc91d4722149fa8e4f2df24c428fe.tar.bz2
nvmet: mask pending AENs
Per section 5.2 of the NVMe 1.3 spec: "When the controller posts a completion queue entry for an outstanding Asynchronous Event Request command and thus reports an asynchronous event, subsequent events of that event type are automatically masked by the controller until the host clears that event. An event is cleared by reading the log page associated with that event using the Get Log Page command (see section 5.14)." Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme/target/admin-cmd.c')
-rw-r--r--drivers/nvme/target/admin-cmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 72ef17616682..ead8fbe6922e 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -144,6 +144,7 @@ static void nvmet_execute_get_log_changed_ns(struct nvmet_req *req)
if (!status)
status = nvmet_zero_sgl(req, len, req->data_len - len);
ctrl->nr_changed_ns = 0;
+ clear_bit(NVME_AEN_CFG_NS_ATTR, &ctrl->aen_masked);
mutex_unlock(&ctrl->lock);
out:
nvmet_req_complete(req, status);