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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFqcbK9OuQXbegignwiS7rz3L8resQ7Jfc8WvqXEKTcWVA@mail.gmail.com>
Date:	Tue, 16 Sep 2014 20:01:17 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	micky <micky_ching@...lsil.com.cn>
Cc:	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>,
	Roger <rogerable@...ltek.com>, Wei WANG <wei_wang@...lsil.com.cn>
Subject: Re: [PATCH] mmc: rtsx: add card power off during probe

On 12 September 2014 03:39,  <micky_ching@...lsil.com.cn> wrote:
> From: Roger Tseng <rogerable@...ltek.com>
>
> Some platform have both UEFI driver and MFD/mmc driver, if entering
> linux while card in the slot, the card power is already on, and rtsx-mmc
> driver have no chance to make card power off. This will lead UHSI card
> failed to enter UHSI mode.
>
> It is hard to control the UEFI driver leaving state, so we power off the
> card power during probe.
>
> Signed-off-by: Roger Tseng <rogerable@...ltek.com>
> Signed-off-by: Micky Ching <micky_ching@...lsil.com.cn>
> ---
>  drivers/mmc/host/rtsx_pci_sdmmc.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
> index dfde4a2..57b0796 100644
> --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> @@ -1341,8 +1341,13 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev)
>         host->pcr = pcr;
>         host->mmc = mmc;
>         host->pdev = pdev;
> -       host->power_state = SDMMC_POWER_OFF;
>         INIT_WORK(&host->work, sd_request);
> +       sd_power_off(host);
> +       /*
> +        * ref: SD spec 3.01: 6.4.1.2 Power On or Power Cycle
> +        */
> +       usleep_range(1000, 2000);
> +

This won't work in cases were you power off eMMC cards, unless you can
do a full power cycle - cut both VCC and VCCQ. Can you?

There are also another option you might want to use,
MMC_CAP2_NO_PRESCAN_POWERUP. But again, it must only be used for those
hosts that you are able to do a full power cycle for.

Kind regards
Uffe

>         platform_set_drvdata(pdev, host);
>         pcr->slots[RTSX_SD_CARD].p_dev = pdev;
>         pcr->slots[RTSX_SD_CARD].card_event = rtsx_pci_sdmmc_card_event;
> --
> 1.7.9.5
>
--
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