Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp12992629rwl; Wed, 4 Jan 2023 01:47:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6KJuGIZ5o0qGWmelL7FnN86tnQGtVSVV/dQvNWlNmvaDYhR9Gk5P79IppRFAWbIsoKDAV X-Received: by 2002:a05:6a20:4911:b0:b0:4dbd:5f86 with SMTP id ft17-20020a056a20491100b000b04dbd5f86mr53170696pzb.62.1672825649679; Wed, 04 Jan 2023 01:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672825649; cv=none; d=google.com; s=arc-20160816; b=wK7wb27Utgn62jAfGWTEx3c6W1K8Bw4gDtRc4xSBDCujuD51kMYqQRW6OXAEWW9ZWG FagkLbxwNfYtjrcI49w/c+x30fDbICCDGZEuuFKAfI9kyC8GbDZWd7ooGeie3Nzodhzc wIp/qsm2Tr3lWvFY5uDJrKM8vULC97AyfM4GfUBH+Xb4Bzk5u0z8sJB4EGdq/8OEECaQ EHcfu8sw/Oue7H/+xtoKluRtC5jZzyF1HWHt8GZRSvjVpQQPReQ9DSxImlTfVflRo4Dw n4pR0UFmfO8US2H9uvgYS+7Ls/5135r4e23Trs/o+6YeONThozztKOc9dO/YsxAp4oCD ZRNA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1-20020a63b441000000b0046edbb5b20esi2325162pgu.668.2023.01.04.01.47.22; Wed, 04 Jan 2023 01:47:29 -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 + 57 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/nvme/host/apple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.35.1