stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Yuji sasaki <sasakiy@chromium.org>,
	Vinod Koul <vkoul@kernel.org>, Mark Brown <broonie@kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 02/65] spi: qup: call spi_qup_pm_resume_runtime before suspending
Date: Tue, 24 Mar 2020 14:10:23 +0100	[thread overview]
Message-ID: <20200324130757.061144024@linuxfoundation.org> (raw)
In-Reply-To: <20200324130756.679112147@linuxfoundation.org>

From: Yuji Sasaki <sasakiy@chromium.org>

[ Upstream commit 136b5cd2e2f97581ae560cff0db2a3b5369112da ]

spi_qup_suspend() will cause synchronous external abort when
runtime suspend is enabled and applied, as it tries to
access SPI controller register while clock is already disabled
in spi_qup_pm_suspend_runtime().

Signed-off-by: Yuji sasaki <sasakiy@chromium.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200214074340.2286170-1-vkoul@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-qup.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 974a8ce58b68b..cb74fd1af2053 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -1190,6 +1190,11 @@ static int spi_qup_suspend(struct device *device)
 	struct spi_qup *controller = spi_master_get_devdata(master);
 	int ret;
 
+	if (pm_runtime_suspended(device)) {
+		ret = spi_qup_pm_resume_runtime(device);
+		if (ret)
+			return ret;
+	}
 	ret = spi_master_suspend(master);
 	if (ret)
 		return ret;
@@ -1198,10 +1203,8 @@ static int spi_qup_suspend(struct device *device)
 	if (ret)
 		return ret;
 
-	if (!pm_runtime_suspended(device)) {
-		clk_disable_unprepare(controller->cclk);
-		clk_disable_unprepare(controller->iclk);
-	}
+	clk_disable_unprepare(controller->cclk);
+	clk_disable_unprepare(controller->iclk);
 	return 0;
 }
 
-- 
2.20.1




  parent reply	other threads:[~2020-03-24 13:12 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 13:10 [PATCH 4.19 00/65] 4.19.113-rc1 review Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 01/65] drm/mediatek: Find the cursor plane instead of hard coding it Greg Kroah-Hartman
2020-03-24 13:10 ` Greg Kroah-Hartman [this message]
2020-03-24 13:10 ` [PATCH 4.19 03/65] powerpc: Include .BTF section Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 04/65] ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 05/65] spi: pxa2xx: Add CS control clock quirk Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 06/65] spi/zynqmp: remove entry that causes a cs glitch Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 07/65] drm/exynos: dsi: propagate error value and silence meaningless warning Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 08/65] drm/exynos: dsi: fix workaround for the legacy clock name Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 09/65] drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 10/65] altera-stapl: altera_get_note: prevent write beyond end of key Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 11/65] dm bio record: save/restore bi_end_io and bi_integrity Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 12/65] dm integrity: use dm_bio_record and dm_bio_restore Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 13/65] riscv: avoid the PIC offset of static percpu data in module beyond 2G limits Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 14/65] drm/amd/display: Clear link settings on MST disable connector Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 15/65] drm/amd/display: fix dcc swath size calculations on dcn1 Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 16/65] xenbus: req->body should be updated before req->state Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 17/65] xenbus: req->err " Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 18/65] block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 19/65] parse-maintainers: Mark as executable Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 20/65] USB: Disable LPM on WD19s Realtek Hub Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 21/65] usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 22/65] USB: serial: option: add ME910G1 ECM composition 0x110b Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 23/65] usb: host: xhci-plat: add a shutdown Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 24/65] USB: serial: pl2303: add device-id for HP LD381 Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 25/65] usb: xhci: apply XHCI_SUSPEND_DELAY to AMD XHCI controller 1022:145c Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 26/65] ALSA: line6: Fix endless MIDI read loop Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 27/65] ALSA: seq: virmidi: Fix running status after receiving sysex Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 28/65] ALSA: seq: oss: " Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 29/65] ALSA: pcm: oss: Avoid plugin buffer overflow Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 30/65] ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 31/65] iio: st_sensors: remap SMO8840 to LIS2DH12 Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 32/65] iio: trigger: stm32-timer: disable master mode when stopping Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 33/65] iio: magnetometer: ak8974: Fix negative raw values in sysfs Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 34/65] iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 35/65] mmc: rtsx_pci: Fix support for speed-modes that relies on tuning Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 36/65] mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2 Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 37/65] staging: rtl8188eu: Add device id for MERCUSYS MW150US v2 Greg Kroah-Hartman
2020-03-24 13:10 ` [PATCH 4.19 38/65] staging: greybus: loopback_test: fix poll-mask build breakage Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 39/65] staging/speakup: fix get_word non-space look-ahead Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 40/65] intel_th: Fix user-visible error codes Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 41/65] intel_th: pci: Add Elkhart Lake CPU support Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 42/65] rtc: max8907: add missing select REGMAP_IRQ Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 43/65] xhci: Do not open code __print_symbolic() in xhci trace events Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 44/65] btrfs: fix log context list corruption after rename whiteout error Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 45/65] drm/amd/amdgpu: Fix GPR read from debugfs (v2) Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 46/65] drm/lease: fix WARNING in idr_destroy Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 47/65] memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 48/65] mm: slub: be more careful about the double cmpxchg of freelist Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 49/65] mm, slub: prevent kmalloc_node crashes and memory leaks Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 50/65] page-flags: fix a crash at SetPageError(THP_SWAP) Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 51/65] x86/mm: split vmalloc_sync_all() Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 52/65] USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 53/65] USB: cdc-acm: fix rounding error " Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 54/65] iio: light: vcnl4000: update sampling periods for vcnl4200 Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 55/65] kbuild: Disable -Wpointer-to-enum-cast Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 56/65] futex: Fix inode life-time issue Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 57/65] futex: Unbreak futex hashing Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 58/65] Revert "vrf: mark skb for multicast or link-local as enslaved to VRF" Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 59/65] Revert "ipv6: Fix handling of LLA with VRF and sockets bound " Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 60/65] ALSA: hda/realtek: Fix pop noise on ALC225 Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 61/65] arm64: smp: fix smp_send_stop() behaviour Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 62/65] arm64: smp: fix crash_smp_send_stop() behaviour Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 63/65] drm/bridge: dw-hdmi: fix AVI frame colorimetry Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 64/65] staging: greybus: loopback_test: fix potential path truncation Greg Kroah-Hartman
2020-03-24 13:11 ` [PATCH 4.19 65/65] staging: greybus: loopback_test: fix potential path truncations Greg Kroah-Hartman
2020-03-24 15:53 ` [PATCH 4.19 00/65] 4.19.113-rc1 review Chris Paterson
2020-03-24 19:51 ` shuah
2020-03-24 20:55 ` Guenter Roeck
2020-03-25  4:50 ` Naresh Kamboju

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=20200324130757.061144024@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sasakiy@chromium.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@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).