lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Sep 2014 11:20:42 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Roger Tseng <rogerable@...ltek.com>
Cc:	micky <micky_ching@...lsil.com.cn>, Chris Ball <chris@...ntf.net>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	"driverdev-devel@...uxdriverproject.org" 
	<devel@...uxdriverproject.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	Wei_wang <wei_wang@...lsil.com.cn>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH] mmc: rtsx: add card power off during probe

On 22 September 2014 12:09, Roger Tseng <rogerable@...ltek.com> wrote:
> 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.

Actually the above commits was added due to the below commit:

fa5501890d8974301042e0202d342a6cbe8609f4

But the commits you refer to, didn't bring back the old behaviour,
which I think was the intent. Instead we added a NOP call to
mmc_power_off() from mmc_start_host().

We have few options on how to go forward, but let's loop in Adrian
Hunter first, since he might be able to comment on this as well.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ