All of lore.kernel.org
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH 2/3 rfc] nvme: enable aen also for discovery controllers
Date: Sun, 24 Feb 2019 18:14:04 +0100	[thread overview]
Message-ID: <b6127cbf-bfac-8df8-2253-a6bd798da5f1@suse.de> (raw)
In-Reply-To: <20190223023117.20517-3-sagi@grimberg.me>

On 2/23/19 3:31 AM, Sagi Grimberg wrote:
> If the controller supports discovery log page change events,
> we want to enable it on the host side as well.
> 
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>   drivers/nvme/host/core.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 9ec88253ebcd..348af75583e5 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1178,6 +1178,8 @@ static void nvme_enable_aen(struct nvme_ctrl *ctrl)
>   	if (!supported_aens)
>   		return;
>   
> +	queue_work(nvme_wq, &ctrl->async_event_work);
> +
>   	status = nvme_set_features(ctrl, NVME_FEAT_ASYNC_EVENT, supported_aens,
>   			NULL, 0, &result);
>   	if (status)
> @@ -3662,10 +3664,13 @@ void nvme_start_ctrl(struct nvme_ctrl *ctrl)
>   	if (ctrl->kato)
>   		nvme_start_keep_alive(ctrl);
>   
> +	if (ctrl->queue_count > 1 ||
> +	    (ctrl->ops->flags & NVME_F_FABRICS &&
> +	     ctrl->opts->discovery_nqn))
> +		nvme_enable_aen(ctrl);
> +
>   	if (ctrl->queue_count > 1) {
>   		nvme_queue_scan(ctrl);
> -		nvme_enable_aen(ctrl);
> -		queue_work(nvme_wq, &ctrl->async_event_work);
>   		nvme_start_queues(ctrl);
>   	}
>   }
> 
Reviewed-by: Hannes Reinecke <hare at suse.com>

Cheers,

Hannes

  reply	other threads:[~2019-02-24 17:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23  2:31 [PATCH 0/3 rfc] Support discovery log change events Sagi Grimberg
2019-02-23  2:31 ` [PATCH 1/3 rfc] nvme-fabrics: allow discovery subsystems accept a kato Sagi Grimberg
2019-02-24 17:13   ` Hannes Reinecke
2019-02-23  2:31 ` [PATCH 2/3 rfc] nvme: enable aen also for discovery controllers Sagi Grimberg
2019-02-24 17:14   ` Hannes Reinecke [this message]
2019-02-25  0:07   ` Max Gurtovoy
2019-02-25 21:24     ` Sagi Grimberg
2019-02-23  2:31 ` [PATCH 3/3 rfc] nvme: fire discovery log page change events to userspace Sagi Grimberg
2019-02-24 17:16   ` Hannes Reinecke
2019-02-25 21:25     ` Sagi Grimberg
2019-02-23  2:31 ` [PATCH rfc nvme-cli 4/5] fabrics: support persistent connections to a discovery controller Sagi Grimberg
2019-02-23  2:34   ` Sagi Grimberg
2019-02-23  2:31 ` [PATCH rfc nvme-cli 5/5] fabrics: allow user to retrieve discovery log from existing " Sagi Grimberg
2019-02-23  2:34   ` Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6127cbf-bfac-8df8-2253-a6bd798da5f1@suse.de \
    --to=hare@suse.de \
    --subject='Re: [PATCH 2/3 rfc] nvme: enable aen also for discovery controllers' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.