Patch "memstick: rtsx_usb_ms: Manage runtime PM when accessing the device" has been added to the 4.8-stable tree
Subsystems (2)
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.8-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.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
9158cb29e7c2f10dd325eb1589f0fe745a271257Mon Sep 17 00:00:00 2001
From: Ulf Hansson <[email protected]>
Date: Wed, 28 Sep 2016 11:33:28 -0700
Subject: memstick: rtsx_usb_ms: Manage runtime PM when accessing the device
From: Ulf Hansson <[email protected]>
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.
--- drivers/memstick/host/rtsx_usb_ms.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/memstick/host/rtsx_usb_ms.c +4 -0
@@ -524,6 +524,7 @@ static void rtsx_usb_ms_handle_req(strucint 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(structdev_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 [email protected] are
queue-4.8/memstick-rtsx_usb_ms-manage-runtime-pm-when-accessing-the-device.patch queue-4.8/mmc-sdhci-cast-unsigned-int-to-unsigned-long-long-to-avoid-unexpeted-error.patch queue-4.8/mmc-core-annotate-cmd_hdr-as-__le32.patch queue-4.8/mmc-block-don-t-use-cmd23-with-very-old-mmc-cards.patch queue-4.8/mmc-core-switch-to-1v8-or-1v2-for-hs400es-mode.patch queue-4.8/memstick-rtsx_usb_ms-runtime-resume-the-device-when-polling-for-cards.patch queue-4.8/mmc-rtsx_usb_sdmmc-avoid-keeping-the-device-runtime-resumed-when-unused.patch queue-4.8/mmc-rtsx_usb_sdmmc-handle-runtime-pm-while-changing-the-led.patch