Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp65002rwe; Wed, 24 Aug 2022 17:06:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR4+bjFadOjXgRZm/CpP9qsBvyhacx1vKwfc7vlKk98pcODLWHsCkt6hd7DmsOVpLTvpKcRs X-Received: by 2002:a17:903:244c:b0:171:55cf:a930 with SMTP id l12-20020a170903244c00b0017155cfa930mr1199858pls.35.1661386008834; Wed, 24 Aug 2022 17:06:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661386008; cv=pass; d=google.com; s=arc-20160816; b=xkEKxRvfx0ZOnpq26xjJ0NXYH4wG4BHCCXxfkMN5A/uCVqiniDf0VwKN4kMZ9UTUT0 +6AFN6cLnzUNDFdF4+W3YySfW58i9LzZxZrL7oyuI4mqKuSjwIw+VjVP6RjzHIyL2F66 d4w8tBBdeKAGCeAhccK0yoUV90oulVErhCLgeJmBBGUluPZ9WIkZSsOJHJKvajKcs/BA 2L5c4RwEq2Ec4pm7+yJ2XH2RDXU+mLJBKLuuydKzx/lpG4psy+qwK6u+UURMPSMgA54j AZO6BpRfjLXVRSzvT+ymLgDuu9YSqQYbD/e72MS79knoCGUiBiREQuX9fWEluf3TcXEW kjCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=RtTll57rKKpfTGEN56yDOJM17wGxY8c7ZOFrBaDCcME=; b=nF/Hanp8AKsuQFQTTcCrc0I942d4cKNLJTUebed26utqKf2bHaaX4BpzNlJ5nxdi6Y gOh9ASSQpJ+MXNrmyWF9ueq9RItONpMZOrVt4QxCAUwFy01zOH9NspHuOZOeDzk8yQm4 3uMEOSY6FN3RJ4Yu2BhnoXhVzxb67FuVKJ9+xbHgXdMBwQdC5ju+W186xhnuz3Zte0W3 n2VnS/HXZc8SOVCHvDdUFVxbmlofKUW14jAE4ZJC/4Jj0CLE4Qitr0It/9xVWRHCLi4x nZF3xPTfDeye1DNIN7tKGpshgrnpWyyQalzTxMJ4WWRywlmqYi6oyFtdpDZL1yi3NkEG HyTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=bEqxwhjZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y22-20020a63de56000000b004297419ae8bsi16929660pgi.29.2022.08.24.17.06.35; Wed, 24 Aug 2022 17:06:48 -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=@amd.com header.s=selector1 header.b=bEqxwhjZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230153AbiHXXz6 (ORCPT + 99 others); Wed, 24 Aug 2022 19:55:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbiHXXz4 (ORCPT ); Wed, 24 Aug 2022 19:55:56 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2059.outbound.protection.outlook.com [40.107.244.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D74A03C146; Wed, 24 Aug 2022 16:55:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ER4Jj7+vk47JQ3Zlxzx3Ft+xiVkUkTkVIMF3ucuJyBH2zUUXvZbiC3qtGITuR22GD1FDQ6YZH9bozO4sNowebLHb9F/yYPUIyGr2YkHQLrMSMSuJ9BrkVfeXZ2j3+bdartPuCe+944t+j0j2nBQosCAAiyxGxxdkblqCALvbEGzxO6IVG+iyk9jWao99u50vXnjJGFZ5I8Ifld7yBCfLHbb6/AOfSrKjvsrPWuH31+FVn9CrRhGz/obiHmZHx5N6aTiRDIBpVy7ETDNGgY08qeh9wRh2q2c5LygOI4k6R42K+A3RLVGaUdrcimjzmIFtS5zouuuzUJojwwgpMKtPIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RtTll57rKKpfTGEN56yDOJM17wGxY8c7ZOFrBaDCcME=; b=TnKcESYGmVkgtgr3iKgC5MMLSxxK6FSOeCA8Dwgs0fzEc+u1MQm0Zm62OT1c5HkaSXfAgS9OUsz8sTu84GEpu8WGRr7vF8bkUwMM/MSmb7BO5Mp330LVb8Rw86JYzuYpe9ThMa3bVJr1YxpHaAU4OwQ9B2tcF0Wb3J4xTPRMG5sMx0ZDoML/zuvy8I+3MgyuUwLnIzGO7KiTCat5ZX+gyF5I/ebRwjOsK7IJbKHQgD91VVfwgmxPA4Ye4xiwU46IK6D2OnYk5w9GV6d8061ZiYPgp/ME/wAdi7DkvywiupcFoS18XKiLA5nKaXYVipFZML7/d5cACTbRG957reth/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RtTll57rKKpfTGEN56yDOJM17wGxY8c7ZOFrBaDCcME=; b=bEqxwhjZDqJoiEh6Jb9Dp0loDmk3lBOWZajXRNIYE+OEvtDZlOR/IGFGPlcsYDR+8adxNDi29UuXmsd4XhEHO2ueEDDF+jyJqOol6AwLAjvsOP/WLa/25meVMc8VTyWTK1qPcVdLJWWvSLznK7V8/iVIvHPWR8NET/b/SjOzC18= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by MN2PR12MB4405.namprd12.prod.outlook.com (2603:10b6:208:26d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Wed, 24 Aug 2022 23:55:53 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::e00a:1f8c:dcd1:afc3]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::e00a:1f8c:dcd1:afc3%5]) with mapi id 15.20.5546.022; Wed, 24 Aug 2022 23:55:52 +0000 Message-ID: <0b70fc12-6217-147f-c663-a1035738cf7d@amd.com> Date: Wed, 24 Aug 2022 18:55:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] ATA: ACPI: Do not check ACPI_FADT_LOW_POWER_S0 Content-Language: en-US To: Damien Le Moal , "Rafael J. Wysocki" Cc: linux-ide@vger.kernel.org, Linux ACPI , LKML References: <4426478.LvFx2qVVIh@kreacher> <9c479bb6-bb57-9b5a-2fa5-7b4d1b840245@opensource.wdc.com> From: Mario Limonciello In-Reply-To: <9c479bb6-bb57-9b5a-2fa5-7b4d1b840245@opensource.wdc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA9P221CA0010.NAMP221.PROD.OUTLOOK.COM (2603:10b6:806:25::15) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27dc11bc-340a-48d4-2191-08da862c2d89 X-MS-TrafficTypeDiagnostic: MN2PR12MB4405:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wHNYlH2LhzqsGwm9XdS679lpKAa/9He22fJhdwfuxOElk2sWsRP3jSvdLaGaWFS9LHPNh4lhnBdDjISrTFRVkN/FhMfGhXw++ztnNjh7yC3TtO+jHqJFJJvpM8yx5jIKVbukJLZmWPHgZ4Af3wm1Lmq26JAN6BP5Odn8NQc7HcaFt40XTYn0FVKCCSbDSUmuIMDs3SwyT21HXp9iAjuPZfTP4PxFE/Z2sqGHojh0WR+zxEy0zJXVb3YISskyMTrTYe5ZkRdZZR8xo45zcwWp0x00TqHiXNgmCMMb2PUJ2Mhfyky+p13jlzkxrtw4p/sCiPUk56b3eUxFA+QTORHoCLthm70POhKFQekUSgmV4PT8J2RlM3KRXpNgENhXAq1JoPRkiJo9PzffQtQdG8MN1uVabUuQyrRImuy5xpMyuGvd4M8RkWibfNaaSEX9rbd/hwvQ0Sn+WfOkHklDqu7EQXO8rjsbgy2aFPRubkj7FycUbMuL4lSOnug2ua/1cb91n6hJldpMf4nv0PFeY3o+OM8k7enBPQVit/1l/8by6xZ4tpWO/OQ9kh8bp2lgapY6AzMSSkdeQ3k6YBxmYOiOpDt1Yat/8FQRI5oaTI8pWOs4Papk96RYhu5cljcqCROY3WFAoo2Fh3z5mvSdcEJFirACtb42rc/XPAnpLhg3ZSMDTofCwPhLbkVhKQlFciko6hoY8J9u97up1z5LdXhZOZynoG/NaWGcZ8AsP7J69RWZ2OxXp24jfFjTFkCEHb+bVhiystZKFJc2UgIbBwSxQnHNj/MiU5zgiLnGf5hSi2uR2M33Rh9TFGyUszSqsbeaaE+9I9SU6WRvUfGIm+MVTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(346002)(136003)(366004)(39860400002)(376002)(66946007)(66476007)(38100700002)(8676002)(66556008)(110136005)(4326008)(84970400001)(31686004)(36756003)(31696002)(86362001)(2616005)(186003)(6512007)(26005)(6506007)(8936002)(41300700001)(5660300002)(478600001)(6486002)(54906003)(316002)(53546011)(83380400001)(2906002)(44832011)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bFF6WWJNKzZ3dS84UkhsSHB2MUdULzF2aThHdmNFNkkvYkIrdmdrdDFLbitJ?= =?utf-8?B?dnk0U2VCdmtVMmJTMEVuS1ZJd2l6U0h1Qnd2SXY3dHBXemFxVkMranE5Qzgr?= =?utf-8?B?Q20zNUt4djVQRXo5YVl0YUZhc2tVYVk3elRJTmpmcTIxSXBzUjdCU1JzMDZy?= =?utf-8?B?eTR4MkVSNUVDWFdWVklZOTBHMjFRSFJOdytoNDFvazNOS3RKVFQxdGNIZzNR?= =?utf-8?B?bVpZY0Y0Z1RHSXpYaDVlUGJPS0N5eTlFVjl0aWwvT21BNjl4K2FWdHhEaVlw?= =?utf-8?B?L0twVmJ0ZmdidGFJSHUyRjBvTkx5RzJtNlVwSnVJKzBtcjBUSmNtUU1oQjNa?= =?utf-8?B?WkxFOHFYU2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S-Exchange-CrossTenant-Network-Message-Id: 27dc11bc-340a-48d4-2191-08da862c2d89 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2022 23:55:52.8241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bOw1NvAbh8Y1XKQbpSnedT0SflWKC6ou7ALfDT28BdFlx8+g868yk+c6hcKeyimrCzx5sBgiXjKwNkBclkUOIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4405 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On 8/24/22 18:54, Damien Le Moal wrote: > On 2022/08/24 10:29, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki > > The patch title should be "ata: ahci: ..." > >> >> The ACPI_FADT_LOW_POWER_S0 flag merely means that it is better to >> use low-power S0 idle on the given platform than S3 (provided that >> the latter is supported) and it doesn't preclude using either of >> them (which of them will be used depends on the choices made by user >> space). >> >> For this reason, there is no benefit from checking that flag in >> ahci_update_initial_lpm_policy(). >> >> First off, it cannot be a bug to do S3 with policy set to either >> ATA_LPM_MIN_POWER_WITH_PARTIAL or ATA_LPM_MIN_POWER, because S3 can be >> used on systems with ACPI_FADT_LOW_POWER_S0 set and it must work if >> really supported, so the ACPI_FADT_LOW_POWER_S0 check is not needed to >> protect the S3-capable systems from failing. >> >> Second, suspend-to-idle can be carried out on a system with >> ACPI_FADT_LOW_POWER_S0 unset and it is expected to work, so if setting >> policy to either ATA_LPM_MIN_POWER_WITH_PARTIAL or ATA_LPM_MIN_POWER is >> needed to handle that case correctly, it should be done regardless of >> the ACPI_FADT_LOW_POWER_S0 value. >> >> Accordingly, drop the ACPI_FADT_LOW_POWER_S0 check from >> ahci_update_initial_lpm_policy(). >> >> Signed-off-by: Rafael J. Wysocki >> --- >> drivers/ata/ahci.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> Index: linux-pm/drivers/ata/ahci.c >> =================================================================== >> --- linux-pm.orig/drivers/ata/ahci.c >> +++ linux-pm/drivers/ata/ahci.c >> @@ -1610,8 +1610,7 @@ static void ahci_update_initial_lpm_poli >> } >> >> #ifdef CONFIG_ACPI >> - if (policy > ATA_LPM_MED_POWER && >> - (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) { >> + if (policy > ATA_LPM_MED_POWER) { If making this change, perhaps the #ifdef CONFIG_ACPI can drop too. >> if (hpriv->cap & HOST_CAP_PART) >> policy = ATA_LPM_MIN_POWER_WITH_PARTIAL; >> else if (hpriv->cap & HOST_CAP_SSC) >> >> >> > >