From: Christoph Hellwig Date: Thu, 7 Jun 2018 13:09:50 +0000 (+0200) Subject: nvmet: keep a port pointer in nvmet_ctrl X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4ee43280488b0f6cbd74702725a32f47d03d690b;p=openwrt%2Fstaging%2Fblogic.git nvmet: keep a port pointer in nvmet_ctrl This will be needed for the ANA AEN code. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn --- diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index ddd85715a00a..cbcd19f52121 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -876,6 +876,8 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, nvmet_init_cap(ctrl); + ctrl->port = req->port; + INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work); INIT_LIST_HEAD(&ctrl->async_events); diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h index 688993855402..de12dcbfd3f3 100644 --- a/drivers/nvme/target/nvmet.h +++ b/drivers/nvme/target/nvmet.h @@ -140,6 +140,8 @@ struct nvmet_ctrl { u16 cntlid; u32 kato; + struct nvmet_port *port; + u32 aen_enabled; unsigned long aen_masked; struct nvmet_req *async_event_cmds[NVMET_ASYNC_EVENTS];