Message ID | 20230104101641.12215-1-marcan@marcan.st |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5066818wrt; Wed, 4 Jan 2023 02:18:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXvDo7+sEytC4Tkw3i3sst1uGuCbAIO2biEb+POGzQDCUw0Mlf+NQVcnFw/YPlTycfV6IxnE X-Received: by 2002:a17:906:1414:b0:78d:f455:b5dd with SMTP id p20-20020a170906141400b0078df455b5ddmr35751422ejc.29.1672827496838; Wed, 04 Jan 2023 02:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672827496; cv=none; d=google.com; s=arc-20160816; b=AKOBuomiThMaiVDq5tGGQq20EhWZ7CiYkOsgKITrLHimt9K+W4f3dvEcY4bQoglu72 c/NUeYX9R3HoxN3JzceyZHCc5oNdHlezwhxQ9LSgCik3OfsuaK/V4rPUpfRThaFYLeEc JwVdClhPuTkn3cAS0ywv2oOzHgbp4Q42wrSrVQGAyrEzNPM5Amv+PAHwOypWs9xTbvi6 tz3Gd/3s5WzJBnh3ihHbzQ95ht/jB6DsOA35JpRk+s74hSgGpQuyyYw4RGxCjYMttJ+w tSGZOZiYxas0dBipsxFAoEAG6jlUVopP5wzZlVfesg7/yuvSXiCaLt98VIy2ib37A0BS U3cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9/vLSl0Gx6/TXhVTzjwjqtlB8fPDsHL8LSNWBKYpfc4=; b=NEtuYSKTNgRa1TboiWZPlr1HLM6EHS8Kw/ye0u88DgPTmPWwajF+mcpfYc4GKLKlvq jINHx4byX55nlkcMlsfb5kIyem94QLTPoA8rWrvraoGRLczZDs2NufnxnarNZtpzPmOh upqQxL45C+MzfxzINRu/E+v5jWu7URHIX+dqyuXwRoGjfPb2UPJptz1ZqjzzAGy9XGAv wxVR9WGvsLxUqk0zFmA3+1ltEDKABqw4FRGXRFGSJirzNF2tcr2JhqAeAIZB/z49WlIS YjepNSgYL4nUwcuGGE+MdGR81n1BhDSW/modEXOvveAbWCAW8WcL3NKF7h7CnV1JAy5H 0CqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=SRK2pJSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk10-20020a1709077f8a00b007c0b7f5c135si29194843ejc.584.2023.01.04.02.17.50; Wed, 04 Jan 2023 02:18:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=SRK2pJSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233482AbjADKRX (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Wed, 4 Jan 2023 05:17:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbjADKRV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 4 Jan 2023 05:17:21 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB81BCE0E for <linux-kernel@vger.kernel.org>; Wed, 4 Jan 2023 02:17:19 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id A8A6B3FB17; Wed, 4 Jan 2023 10:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672827438; bh=MLdyNUGqhsrRED5hjRcjh0VIn12dU5ghryHGCfnHNXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SRK2pJSe8FIQQ802ij/JBfeeRQR9w0uoN/kMMc6Z90lZUZ2yWsK0JP1YbkyOUupWn bOwUplD5+or6TeojFIlOB8/WrzpsBw7vwbFkNGectMMX2UKX3l5J298llbVGubvlVT j3Vzf7wwisCsBsc//+VIB5MSEIAj84SNCisk+hiLKBUsUj172bBEIFDGN+r3r8dd1Q +Jtu7soMD7JaSIkpqJB5gpzFhBaNDo2+RnLGguThHgc43kcBcLvjI+f52sYwJc7Fkl 4Exgw0TwnQOFaOnA1vsUMht1fUT0yYkz9V4uBu+j0FanBrtU1uVj094IgHEq/FAeBi H4fBMYHakRcLA== From: Hector Martin <marcan@marcan.st> To: Sven Peter <sven@svenpeter.dev>, Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me> Cc: Uday Shankar <ushankar@purestorage.com>, asahi@lists.linux.dev, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Hector Martin <marcan@marcan.st> Subject: [PATCH] nvme-pci: Add NVME_QUIRK_IDENTIFY_CNS quirk to Apple T2 controllers Date: Wed, 4 Jan 2023 19:16:42 +0900 Message-Id: <20230104101641.12215-1-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230104092148.15578-1-marcan@marcan.st> References: <20230104092148.15578-1-marcan@marcan.st> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754086765438980943?= X-GMAIL-MSGID: =?utf-8?q?1754086765438980943?= |
Series |
nvme-pci: Add NVME_QUIRK_IDENTIFY_CNS quirk to Apple T2 controllers
|
|
Commit Message
Hector Martin
Jan. 4, 2023, 10:16 a.m. UTC
This mirrors the quirk added to Apple Silicon controllers in apple.c.
These controllers do not support the Active NS ID List command and
behave identically to the SoC version judging by existing user
reports/syslogs, so will need the same fix. This quirk reverts
back to NVMe 1.0 behavior and disables the broken commands.
Fixes: 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues")
Signed-off-by: Hector Martin <marcan@marcan.st>
---
drivers/nvme/host/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Note: this is untested (since probably nobody with a T2 is running
6.2 RCs yet), but given that these controllers share the same firmware
codebase and some other quirks, it is almost certain they regressed
just like the M1/M2 controllers did. Existing syslogs from T2 machines
show the same errors we were getting on M1/M2 prior to the regression,
which points to them having the same issue of treating CNS as a binary
flag as in NVMe 1.0 all along.
Sven has asked some of the T2 folks if they can test a 6.2 RC to verify
the same regression happened, so hopefully we can get confirmation that
this needs fixing (and the fix works), but if we end up getting no
feedback I'd lean towards just getting this applied as a fix since it's
unlikely to break anything and highly likely to fix a regression.
--
2.35.1
Comments
> This mirrors the quirk added to Apple Silicon controllers in apple.c. > These controllers do not support the Active NS ID List command and > behave identically to the SoC version judging by existing user > reports/syslogs, so will need the same fix. This quirk reverts > back to NVMe 1.0 behavior and disables the broken commands. > > Fixes: 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues") > Signed-off-by: Hector Martin <marcan@marcan.st> On T2 macbookpro16,1 with 6.2.0-rc3-00010-g69b41ac87e4a I had this in dmesg: nvme nvme0: 1/0/0 default/read/poll queues nvme nvme0: Identify NS List failed (status=0xb) And in /dev only nvme0 existed (no nvme0n1*). This patch fixed that and /dev/nvme0n1p* existed. Tested-by: Orlando Chamberlain <orlandoch.dev@gmail.com>
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index b13baccedb4a..91f8adcf6056 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3495,7 +3495,8 @@ static const struct pci_device_id nvme_id_table[] = { .driver_data = NVME_QUIRK_SINGLE_VECTOR | NVME_QUIRK_128_BYTES_SQES | NVME_QUIRK_SHARED_TAGS | - NVME_QUIRK_SKIP_CID_GEN }, + NVME_QUIRK_SKIP_CID_GEN | + NVME_QUIRK_IDENTIFY_CNS }, { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, { 0, } };