devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sven Peter" <sven@svenpeter.dev>
To: "Keith Busch" <kbusch@kernel.org>
Cc: "axboe@fb.com" <axboe@fb.com>, "hch@lst.de" <hch@lst.de>,
	"sagi@grimberg.me" <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: Wed, 27 Apr 2022 17:40:06 +0200	[thread overview]
Message-ID: <cd6c9623-60c6-44dc-8ff3-addfb31efd6d@www.fastmail.com> (raw)
In-Reply-To: <YmhdVJgd6DGRHPXd@kbusch-mbp.dhcp.thefacebook.com>



On Tue, Apr 26, 2022, at 23:00, Keith Busch wrote:
> 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.

Makes sense, will add it.


Sven

  reply	other threads:[~2022-04-27 15:40 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) NVMe driver 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
2022-04-27 15:40     ` Sven Peter [this message]
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=cd6c9623-60c6-44dc-8ff3-addfb31efd6d@www.fastmail.com \
    --to=sven@svenpeter.dev \
    --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=kbusch@kernel.org \
    --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 \
    /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;
as well as URLs for NNTP newsgroup(s).