Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp436741rdb; Tue, 5 Dec 2023 09:19:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfPb1DWZUdMqpvTaxYztmRrsidGmfskMrAPEY4+yCFILekT5xBuHh1uZpe0enp47oBSIpq X-Received: by 2002:a05:6e02:1a4a:b0:35d:86c1:1061 with SMTP id u10-20020a056e021a4a00b0035d86c11061mr870843ilv.18.1701796779961; Tue, 05 Dec 2023 09:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701796779; cv=none; d=google.com; s=arc-20160816; b=p/L+TCGi0bf/U5geYXyd0T1eTnjptmhaE5cZduTEv9qPwx6iWS/KB68Km1uyfLjZ1P nfYGtFp8uK0/pXSPLd1tXmO+fSOIux0pElnjY0qLXGH3WQsltkW5o9U5LWrOjH3DfKGR uYeVJWojivz2HqMB05ukajhysgEwB/QmMWxFzZQMFE25mjWKv4NO4DKAZ0Fd/fQePrDA 11DTf3d7ZgmdPolPklwH7hcdns5CQEwtMV28fREZ+/AMYFEqeoaa9R5B/pcYJKRdajdC HGLqOHvBPdT8XL6U8ii4U+eVnoMF9D+ZCnA0J8A0LDwqsNveTL7/8g4dPftTQ49D7GqR HgUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=waunzxouAu+EhVCebQmRlGhPFC3Fc2GsLS9nml3O+7Q=; fh=NVnWk5T2KntHsJGfg2n0n9a4n2uTEP5oPuhoLphmjBY=; b=gpQvy8IfmPKWd0gcF4+OrI0z5QXMRH0N6wha5ev9vBRWarGsWRoiwsVQNThdVZkdFw eC7BVe9/3N1uSrZH+9wfPOsxE2/QmdSxYJSF0hjfe0ipN0pPfc2rYYOlmePb5sEOZG5s 5dUtlHkBx5hd/VTdAGqgPiEhNIlOMKayVw1SW8qnyvmHXIdtuQZZoj3BCmt4mg+mq1mg A5HMeEaXMP6n12Sa8/1h/6fSJbjedP9G5fmlaURlCnRRPY+GCx+l+J8TqL1eJwuTxt+1 2Ysr22Rsv0OGyoMpUkNrLg74YBuUX6gu6solEbi/ltd/+lFu9DQMyOrVrpmEccqs4HhR L2bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=BDy8Ub4l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuxedocomputers.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z28-20020a634c1c000000b005afc5ea43fdsi9754824pga.849.2023.12.05.09.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 09:19:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=BDy8Ub4l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuxedocomputers.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E18F1807385F; Tue, 5 Dec 2023 09:17:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345550AbjLERRZ (ORCPT + 99 others); Tue, 5 Dec 2023 12:17:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbjLERRY (ORCPT ); Tue, 5 Dec 2023 12:17:24 -0500 Received: from mail.tuxedocomputers.com (mail.tuxedocomputers.com [157.90.84.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 495B8A1 for ; Tue, 5 Dec 2023 09:17:30 -0800 (PST) Received: from [192.168.42.20] (p5de457e6.dip0.t-ipconnect.de [93.228.87.230]) (Authenticated sender: wse@tuxedocomputers.com) by mail.tuxedocomputers.com (Postfix) with ESMTPSA id 01B7C2FC01FB; Tue, 5 Dec 2023 18:17:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxedocomputers.com; s=default; t=1701796648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=waunzxouAu+EhVCebQmRlGhPFC3Fc2GsLS9nml3O+7Q=; b=BDy8Ub4llOR5f3HkIivg25SIFVoVgVyNtDJQs4Zk2UpJnMmgz8oRbfTvpIObN8NfcR9ZL6 RmLKAC/D7/Va+XxBt2meQFz8oVupjFgnMjC9+AvwVNDubJHdURZjm4TFpHQcR7+JD3t6sb utDdS8KhuUB4OPVHyi+6y2TPeowmOOY= Authentication-Results: mail.tuxedocomputers.com; auth=pass smtp.auth=wse@tuxedocomputers.com smtp.mailfrom=wse@tuxedocomputers.com Message-ID: <12d32e8e-e20b-4023-8299-39d2a69c0cd9@tuxedocomputers.com> Date: Tue, 5 Dec 2023 18:17:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nvme-pci: Add sleep quirk for Kingston drives Content-Language: en-US To: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Cc: Georg Gottleuber , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230920085210.22573-1-wse@tuxedocomputers.com> From: Werner Sembach In-Reply-To: <20230920085210.22573-1-wse@tuxedocomputers.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 09:17:41 -0800 (PST) Hi, Am 20.09.23 um 10:52 schrieb Werner Sembach: > From: Georg Gottleuber > > Some Kingston NV1 and A2000 are wasting a lot of power on specific TUXEDO > platforms in s2idle sleep if 'Simple Suspend' is used. > > This patch applies a new quirk 'Force No Simple Suspend' to achieve a > low power sleep without 'Simple Suspend'. > > Signed-off-by: Werner Sembach > Signed-off-by: Georg Gottleuber > Cc: Want to leave a gentle bump here. Any issues with this patch? Kind regards, Werner Sembach > --- > drivers/nvme/host/nvme.h | 5 +++++ > drivers/nvme/host/pci.c | 16 +++++++++++++++- > 2 files changed, 20 insertions(+), 1 deletion(-) > > diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h > index f35647c470afa..74f74b459f5fa 100644 > --- a/drivers/nvme/host/nvme.h > +++ b/drivers/nvme/host/nvme.h > @@ -156,6 +156,11 @@ enum nvme_quirks { > * No temperature thresholds for channels other than 0 (Composite). > */ > NVME_QUIRK_NO_SECONDARY_TEMP_THRESH = (1 << 19), > + > + /* > + * Disables simple suspend/resume path. > + */ > + NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND = (1 << 20), > }; > > /* > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > index 347cb5daebc3c..b4e6f0d21a44c 100644 > --- a/drivers/nvme/host/pci.c > +++ b/drivers/nvme/host/pci.c > @@ -2903,6 +2903,18 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev) > if ((dmi_match(DMI_BOARD_VENDOR, "LENOVO")) && > dmi_match(DMI_BOARD_NAME, "LNVNB161216")) > return NVME_QUIRK_SIMPLE_SUSPEND; > + } else if (pdev->vendor == 0x2646 && (pdev->device == 0x2263 || > + pdev->device == 0x500f)) { > + /* > + * Exclude some Kingston NV1 and A2000 devices from > + * NVME_QUIRK_SIMPLE_SUSPEND. Do a full suspend to save a > + * lot fo energy with s2idle sleep on some TUXEDO platforms. > + */ > + if (dmi_match(DMI_BOARD_NAME, "NS5X_NS7XAU") || > + dmi_match(DMI_BOARD_NAME, "NS5x_7xAU") || > + dmi_match(DMI_BOARD_NAME, "NS5x_7xPU") || > + dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1")) > + return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND; > } > > return 0; > @@ -2933,7 +2945,9 @@ static struct nvme_dev *nvme_pci_alloc_dev(struct pci_dev *pdev, > dev->dev = get_device(&pdev->dev); > > quirks |= check_vendor_combination_bug(pdev); > - if (!noacpi && acpi_storage_d3(&pdev->dev)) { > + if (!noacpi && > + !(quirks & NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND) && > + acpi_storage_d3(&pdev->dev)) { > /* > * Some systems use a bios work around to ask for D3 on > * platforms that support kernel managed suspend.