From: Keith Busch <kbusch@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH 2/3] nvmet: pci-epf: Clear CC and CSTS when disabling the controller
Date: Thu, 10 Apr 2025 09:34:33 +0100 [thread overview]
Message-ID: <Z_eCmfXXjmarMnQl@kbusch-mbp> (raw)
In-Reply-To: <20250408024733.690966-3-dlemoal@kernel.org>
On Tue, Apr 08, 2025 at 11:47:32AM +0900, Damien Le Moal wrote:
> @@ -1895,6 +1912,11 @@ static void nvmet_pci_epf_disable_ctrl(struct nvmet_pci_epf_ctrl *ctrl)
> nvmet_pci_epf_delete_cq(ctrl->tctrl, 0);
>
> ctrl->csts &= ~NVME_CSTS_RDY;
> + if (shutdown) {
> + ctrl->csts |= NVME_CSTS_SHST_CMPLT;
> + ctrl->cc &= ~NVME_CC_ENABLE;
> + nvmet_pci_epf_bar_write32(ctrl, NVME_REG_CC, ctrl->cc);
> + }
> }
I think this is probably okay, but I don't know if it's necessary to be
messing with CC.EN that the host didn't request. The qemu emulated nvme
doesn't do this, at least. But it looks like that would all work out in
the end anyway, so again, I think it's fine.
next prev parent reply other threads:[~2025-04-10 8:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 2:47 [PATCH 0/3] NVMe PCI endpoint target fixes Damien Le Moal
2025-04-08 2:47 ` [PATCH 1/3] nvmet: pci-epf: Always fully initialize completion entries Damien Le Moal
2025-04-10 8:24 ` Keith Busch
2025-04-10 8:38 ` Christoph Hellwig
2025-04-10 9:15 ` Niklas Cassel
2025-04-14 22:03 ` Sagi Grimberg
2025-04-08 2:47 ` [PATCH 2/3] nvmet: pci-epf: Clear CC and CSTS when disabling the controller Damien Le Moal
2025-04-10 8:34 ` Keith Busch [this message]
2025-04-11 0:32 ` Damien Le Moal
2025-04-14 17:58 ` Keith Busch
2025-04-10 11:54 ` Niklas Cassel
2025-04-11 0:35 ` Damien Le Moal
2025-04-14 22:07 ` Sagi Grimberg
2025-04-08 2:47 ` [PATCH 3/3] nvmet: pci-epf: Cleanup link state management Damien Le Moal
2025-04-10 8:35 ` Keith Busch
2025-04-10 11:56 ` Niklas Cassel
2025-04-14 22:05 ` Sagi Grimberg
2025-04-10 8:05 ` [PATCH 0/3] NVMe PCI endpoint target fixes Damien Le Moal
2025-04-10 8:12 ` Christoph Hellwig
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=Z_eCmfXXjmarMnQl@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--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 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.