From: Keith Busch <kbusch@kernel.org>
To: Michael Kelley <mikelley@microsoft.com>
Cc: axboe@fb.com, hch@lst.de, sagi@grimberg.me,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
caroline.subramoney@microsoft.com, riwurd@microsoft.com,
nathan.obr@microsoft.com
Subject: Re: [PATCH v2 2/2] nvme: handle persistent internal error AER from NVMe controller
Date: Fri, 3 Jun 2022 13:23:07 -0600 [thread overview]
Message-ID: <Yppfm5n41NEcrRlU@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <1654278961-81423-2-git-send-email-mikelley@microsoft.com>
On Fri, Jun 03, 2022 at 10:56:01AM -0700, Michael Kelley wrote:
This series looks good to me. Just one concern below that may amount to
nothing.
> +static void nvme_handle_aer_persistent_error(struct nvme_ctrl *ctrl)
> +{
> + u32 csts;
> +
> + trace_nvme_async_event(ctrl, NVME_AER_ERROR);
> +
> + if (ctrl->ops->reg_read32(ctrl, NVME_REG_CSTS, &csts) != 0 ||
The reg_read32() is non-blocking for pcie, so this is safe to call from that
driver's irq handler. The other transports block on register reads, though, so
they can't call this from an atomic context. The TCP context looks safe, but
I'm not sure about RDMA or FC.
> + nvme_should_reset(ctrl, csts)) {
> + dev_warn(ctrl->device, "resetting controller due to AER\n");
> + nvme_reset_ctrl(ctrl);
> + }
> +}
> +
> void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
> volatile union nvme_result *res)
> {
> u32 result = le32_to_cpu(res->u32);
> u32 aer_type = result & 0x07;
> + u32 aer_subtype = (result & 0xff00) >> 8;
Since the above mask + shift is duplicated with nvme_handle_aen_notice(), an
inline helper function seems reasonable.
next prev parent reply other threads:[~2022-06-03 19:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 17:56 [PATCH v2 1/2] nvme-pci: move nvme_should_reset() to core code Michael Kelley
2022-06-03 17:56 ` [PATCH v2 2/2] nvme: handle persistent internal error AER from NVMe controller Michael Kelley
2022-06-03 19:23 ` Keith Busch [this message]
2022-06-04 14:28 ` Michael Kelley (LINUX)
2022-06-06 6:51 ` hch
2022-06-06 16:38 ` Keith Busch
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=Yppfm5n41NEcrRlU@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=axboe@fb.com \
--cc=caroline.subramoney@microsoft.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mikelley@microsoft.com \
--cc=nathan.obr@microsoft.com \
--cc=riwurd@microsoft.com \
--cc=sagi@grimberg.me \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®