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: <CAPDyKFpKMNe0Gb_amtXADjFJZ2AhPqhL3oqgek-rpOUZaKdZeQ@mail.gmail.com>
Date:	Wed, 6 Jul 2016 18:21:59 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Shawn Lin <shawn.lin@...k-chips.com>
Cc:	Adrian Hunter <adrian.hunter@...el.com>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	Rob Herring <robh+dt@...nel.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Doug Anderson <dianders@...omium.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH 1/3] mmc: core: Allow hosts to specify non-support for MMC commands

On 1 July 2016 at 09:45, Shawn Lin <shawn.lin@...k-chips.com> wrote:
> Host drivers which needs to valdiate for non-supported MMC
> commands and returnn error code for such requests.
>
> To improve and simplify the behaviour, let's invent MMC_CAP2_NO_MMC
> which these host drivers can set to tell the mmc core to skip sending MMC
> commands during card initialization.
>
> Signed-off-by: Shawn Lin <shawn.lin@...k-chips.com>

Thanks, applied for next!

Delaying patch2 and patch3 until I received acks from DT maintainers.

Kind regards
Uffe

>
> ---
>
>  drivers/mmc/core/core.c  | 5 +++--
>  include/linux/mmc/host.h | 1 +
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 4c823df..94cbf4e 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2510,8 +2510,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
>                 if (!mmc_attach_sd(host))
>                         return 0;
>
> -       if (!mmc_attach_mmc(host))
> -               return 0;
> +       if (!(host->caps2 & MMC_CAP2_NO_MMC))
> +               if (!mmc_attach_mmc(host))
> +                       return 0;
>
>         mmc_power_off(host);
>         return -EIO;
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index c22476d..aa4bfbf 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -310,6 +310,7 @@ struct mmc_host {
>  #define MMC_CAP2_NO_SDIO       (1 << 19)       /* Do not send SDIO commands during initialization */
>  #define MMC_CAP2_HS400_ES      (1 << 20)       /* Host supports enhanced strobe */
>  #define MMC_CAP2_NO_SD         (1 << 21)       /* Do not send SD commands during initialization */
> +#define MMC_CAP2_NO_MMC                (1 << 22)       /* Do not send (e)MMC commands during initialization */
>
>         mmc_pm_flag_t           pm_caps;        /* supported pm features */
>
> --
> 2.3.7
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ