From: Roger Tseng <rogerable@realtek.com>
To: Samuel Ortiz <sameo@linux.intel.com>, Lee Jones <lee.jones@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>,
<driverdev-devel@linuxdriverproject.org>,
<wei_wang@realsil.com.cn>, <micky_ching@realsil.com.cn>,
Roger Tseng <rogerable@realtek.com>
Subject: [PATCH 1/2] mfd: rtsx_usb: Fix runtime PM deadlock
Date: Thu, 15 Jan 2015 15:14:44 +0800 [thread overview]
Message-ID: <1421306085-32254-2-git-send-email-rogerable@realtek.com> (raw)
In-Reply-To: <1421306085-32254-1-git-send-email-rogerable@realtek.com>
sd_set_power_mode() in derived module drivers/mmc/host/rtsx_usb_sdmmc.c
acquires dev_mutex and then calls pm_runtime_get_sync() to make sure the
device is awake while initializing a newly inserted card. Once it is
called during suspending state and explicitly before rtsx_usb_suspend()
acquires the same dev_mutex, both routine deadlock and further hang the
driver because pm_runtime_get_sync() waits the pending PM operations.
Fix this by using an empty suspend method. mmc_core always turns the
LED off after a request is done and thus it is ok to remove the only
rtsx_usb_turn_off_led() here.
Cc: <stable@vger.kernel.org> # v3.16+
Fixes: 730876be2566 ("mfd: Add realtek USB card reader driver")
Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
drivers/mfd/rtsx_usb.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/mfd/rtsx_usb.c b/drivers/mfd/rtsx_usb.c
index dbdd0faeb6ce..076694126e5d 100644
--- a/drivers/mfd/rtsx_usb.c
+++ b/drivers/mfd/rtsx_usb.c
@@ -687,15 +687,6 @@ static int rtsx_usb_suspend(struct usb_interface *intf, pm_message_t message)
dev_dbg(&intf->dev, "%s called with pm message 0x%04x\n",
__func__, message.event);
- /*
- * Call to make sure LED is off during suspend to save more power.
- * It is NOT a permanent state and could be turned on anytime later.
- * Thus no need to call turn_on when resunming.
- */
- mutex_lock(&ucr->dev_mutex);
- rtsx_usb_turn_off_led(ucr);
- mutex_unlock(&ucr->dev_mutex);
-
return 0;
}
--
2.1.3
next prev parent reply other threads:[~2015-01-15 7:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 7:14 [PATCH 0/2] Fix PM deadlock and card detection problem Roger Tseng
2015-01-15 7:14 ` Roger Tseng [this message]
2015-01-19 9:45 ` [PATCH 1/2] mfd: rtsx_usb: Fix runtime PM deadlock Lee Jones
2015-01-20 11:04 ` Roger Tseng
2015-01-20 16:07 ` Lee Jones
2015-01-21 6:58 ` Roger Tseng
2015-01-21 7:38 ` Lee Jones
2015-01-15 7:14 ` [PATCH 2/2] mfd: rtsx_usb: Defer autosuspend while card exists Roger Tseng
2015-01-19 9:47 ` Lee Jones
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=1421306085-32254-2-git-send-email-rogerable@realtek.com \
--to=rogerable@realtek.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=micky_ching@realsil.com.cn \
--cc=sameo@linux.intel.com \
--cc=wei_wang@realsil.com.cn \
/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
all inboxes | Powered by JetHome®