From: Keith Busch <kbusch@kernel.org>
To: Sven Peter <sven@svenpeter.dev>
Cc: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
Hector Martin <marcan@marcan.st>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Marc Zyngier <maz@kernel.org>,
Janne Grunau <j@jannau.net>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v3 6/6] nvme-apple: Add initial Apple SoC NVMe driver
Date: Tue, 26 Apr 2022 15:00:04 -0600 [thread overview]
Message-ID: <YmhdVJgd6DGRHPXd@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20220426201539.12829-7-sven@svenpeter.dev>
On Tue, Apr 26, 2022 at 10:15:39PM +0200, Sven Peter wrote:
> +static enum blk_eh_timer_return apple_nvme_timeout(struct request *req,
> + bool reserved)
> +{
> + struct apple_nvme_iod *iod = blk_mq_rq_to_pdu(req);
> + struct apple_nvme_queue *q = iod->q;
> + struct apple_nvme *anv = queue_to_apple_nvme(q);
> + unsigned long flags;
> + u32 csts = readl(anv->mmio_nvme + NVME_REG_CSTS);
> +
> + if (anv->ctrl.state != NVME_CTRL_LIVE) {
> + /*
> + * From rdma.c:
> + * If we are resetting, connecting or deleting we should
> + * complete immediately because we may block controller
> + * teardown or setup sequence
> + * - ctrl disable/shutdown fabrics requests
> + * - connect requests
> + * - initialization admin requests
> + * - I/O requests that entered after unquiescing and
> + * the controller stopped responding
> + *
> + * All other requests should be cancelled by the error
> + * recovery work, so it's fine that we fail it here.
> + */
> + dev_warn(anv->dev,
> + "I/O %d(aq:%d) timeout while not in live state\n",
> + req->tag, q->is_adminq);
> + if (blk_mq_request_started(req) &&
> + !blk_mq_request_completed(req)) {
> + nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD;
> + blk_mq_complete_request(req);
I think you need a 'nvme_req(req)->flags |= NVME_REQ_CANCELLED' here to get the
expected -EINTR for any admin command timeouts during a reset. Without it, the
resetting task is going to think it got a real response from the controller.
Other than that, this looks good.
next prev parent reply other threads:[~2022-04-26 21:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 20:15 [PATCH v3 0/6] Apple M1 (Pro/Max) " Sven Peter
2022-04-26 20:15 ` [PATCH v3 1/6] dt-bindings: iommu: Add Apple SART DMA address filter Sven Peter
2022-04-26 20:15 ` [PATCH v3 2/6] dt-bindings: nvme: Add Apple ANS NVMe Sven Peter
2022-04-26 20:15 ` [PATCH v3 3/6] soc: apple: Always include Makefile Sven Peter
2022-04-26 20:15 ` [PATCH v3 4/6] soc: apple: Add SART driver Sven Peter
2022-04-26 20:55 ` Arnd Bergmann
2022-04-26 20:15 ` [PATCH v3 5/6] soc: apple: Add RTKit IPC library Sven Peter
2022-04-26 21:01 ` Arnd Bergmann
2022-04-27 15:31 ` Sven Peter
2022-04-26 20:15 ` [PATCH v3 6/6] nvme-apple: Add initial Apple SoC NVMe driver Sven Peter
2022-04-26 21:00 ` Keith Busch [this message]
2022-04-27 15:40 ` Sven Peter
2022-04-26 21:07 ` Arnd Bergmann
2022-04-26 21:15 ` [PATCH v3 0/6] Apple M1 (Pro/Max) " Arnd Bergmann
2022-04-27 15:33 ` Sven Peter
2022-04-27 17:39 ` Arnd Bergmann
2022-04-28 14:24 ` hch
2022-04-29 16:37 ` Sven Peter
2022-04-29 20:33 ` Arnd Bergmann
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=YmhdVJgd6DGRHPXd@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=arnd@arndb.de \
--cc=axboe@fb.com \
--cc=devicetree@vger.kernel.org \
--cc=hch@lst.de \
--cc=j@jannau.net \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=marcan@marcan.st \
--cc=maz@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sagi@grimberg.me \
--cc=sven@svenpeter.dev \
/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®