From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbaIVKKG (ORCPT ); Mon, 22 Sep 2014 06:10:06 -0400 Received: from rtits2.realtek.com ([60.250.210.242]:34880 "EHLO rtits2.realtek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbaIVKKE (ORCPT ); Mon, 22 Sep 2014 06:10:04 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.49 with qID s8MA9W1H008220, This message is accepted by code: ctloc85258 From: Roger Tseng To: Ulf Hansson CC: micky , Chris Ball , "Samuel Ortiz" , Greg Kroah-Hartman , Dan Carpenter , "driverdev-devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" , linux-mmc , Wei_wang Subject: Re: [PATCH] mmc: rtsx: add card power off during probe Thread-Topic: [PATCH] mmc: rtsx: add card power off during probe Thread-Index: AQHP04WDQdGgh34FlUGGFNVQtE8cSpwMbesA Date: Mon, 22 Sep 2014 10:09:32 +0000 Message-ID: <1411380672.24091.18.camel@debian-rtk5880> References: <1410485999-10939-1-git-send-email-micky_ching@realsil.com.cn> <54195036.2010409@realsil.com.cn> <1411024883.27455.11.camel@debian-rtk5880> In-Reply-To: Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.81.121] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id s8MAABK0027524 On Thu, 2014-09-18 at 23:14 +0200, Ulf Hansson wrote: > [...] > > >> > >> In that case, don't forget to enable MMC_CAP2_FULL_PWR_CYCLE. > >> > >> > > >> > if MMC_CAP2_NO_PRESCAN_POWERUP enable, will call mmc_power_off() at start, > >> > then it will check ios.power_mode, but the state is MMC_POWER_OFF and just > >> > return. > >> > >> Uhh, that's right! So, I wonder why we invokes mmc_power_off() from > >> that path at all. > >> > >> Hmm, I think we should change the behavior in mmc_start_host(), like below: > >> 1) Add a "MMC_POWER_UNDEFINED" state which is what the power state > >> should be assigned to at allocation. > >> 2 ) From mmc_start_host(), invoke mmc_power_off() when > >> MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE is set. > >> > >> Would that work? > > Yes. I have confirmed this by following changes. The MMC_POWER_UNDEFINED > > designation in mmc_start_host() will eventually cause a power-off > > operation. > > > > But I wonder if we need to additionally check MMC_CAP2_FULL_PWR_CYCLE > > before calling mmc_power_off()? > > The intent from my side was to keep the current behaviour for those > that already used MMC_CAP2_NO_PRESCAN_POWERUP, but it's s not a big > deal. > I checked the log and found the commit that invokes mmc_power_off(): a08b17be8b984a7c51cd5a480cd977363df353f9 0d3e3350d5871c53464be4c92d57198744247005 (https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg19638.html ) The proposed change might bring back some delay since invoking mmc_power_off() in mmc_start_host() is more than NOP now and triggers real power-off and re-init in sdhci. Will this be OK? > So, let's try your proposal, thus don't check MMC_CAP2_FULL_PWR_CYCLE. > > Can you repost new version of your patches and please split them up on > core and host separately. > > Kind regards > Uffe > > ------Please consider the environment before printing this e-mail. -- Best regards, Roger Tseng {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I