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: <a5bb2bb3-efe3-461f-a3d8-88af82f29b15@intel.com>
Date: Wed, 12 Jun 2024 11:11:22 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Haylen Chu <heylenay@...look.com>, Ulf Hansson <ulf.hansson@...aro.org>,
 Jisheng Zhang <jszhang@...nel.org>
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: sdhci-of-dwcmshc: Use inverted-wp quirk for CV18xx
 and SG200x SoCs

On 31/05/24 17:13, Haylen Chu wrote:
> MMC controller integrated in Sophgo CV18xx and SG200x SoCs has an
> inverted write-protect flag, causing SDCards misdetected as read-only.

Is it the SDHCI_WRITE_PROTECT bit of the SDHCI_PRESENT_STATE
register that needs to be inverted?

> So set SDHCI_QURIK_INVERTED_WRITE_PROTECT to make write protection work
> correctly.
> 
> Fixes: 017199c2849c ("mmc: sdhci-of-dwcmshc: Add support for Sophgo CV1800B and SG2002")
> Signed-off-by: Haylen Chu <heylenay@...look.com>
> ---
>  drivers/mmc/host/sdhci-of-dwcmshc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
> index 39edf04fedcf..62b7f28de54f 100644
> --- a/drivers/mmc/host/sdhci-of-dwcmshc.c
> +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
> @@ -962,7 +962,8 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_th1520_pdata = {
>  
>  static const struct sdhci_pltfm_data sdhci_dwcmshc_cv18xx_pdata = {
>  	.ops = &sdhci_dwcmshc_cv18xx_ops,
> -	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> +	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
> +		  SDHCI_QUIRK_INVERTED_WRITE_PROTECT,
>  	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
>  };
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ