From patchwork Wed Jan 4 09:21:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 38824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5049194wrt; Wed, 4 Jan 2023 01:26:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtnVygK3LeNikXFWvG69MjciP+GY0FqPVEsAUj0Cr+MhMuiRlan1UhxB4bGyr6fxZ4r4X9v X-Received: by 2002:a05:6402:c44:b0:48e:ac4e:7bfa with SMTP id cs4-20020a0564020c4400b0048eac4e7bfamr7075579edb.2.1672824369044; Wed, 04 Jan 2023 01:26:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672824369; cv=none; d=google.com; s=arc-20160816; b=WHk+sTx/FZQCyz921BTsHyXtIHk6n+/PPn2WBggzQyoN3cvKMvZpSzWpvfCJ1B2kEM siwEAkevFHTrRGJWQYxmci7KJZ0uyBBrICFwLra7lYW8FbalwOcpEs3xCg4B8jXH3iDD hxxmZL7E5dO+8INQV+PifleSV3rXKhjoORpQt7yJtVJdmrw44ObpUyKqcXo+CTbb6/gZ 6RTn29ommqQLIIklAvQyk/s0G2SaoNQ6jTQR4E3IJcEW/slaaz2qj8QHjMSVonOD0zMS zkzgIqLJ3ipjN3rVDlCrXQGYpOLgJnAcskLuXxKhGO/qYbbj1siTYyyOqFHuwyQg3ohM f+Ng== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=oLgSnDPoPuvsHqHGpN53E/WHYKUwDeQDxvXCpDIWEHA=; b=im50GCOMApFPGpS2aWAlZyk04LC3lpbl5jU/6e7hN/qrV5k3usKYb6lEgwbqGqu22p 9oO3EGAUGrDPUnt3CCrZ7m1BZDKR8Disg2ybs2HM/Pze+WhHrNNfVc/V791LD7MY2yIy /PtTfYLdQW3Ddk//96booHyld76WaB6qwWSd7F4U3lhZVV3ffQDgEYA//eTdEiz4BxFc t4ZeHYcMlVHfuEedRmXOa9dA2kwn3laAko77sBRJCaPtcMAtyjg8ALkci7+Iwc4KXwka g2ykvPtRaFRvap0dWu6wa2etVLjc4LM3SxASyXNogtHfvNK/oQAnuA2oU/dyJ7amVAIe UCuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=q3ykqFnW; 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 t1-20020a056402524100b0048c5bad4658si2501221edd.234.2023.01.04.01.25.45; Wed, 04 Jan 2023 01:26:09 -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=q3ykqFnW; 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 S234218AbjADJXH (ORCPT + 99 others); Wed, 4 Jan 2023 04:23:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234154AbjADJXB (ORCPT ); Wed, 4 Jan 2023 04:23:01 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8797BC4C for ; Wed, 4 Jan 2023 01:22:59 -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 17FB73FB17; Wed, 4 Jan 2023 09:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672824177; bh=a/im3KZyFNA2CosMlHGYViz9KJgGel1xGdkiZFIsEhA=; h=From:To:Cc:Subject:Date; b=q3ykqFnW9CcCW+jYax8JWGulJzj5jwpSKtNbVmhM2gB/sINfo4SHaVatgZ5+WJbB7 nkMZmKC9DdF7GD1FOIA4HoizeIe1+HB+A+uJRSKXgk0JnM0CXFnIrqEMLg6feUAO83 6Z87SFZhOXjhRyD9JJTMgmYZL2tU13mtlb86oCH8pQfoJukFPa/MT4PIf4LDfdV/5D yfJ5nanF9GH0FR8j5vHD75UF8ri3lWu9gTLr8zym2dh6pElE8f4gBvOAD9KsyQ1rA2 u3dhKx7Ot9W9Hx9gmi80r83tiryUB+ocHHPohO9lEiziNL9bAOoDYYBTsJPIGnYRnY 7/Mpx3E1xgw9g== From: Hector Martin To: Sven Peter , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Cc: Uday Shankar , Alyssa Rosenzweig , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Hector Martin Subject: [PATCH] nvme-apple: Add NVME_QUIRK_IDENTIFY_CNS quirk to fix regression Date: Wed, 4 Jan 2023 18:21:49 +0900 Message-Id: <20230104092148.15578-1-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754083485295625588?= X-GMAIL-MSGID: =?utf-8?q?1754083485295625588?= From the get-go, this driver and the ANS syslog have been complaining about namespace identification. In 6.2-rc1, commit 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues") regressed the driver by no longer allowing fallback to sequential namespace scans, leaving us with no namespaces. It turns out that the real problem is that this controller claiming NVMe 1.1 compat is treating the CNS field as a binary field, as in NVMe 1.0. This already has a quirk, NVME_QUIRK_IDENTIFY_CNS, so set it for the controller to fix all this nonsense (including other errors triggered by other CNS commands). Fixes: 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues") Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver") Signed-off-by: Hector Martin Reviewed-by: Sven Peter --- drivers/nvme/host/apple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.35.1 diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c index e17d3a8a0107..e13a992b6096 100644 --- a/drivers/nvme/host/apple.c +++ b/drivers/nvme/host/apple.c @@ -1553,7 +1553,7 @@ static int apple_nvme_probe(struct platform_device *pdev) } ret = nvme_init_ctrl(&anv->ctrl, anv->dev, &nvme_ctrl_ops, - NVME_QUIRK_SKIP_CID_GEN); + NVME_QUIRK_SKIP_CID_GEN | NVME_QUIRK_IDENTIFY_CNS); if (ret) { dev_err_probe(dev, ret, "Failed to initialize nvme_ctrl"); goto put_dev;