From: hch@lst.de (Christoph Hellwig)
Subject: [PATCHv2 02/11] nvme: submit AEN event configuration on startup
Date: Tue, 22 May 2018 12:00:56 +0200 [thread overview]
Message-ID: <20180522100056.GA11894@lst.de> (raw)
In-Reply-To: <20180522091004.39620-3-hare@suse.de>
> +void nvme_enable_aen(struct nvme_ctrl *ctrl)
> +{
> + u32 aen_cfg = NVME_SMART_CRIT_SPARE | NVME_SMART_CRIT_TEMPERATURE |
> + NVME_SMART_CRIT_RELIABILITY | NVME_SMART_CRIT_MEDIA |
> + NVME_SMART_CRIT_VOLATILE_MEMORY;
Currently the kernel doesn't really care about smart warnings at
all. Should we make this a sysfs to that people only enable if they
actually care?
> + u32 result;
> + int status;
> +
> + aen_cfg |= ctrl->aen_cfg;
> + status = nvme_set_features(ctrl, NVME_FEAT_ASYNC_EVENT,
> + aen_cfg, NULL, 0, &result);
> + if (status)
> + dev_warn(ctrl->device, "Failed to configure AEN (cfg %x)\n",
> + aen_cfg);
> +}
> +
If status is negative we should abort the reset, so we need to pass
that on.
> @@ -2345,6 +2361,8 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
>
> ctrl->oacs = le16_to_cpu(id->oacs);
> ctrl->oncs = le16_to_cpup(&id->oncs);
> + ctrl->aen_cfg = le32_to_cpu(id->oaes) &
> + (NVME_AEN_CFG_NS_ATTR | NVME_AEN_CFG_FW_ACT);
Hmm. I'd rather store the oaes value in nvme_ctrl and do this
calculation in nvme_enable_aen.
next prev parent reply other threads:[~2018-05-22 10:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 9:09 [PATCHv2 00/11] nvme: ANA support Hannes Reinecke
2018-05-22 9:09 ` [PATCHv2 01/11] nvme.h: untangle AEN notice definitions Hannes Reinecke
2018-05-22 9:09 ` [PATCHv2 02/11] nvme: submit AEN event configuration on startup Hannes Reinecke
2018-05-22 10:00 ` Christoph Hellwig [this message]
2018-05-22 10:55 ` Hannes Reinecke
2018-05-22 9:09 ` [PATCHv2 03/11] nvmet: refactor AER handling Hannes Reinecke
2018-05-22 9:09 ` [PATCHv2 04/11] nvmet: Add AEN configuration support Hannes Reinecke
2018-05-22 10:01 ` Christoph Hellwig
2018-05-22 10:56 ` Hannes Reinecke
2018-05-22 9:09 ` [PATCHv2 05/11] nvme.h: add ANA definitions Hannes Reinecke
2018-05-22 9:09 ` [PATCHv2 06/11] nvme: add support for the log specific field Hannes Reinecke
2018-05-22 9:10 ` [PATCHv2 07/11] nvme: always failover on path or transport errors Hannes Reinecke
2018-05-25 13:24 ` Christoph Hellwig
2018-05-22 9:10 ` [PATCHv2 08/11] nvme: add ANA support Hannes Reinecke
2018-05-23 11:52 ` Popuri, Sriram
2018-05-23 13:19 ` Hannes Reinecke
2018-05-25 13:31 ` Christoph Hellwig
2018-05-25 13:28 ` Christoph Hellwig
2018-05-25 14:32 ` Hannes Reinecke
2018-05-31 10:21 ` Sagi Grimberg
2018-05-22 9:10 ` [PATCHv2 09/11] nvmet: add a new nvmet_zero_sgl helper Hannes Reinecke
2018-05-22 9:10 ` [PATCHv2 10/11] nvmet: split log page implementation Hannes Reinecke
2018-05-22 9:10 ` [PATCHv2 11/11] nvmet: ANA support Hannes Reinecke
2018-05-22 10:05 ` Christoph Hellwig
2018-05-22 11:05 ` Hannes Reinecke
2018-05-25 13:34 ` Christoph Hellwig
2018-05-31 10:27 ` 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=20180522100056.GA11894@lst.de \
--to=hch@lst.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.