]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
spi: sh-msiof: Fix invalid SPI use during system suspend
authorGaku Inami <gaku.inami.xw@bp.renesas.com>
Wed, 5 Sep 2018 08:49:36 +0000 (10:49 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:14 +0000 (19:51 -0600)
commit9e4219ff119cbd92912338c242c8ed5d2a1fa865
treebda01f17b2c297860fd80ef22ff4a2a4e186bd6d
parentaefe6e7afe0dbb2e78e08e50d9ef1dab70d8382b
spi: sh-msiof: Fix invalid SPI use during system suspend

BugLink: https://bugs.launchpad.net/bugs/1836287
commit ffa69d6a16f686efe45269342474e421f2aa58b2 upstream.

If the SPI queue is running during system suspend, the system may lock
up.

Fix this by stopping/restarting the queue during system suspend/resume
by calling spi_master_suspend()/spi_master_resume() from the PM
callbacks.  In-kernel users will receive an -ESHUTDOWN error while
system suspend/resume is in progress.

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
[geert: Cleanup, reword]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/spi/spi-sh-msiof.c