Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581843

[PATCH 3.16 131/306] mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 3.16 131/306] mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused
Date 2017-02-16 00:20 +0100
Message-ID <tbh1F-6nD-67@gated-at.bofh.it> (permalink)
References <tbgRY-6hT-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.40-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Ulf Hansson <ulf.hansson@linaro.org>

commit 31cf742f515c275d22843c4c756e048d2b6d716c upstream.

The rtsx_usb_sdmmc driver may bail out in its ->set_ios() callback when no
SD card is inserted. This is wrong, as it could cause the device to remain
runtime resumed when it's unused. Fix this behaviour.

Tested-by: 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: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/mmc/host/rtsx_usb_sdmmc.c | 5 -----
 1 file changed, 5 deletions(-)

--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1138,11 +1138,6 @@ static void sdmmc_set_ios(struct mmc_hos
 	dev_dbg(sdmmc_dev(host), "%s\n", __func__);
 	mutex_lock(&ucr->dev_mutex);
 
-	if (rtsx_usb_card_exclusive_check(ucr, RTSX_USB_SD_CARD)) {
-		mutex_unlock(&ucr->dev_mutex);
-		return;
-	}
-
 	sd_set_power_mode(host, ios->power_mode);
 	sd_set_bus_width(host, ios->bus_width);
 	sd_set_timing(host, ios->timing, &host->ddr_mode);

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3.16 131/306] mmc: rtsx_usb_sdmmc: Avoid keeping the  device runtime resumed when unused Ben Hutchings <ben@decadent.org.uk> - 2017-02-16 00:20 +0100

csiph-web