Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2905134iog; Mon, 27 Jun 2022 05:29:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sV2C/nY8H+hnEEWY8jjnELYOl+iwWa/OK9eDRiupfB5TMmfsaG1/QgSN0gvvFltaGQQgbA X-Received: by 2002:a05:6402:2804:b0:431:7dde:6fb5 with SMTP id h4-20020a056402280400b004317dde6fb5mr16352156ede.379.1656332968072; Mon, 27 Jun 2022 05:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656332968; cv=none; d=google.com; s=arc-20160816; b=MR6ujjR7VBbYQrUU0BPfEFNWoF31ATvzqHdhYGHNQ4ZJcV+inkx+6uzaKbveuNLDXs wAuKqb2QFY1ct6BOqaCVW/WE35afaTVc178pBxI0J0jyAU4iQmBHyrLCuWPHwWcIsQNt N6/sJ4FfT6bHSSo+NoqIeH0XUT19cx77DUj8PqLCvXrFLCZPJpt2oZvj81Tsg90ZnL2q z6eqJfmxq9wgtcCHfcv50S6tpfr15iTPSOAuwv5dD5+jJWRC8H/vtYQ0ifm+aZ91M1ID dGm95ccTmI6gGxRgZUd47gJdkLYCC/Fpp3wmvf7SP2IR/6WFTNBiD37yyeJmi6WNARks yfaQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xf5JKV0PaxB+rze9M04B59bEL8FyPduDa7KbYfAFtXc=; b=pBAGdHhN5AodFEuy67C1K2RnwxJOxmXu6f6z2QcLhJsv8yp4rgL2f4+IthHCJL/3FG 3BBCerLBN5LMOZMs7KAAnPIMClWSgSZLeGSfC6YowQZTL3EwaepUP52hV6mzByK0iiMB tg1FUOV11UArbMOmRcP5EJ99k0kp4c3cfMcqhLFM6SjjjUm3k9wo/7QU/u3Jzg4NDXjn jjLDjZ0F/VYqDlTLfMmIH//0sLk9iQqvUsfHkTDglzLYhmC5dCQ7b3G5Ji+TyUfEAzJg l7VoHHN2BWqflB2MVRLBO2hcu9Uc0lvWcm8SCONqtWGdRJFiCHYiwm2PPWGzc9y67tCl ngyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="UTMagV/1"; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a0564021e9000b00425d8c9efd2si14734948edf.152.2022.06.27.05.29.03; Mon, 27 Jun 2022 05:29:28 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b="UTMagV/1"; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239171AbiF0LzM (ORCPT + 99 others); Mon, 27 Jun 2022 07:55:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238562AbiF0Lsq (ORCPT ); Mon, 27 Jun 2022 07:48:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 944FE101FA; Mon, 27 Jun 2022 04:42:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 12CDA61208; Mon, 27 Jun 2022 11:42:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27290C3411D; Mon, 27 Jun 2022 11:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330141; bh=Ovg5KfB61gT914x/8BIG61Aa3Dqe0xiyAs4tQvKXrZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UTMagV/1B473pk7V174topPJNhaiFx/jb+NASVaRTAnIYQlbBO3ncMsXVbIxgliaz vaRdFWWnOMWdgT7D4UMB5NrrFnZNvRrSMv0g5s93hhNNHcLiExBpIkA4QYrTkkeT1M 4aFKJOkHuArgTDYtRIi4DMVDjAIJUT9uMB7qrK5Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Pankaj Raghav , Sasha Levin Subject: [PATCH 5.18 099/181] nvme: move the Samsung X5 quirk entry to the core quirks Date: Mon, 27 Jun 2022 13:21:12 +0200 Message-Id: <20220627111947.566413521@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: Christoph Hellwig [ Upstream commit e6487833182a8a0187f0292aca542fc163ccd03e ] This device shares the PCI ID with the Samsung 970 Evo Plus that does not need or want the quirks. Move the the quirk entry to the core table based on the model number instead. Fixes: bc360b0b1611 ("nvme-pci: add quirks for Samsung X5 SSDs") Signed-off-by: Christoph Hellwig Reviewed-by: Pankaj Raghav Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 14 ++++++++++++++ drivers/nvme/host/pci.c | 4 ---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 1ea85c88d795..a2862a56fadc 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2487,6 +2487,20 @@ static const struct nvme_core_quirk_entry core_quirks[] = { .vid = 0x1e0f, .mn = "KCD6XVUL6T40", .quirks = NVME_QUIRK_NO_APST, + }, + { + /* + * The external Samsung X5 SSD fails initialization without a + * delay before checking if it is ready and has a whole set of + * other problems. To make this even more interesting, it + * shares the PCI ID with internal Samsung 970 Evo Plus that + * does not need or want these quirks. + */ + .vid = 0x144d, + .mn = "Samsung Portable SSD X5", + .quirks = NVME_QUIRK_DELAY_BEFORE_CHK_RDY | + NVME_QUIRK_NO_DEEPEST_PS | + NVME_QUIRK_IGNORE_DEV_SUBNQN, } }; diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 17aeb7d5c485..ddea0fb90c28 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3475,10 +3475,6 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_128_BYTES_SQES | NVME_QUIRK_SHARED_TAGS | NVME_QUIRK_SKIP_CID_GEN }, - { PCI_DEVICE(0x144d, 0xa808), /* Samsung X5 */ - .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY| - NVME_QUIRK_NO_DEEPEST_PS | - NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, { 0, } }; -- 2.35.1