Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbdLFPoO (ORCPT ); Wed, 6 Dec 2017 10:44:14 -0500 Received: from mail-wr0-f177.google.com ([209.85.128.177]:33785 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbdLFPoG (ORCPT ); Wed, 6 Dec 2017 10:44:06 -0500 X-Google-Smtp-Source: AGs4zMa9hxGnx/tOgyVFCn30n1LbWQh+AssHI5/bCXoUiUsurF/QerltmmR5tDs6rPYQ2J79ZUuOlA== Subject: Re: [PATCH] mfd: Fix RTS5227 (and others) powermanagement To: Lee Jones Cc: linux-kernel@vger.kernel.org, Rui Feng References: <20171206112135.9332-1-hdegoede@redhat.com> <20171206154216.p34bksrk4bnx2krq@dell> From: Hans de Goede Message-ID: <906755d5-45b4-c4d0-e4b7-e501e5e7b450@redhat.com> Date: Wed, 6 Dec 2017 16:44:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171206154216.p34bksrk4bnx2krq@dell> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 50 Hi, On 06-12-17 16:42, Lee Jones wrote: > On Wed, 06 Dec 2017, Hans de Goede wrote: > >> Hi, >> >> On 06-12-17 12:21, Hans de Goede wrote: >>> Commit 8275b77a1513 ("mfd: rts5249: Add support for RTS5250S power >>> saving") adds powersaving support for device-ids 5249 524a and 525a. >>> >>> But as a side effect it breaks ASPM support for all the other device-ids, >>> causing e.g. the Haswell CPU on a Lenovo T440s to not go into a higher >>> c-state then PC3, while previously it would go to PC7, causing the >>> machine to idle at 7.4W instead of 6.6W! >>> >>> The problem here is the new option.dev_aspm_mode field, which only gets >>> explicitly initialized in the new code for the device-ids 5249 524a and >>> 525a. Leaving the dev_aspm_mode 0 for the other device-ids. >>> >>> The default dev_aspm_mode 0 is mapped to DEV_ASPM_DISABLE, but the >>> old behavior of calling rtsx_pci_enable_aspm() when idle and >>> rtsx_pci_disable_aspm() when busy happens when dev_aspm_mode == >>> DEV_ASPM_DYNAMIC. >>> >>> This commit changes the enum so that 0 = DEV_ASPM_DYNAMIC matching the >>> old default behavior, fixing the pm regression with the other device-ids. >>> >>> Cc: Rui Feng >>> Signed-off-by: Hans de Goede >> >> p.s. >> >> 2 remarks: >> >> 1. As this is a regression in 4.15, please queue this up as a fix for 4.15 >> (I prioritized bisecting this, which took me a whole day to get a fix >> ready in time for 4.15). > > If this is aimed at -the rcs, you should apply a Fixes: tag. Right, I should have thought of that myself. > Happy to do it for you this time. Thanks you. Regards, Hans