Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3052948imm; Mon, 16 Jul 2018 20:44:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeAjnplChsBvDDFh/DT5ZSLcdbogAKH8jHS8VdD9zDV7Ash+IC0fvzZjnkVawz3SI+JhGrw X-Received: by 2002:a62:4bc6:: with SMTP id d67-v6mr20453810pfj.175.1531799056426; Mon, 16 Jul 2018 20:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531799056; cv=none; d=google.com; s=arc-20160816; b=CWI0jAqIO3aEa8T9zbkdy0bnppgJCZhwK+G5JWw/+3cgDCIxqx8vvAEppxiR+tb0kj qiz8p5vTF3FO3g/7Oe54mTFu7KmqyrbeQLNQXZhqTGdyiNOKoZ32uyf0u6d4a+cdJMsH uSsD7f9pCnb1yVAwxPM0eJesgBEN+0ujXCOMU8GxaCBX5K4P3SlA/KZB7M+SBZfyfOdH j2HkAcVDcT+RumGahOH4EiPhWvl9IH1/96izZnsDMTDCNCpdCSgdRNXweBMelNDsxfTG 4lrHrXYGA5k1P8Ydv9DmSyI3k0ZSWl/PxqJQ+1lSbxypG7oukECY4zfe1FnI6iQqTmDw Kp6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=WF3z1JdQBVuRlwDzOAC7gEiObi5ajfgMVUB6oS+Hrw8=; b=BAFd9V/Sl4/Q3UhsPkGq2E6KCMwNS/G5SC8Q+QADY5Y2bbEvAryHCgNBCbZFDNToli Vsd5Y9pEARdtb85xbjF1sueUxWgsxPFdccA5DrvuclwlLxtM2ROfFPM1pZE4O3mqYtCi SUG2HLxPQVIDAKlehrBIorV4kg9z/VrcjLFoq4PvvE35w2FReGcJrrqvmOnT2inZGSqn kFrTPEjM6b2C55QVZMSncz2XjyysAuSUU3xa5/FBGF9rUqmabBqpYRKgsW7NLSJcYbnH jOrq5s+1aQdq/Gfvq2bDRMZ8R8Hl3g697VFoKY5w/gkAQl2w7JonMnE0aIv5ON3EgRJa Q4rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 140-v6si32009916pgd.19.2018.07.16.20.44.01; Mon, 16 Jul 2018 20:44:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbeGQENz (ORCPT + 99 others); Tue, 17 Jul 2018 00:13:55 -0400 Received: from mga12.intel.com ([192.55.52.136]:51220 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbeGQENz (ORCPT ); Tue, 17 Jul 2018 00:13:55 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2018 20:43:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,364,1526367600"; d="scan'208";a="246276268" Received: from spandruv-mobl.amr.corp.intel.com ([10.254.8.16]) by fmsmga006.fm.intel.com with ESMTP; 16 Jul 2018 20:43:27 -0700 Message-ID: <701525498127eae51cd95f89fa88b53d411a9b71.camel@linux.intel.com> Subject: Re: [PATCH 1/2] ata: libahci: Correct setting of DEVSLP register From: Srinivas Pandruvada To: AceLan Kao Cc: tj@kernel.org, hdegoede@redhat.com, rjw@rjwysocki.net, alan.cox@intel.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 16 Jul 2018 20:43:27 -0700 In-Reply-To: References: <20180702190154.6864-1-srinivas.pandruvada@linux.intel.com> <20180702190154.6864-2-srinivas.pandruvada@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.3 (3.28.3-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-07-17 at 11:26 +0800, AceLan Kao wrote: > Tested-by: AceLan Kao Thanks Kao for the test. -Srinivas > > The patches help the power consumption a little bit on my test > system, > and no obvious issue I can observe. > > 2018-07-03 3:01 GMT+08:00 Srinivas Pandruvada nux.intel.com>: > > We have seen that on some platforms, SATA device never show any > > DEVSLP > > residency. This prevent power gating of SATA IP, which prevent > > system > > to transition to low power mode in systems with SLP_S0 aka modern > > standby systems. The PHY logic is off only in DEVSLP not in > > slumber. > > Reference: > > https://www.intel.com/content/dam/www/public/us/en/documents/datash > > eets > > /332995-skylake-i-o-platform-datasheet-volume-1.pdf > > Section 28.7.6.1 > > > > Here driver is trying to do read-modify-write the devslp register. > > But > > not resetting the bits for which this driver will modify values > > (DITO, > > MDAT and DETO). So simply reset those bits before updating to new > > values. > > > > Signed-off-by: Srinivas Pandruvada > .com> > > Reviewed-by: Rafael J. Wysocki > > --- > > drivers/ata/libahci.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c > > index 965842a08743..f6795d261869 100644 > > --- a/drivers/ata/libahci.c > > +++ b/drivers/ata/libahci.c > > @@ -2159,6 +2159,8 @@ static void ahci_set_aggressive_devslp(struct > > ata_port *ap, bool sleep) > > deto = 20; > > } > > > > + /* Make dito, mdat, deto bits to 0s */ > > + devslp &= ~GENMASK_ULL(24, 2); > > devslp |= ((dito << PORT_DEVSLP_DITO_OFFSET) | > > (mdat << PORT_DEVSLP_MDAT_OFFSET) | > > (deto << PORT_DEVSLP_DETO_OFFSET) | > > -- > > 2.17.1 > > > >