[PATCH RFC 02/11] nvmet: Export nvmet_add_async_event and add definitions

Mike Christie
2025-03-13T05:22:47Z

This exports nvmet_add_async_event and adds some AER definitions that
will be used by the nvmet_mdev_pci driver.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
drivers/nvme/target/core.c | 1 +
include/linux/nvme.h | 2 ++
2 files changed, 3 insertions(+)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index f896d1fd3326..4de534eafd89 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -214,6 +214,7 @@ void nvmet_add_async_event(struct nvmet_ctrl *ctrl, u8 event_type,

queue_work(nvmet_wq, &ctrl->async_event_work);
}
+EXPORT_SYMBOL_GPL(nvmet_add_async_event);

static void nvmet_add_to_changed_ns_log(struct nvmet_ctrl *ctrl, __le32 nsid)
{
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 2dc05b1c3283..a7b8bcef20fb 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -806,6 +806,8 @@ enum {
};

enum {
+ NVME_AER_ERROR_INVALID_DB_REG = 0x00,
+ NVME_AER_ERROR_INVALID_DB_VALUE = 0x01,
NVME_AER_ERROR_PERSIST_INT_ERR = 0x03,
};

--
2.43.0