* Patch "memstick: rtsx_usb_ms: Manage runtime PM when accessing the device" has been added to the 4.4-stable tree
@ 2016-10-26 11:59 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-10-26 11:59 UTC (permalink / raw)
To: ulf.hansson, gregkh, rrs, stern; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
memstick: rtsx_usb_ms: Manage runtime PM when accessing the device
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
memstick-rtsx_usb_ms-manage-runtime-pm-when-accessing-the-device.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 9158cb29e7c2f10dd325eb1589f0fe745a271257 Mon Sep 17 00:00:00 2001
From: Ulf Hansson <ulf.hansson@linaro.org>
Date: Wed, 28 Sep 2016 11:33:28 -0700
Subject: memstick: rtsx_usb_ms: Manage runtime PM when accessing the device
From: Ulf Hansson <ulf.hansson@linaro.org>
commit 9158cb29e7c2f10dd325eb1589f0fe745a271257 upstream.
Accesses to the rtsx usb device, which is the parent of the rtsx memstick
device, must not be done unless it's runtime resumed. This is currently not
the case and it could trigger various errors.
Fix this by properly deal with runtime PM in this regards. This means
making sure the device is runtime resumed, when serving requests via the
->request() callback or changing settings via the ->set_param() callbacks.
Cc: Ritesh Raj Sarraf <rrs@researchut.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/memstick/host/rtsx_usb_ms.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/memstick/host/rtsx_usb_ms.c
+++ b/drivers/memstick/host/rtsx_usb_ms.c
@@ -524,6 +524,7 @@ static void rtsx_usb_ms_handle_req(struc
int rc;
if (!host->req) {
+ pm_runtime_get_sync(ms_dev(host));
do {
rc = memstick_next_req(msh, &host->req);
dev_dbg(ms_dev(host), "next req %d\n", rc);
@@ -544,6 +545,7 @@ static void rtsx_usb_ms_handle_req(struc
host->req->error);
}
} while (!rc);
+ pm_runtime_put(ms_dev(host));
}
}
@@ -570,6 +572,7 @@ static int rtsx_usb_ms_set_param(struct
dev_dbg(ms_dev(host), "%s: param = %d, value = %d\n",
__func__, param, value);
+ pm_runtime_get_sync(ms_dev(host));
mutex_lock(&ucr->dev_mutex);
err = rtsx_usb_card_exclusive_check(ucr, RTSX_USB_MS_CARD);
@@ -635,6 +638,7 @@ static int rtsx_usb_ms_set_param(struct
}
out:
mutex_unlock(&ucr->dev_mutex);
+ pm_runtime_put(ms_dev(host));
/* power-on delay */
if (param == MEMSTICK_POWER && value == MEMSTICK_POWER_ON)
Patches currently in stable-queue which might be from ulf.hansson@linaro.org are
queue-4.4/memstick-rtsx_usb_ms-manage-runtime-pm-when-accessing-the-device.patch
queue-4.4/mmc-sdhci-cast-unsigned-int-to-unsigned-long-long-to-avoid-unexpeted-error.patch
queue-4.4/mmc-core-annotate-cmd_hdr-as-__le32.patch
queue-4.4/mmc-block-don-t-use-cmd23-with-very-old-mmc-cards.patch
queue-4.4/memstick-rtsx_usb_ms-runtime-resume-the-device-when-polling-for-cards.patch
queue-4.4/mmc-rtsx_usb_sdmmc-avoid-keeping-the-device-runtime-resumed-when-unused.patch
queue-4.4/mmc-rtsx_usb_sdmmc-handle-runtime-pm-while-changing-the-led.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-26 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26 11:59 Patch "memstick: rtsx_usb_ms: Manage runtime PM when accessing the device" has been added to the 4.4-stable tree gregkh
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).