linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <Alexander.Levin@microsoft.com>
To: "stable@vger.kernel.org" <stable@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Tejun Heo <tj@kernel.org>,
	Sasha Levin <Alexander.Levin@microsoft.com>
Subject: [PATCH AUTOSEL 4.4 18/47] ata: libahci: Correct setting of DEVSLP register
Date: Sun, 2 Sep 2018 13:15:57 +0000	[thread overview]
Message-ID: <20180902131533.184092-18-alexander.levin@microsoft.com> (raw)
In-Reply-To: <20180902131533.184092-1-alexander.levin@microsoft.com>

From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

[ Upstream commit 2dbb3ec29a6c069035857a2fc4c24e80e5dfe3cc ]

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/datasheets
/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 <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 drivers/ata/libahci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 9628fa131757..8116cb2fef2d 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -2113,6 +2113,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

  parent reply	other threads:[~2018-09-02 13:19 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-02 13:15 [PATCH AUTOSEL 4.4 01/47] misc: mic: SCIF Fix scif_get_new_port() error handling Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 02/47] ethtool: Remove trailing semicolon for static inline Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 03/47] Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 04/47] gpio: tegra: Move driver registration to subsys_init level Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 05/47] scsi: target: fix __transport_register_session locking Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 06/47] media: usbtv: use irqsave() in USB's complete callback Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 07/47] md/raid5: fix data corruption of replacements after originals dropped Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 08/47] misc: ti-st: Fix memory leak in the error path of probe() Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 09/47] uio: potential double frees if __uio_register_device() fails Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 10/47] tty: rocket: Fix possible buffer overwrite on register_PCI Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 11/47] f2fs: do not set free of current section Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 12/47] perf tools: Allow overriding MAX_NR_CPUS at compile time Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 13/47] NFSv4.0 fix client reference leak in callback Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 14/47] macintosh/via-pmu: Add missing mmio accessors Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 15/47] ath10k: prevent active scans on potential unusable channels Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 16/47] wlcore: Set rx_status boottime_ns field on rx Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 17/47] MIPS: Fix ISA virt/bus conversion for non-zero PHYS_OFFSET Sasha Levin
2018-09-02 13:15 ` Sasha Levin [this message]
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 19/47] scsi: 3ware: fix return 0 on the error path of probe Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 20/47] ath10k: disable bundle mgmt tx completion event support Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 21/47] Bluetooth: hidp: Fix handling of strncpy for hid->name information Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 22/47] x86/mm: Remove in_nmi() warning from vmalloc_fault() Sasha Levin
2018-09-03 13:42   ` Pavel Machek
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 23/47] x86/kexec: Allocate 8k PGDs for PTI Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 24/47] gpio: ml-ioh: Fix buffer underwrite on probe error path Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 25/47] net: mvneta: fix mtu change on port without link Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 26/47] tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT) Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 27/47] MIPS: Octeon: add missing of_node_put() Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 28/47] iio: ad9523: Fix return value for ad952x_store() Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 29/47] net: dcb: For wild-card lookups, use priority -1, not 0 Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 30/47] Input: atmel_mxt_ts - only use first T9 instance Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 31/47] partitions/aix: append null character to print data from disk Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 32/47] partitions/aix: fix usage of uninitialized lv_info and lvname structures Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 33/47] media: em28xx: Fix DualHD disconnect oops Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 34/47] iommu/ipmmu-vmsa: Fix allocation in atomic context Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 35/47] mfd: ti_am335x_tscadc: Fix struct clk memory leak Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 36/47] f2fs: fix to do sanity check with {sit,nat}_ver_bitmap_bytesize Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 38/47] ALSA: wss: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 37/47] ALSA: riptide: Properly endian notations Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 39/47] ALSA: sb: Fix PCM format bit calculation Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 40/47] ALSA: asihpi: Fix PCM format notations Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 41/47] ALSA: ad1816a: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 42/47] ALSA: hda: Fix implicit PCM format type conversion Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 43/47] ALSA: au88x0: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 44/47] ALSA: sb: " Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 45/47] MIPS: WARN_ON invalid DMA cache maintenance, not BUG_ON Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 46/47] RDMA/cma: Do not ignore net namespace for unbound cm_id Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 47/47] fuse: Add missed unlock_page() to fuse_readpages_fill() Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180902131533.184092-18-alexander.levin@microsoft.com \
    --to=alexander.levin@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).