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]
Date:   Wed, 13 Jan 2021 10:20:42 +0000
From:   吳昊澄 Ricky <ricky_wu@...ltek.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rui Feng <rui_feng@...lsil.com.cn>,
        Rui Miguel Silva <rmfrfs@...il.com>,
        Doug Anderson <dianders@...omium.org>,
        Lee Jones <lee.jones@...aro.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/2] mmc: rtsx: add delay before power on

> On Wed, 30 Dec 2020 at 10:04, <ricky_wu@...ltek.com> wrote:
> >
> > From: Ricky Wu <ricky_wu@...ltek.com>
> >
> > Make sure voltage below 0.5V before power on when do power cycle
> >
> > Signed-off-by: Ricky Wu <ricky_wu@...ltek.com>
> > ---
> >  drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c
> > b/drivers/mmc/host/rtsx_pci_sdmmc.c
> > index e6f5bbce5685..d21b99962b36 100644
> > --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> > +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> > @@ -906,6 +906,8 @@ static int sd_power_on(struct realtek_pci_sdmmc
> *host)
> >         if (host->power_state == SDMMC_POWER_ON)
> >                 return 0;
> >
> > +       mdelay(100);
> > +
> 
> Why exactly 100 ms? Can you at least add a comment about why in the code?
> 
> Moreover, I think you should convert to use msleep() rather than mdelay.
> 

Because we need to make sure voltage below 0.5V before power on
mmc-core will do quickly power cycle at recognition card phase, 
we need at least 100ms to make our device voltage below 0.5V 

I will change mdelay() to msleep()

> >         rtsx_pci_init_cmd(pcr);
> >         rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07,
> SD_MOD_SEL);
> >         rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
> > --
> > 2.17.1
> >
> 
> Kind regards
> Uffe
> 
> ------Please consider the environment before printing this e-mail.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ