From patchwork Thu Oct 13 11:37:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 77611 Delivered-To: patches@linaro.org Received: by 10.140.97.247 with SMTP id m110csp186613qge; Thu, 13 Oct 2016 04:37:55 -0700 (PDT) X-Received: by 10.25.160.130 with SMTP id j124mr8289949lfe.53.1476358675134; Thu, 13 Oct 2016 04:37:55 -0700 (PDT) Return-Path: Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com. [2a00:1450:4010:c07::22a]) by mx.google.com with ESMTPS id h36si8198246lfi.4.2016.10.13.04.37.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 04:37:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) client-ip=2a00:1450:4010:c07::22a; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22a.google.com with SMTP id b81so129733942lfe.1 for ; Thu, 13 Oct 2016 04:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hLdjNDVRXxv/9XNHJDdT3CNeHAxDJrjN/Yk8nPEeU0I=; b=IeZdugZrBgAPMHDCck2AV4RuM/RzPDORc74Gkcv7RVHLM+nNze99/6KKyXNY8yPgSb OhRb6wUQHXUSii+bwdSbB/eELkzWXzbD12x8NOoRaSeCqawPUEvGEhPz+Qnp3x12YNvf hOx6E/c97Q9IMz0tYYZDk98jclUok1mqrj/Ps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hLdjNDVRXxv/9XNHJDdT3CNeHAxDJrjN/Yk8nPEeU0I=; b=eXlm00sH24+0Oh+YPh5vr/8AAeDafM/QytjD62yQ7/huDGmjJeM9rUpJr7FYuP7Ve/ ORWHNUbGlxi2KC/8Q4p2gVt6uO3G4DFxUNAAVD9DR7xF8C5d7i8yKoTlieido6YoqsNA ejDmYuIgqDtFxpMJ4FAVemvdUIjJauqMp5NPBBHhbCDV9wS3xMsEtozyQFqcHMLbVcGh BJd6Z56xTdvyic2OQ/Zco4gFLcpJtPgB5n8NV+/u+5daCaehgbv+D8Ax61MyNLitICXi KZdbNALjxdmCfNQ/pVXBJYV30oxgixa5i316mREpp13sGXwfKNU+L7GpUqEkk3xy+iWE 0aag== X-Gm-Message-State: AA6/9RmzA7d45itjZB5Iak6X0dm5Ddml8qkoj+C3/IZbJYtlr6aqSv9Nino+xr1fHuzD6O3Zwaw= X-Received: by 10.25.18.97 with SMTP id h94mr9087509lfi.106.1476358674031; Thu, 13 Oct 2016 04:37:54 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id p76sm3648114lfd.11.2016.10.13.04.37.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Oct 2016 04:37:52 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson Cc: Ritesh Raj Sarraf , Alan Stern , Oliver Neukum , USB list , Roger Tseng , Wei WANG , Subject: [PATCH 1/6] mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused Date: Thu, 13 Oct 2016 13:37:35 +0200 Message-Id: <1476358660-8338-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476358660-8338-1-git-send-email-ulf.hansson@linaro.org> References: <1476358660-8338-1-git-send-email-ulf.hansson@linaro.org> 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 Cc: Cc: Alan Stern Signed-off-by: Ulf Hansson --- drivers/mmc/host/rtsx_usb_sdmmc.c | 5 ----- 1 file changed, 5 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 4106295..e0b8590 100644 --- 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_host *mmc, struct mmc_ios *ios) 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);