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] [day] [month] [year] [list]
Message-ID: <db5a89e2-9e9d-4340-b7b4-22a4c13b27e2@rock-chips.com>
Date: Thu, 18 Dec 2025 14:55:31 +0800
From: Shawn Lin <shawn.lin@...k-chips.com>
To: "ping.gao" <ping.gao@...sung.com>
Cc: shawn.lin@...k-chips.com, jh80.chung@...sung.com, ulf.hansson@...aro.org,
 linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org
Subject: Re: [PATCH] MMC:dw_mmc:when disable biu_clk should check whether this
 clk is normal

在 2025/12/18 星期四 14:50, ping.gao 写道:
> some vendor not enable biu_clk , disable it will panic
> 

Sorry, I can't follow the below changes.
Isn't we disable biu_clk in dw_mci_runtime_suspend(()?
How could that work because biu_clk is used for register
access, FIFO access, etc.


> Signed-off-by: ping.gao <ping.gao@...sung.com>
> ---
>   drivers/mmc/host/dw_mmc.c | 21 +++++++++++++++------
>   1 file changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c5db92bbb094..e737333a0727 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3633,9 +3633,15 @@ int dw_mci_runtime_resume(struct device *dev)
>   	if (host->slot &&
>   	    (mmc_host_can_gpio_cd(host->slot->mmc) ||
>   	     !mmc_card_is_removable(host->slot->mmc))) {
> -		ret = clk_prepare_enable(host->biu_clk);
> -		if (ret)
> -			return ret;
> +		if (IS_ERR(host->biu_clk)) {
> +			dev_dbg(host->dev, "biu clock not available\n");
> +		} else {
> +			ret = clk_prepare_enable(host->biu_clk);
> +			if (ret) {
> +				dev_err(host->dev, "failed to enable biu clock\n");
> +				goto err;
> +			}
> +		}
>   	}
>   
>   	ret = clk_prepare_enable(host->ciu_clk);
> @@ -3686,9 +3692,12 @@ int dw_mci_runtime_resume(struct device *dev)
>   err:
>   	if (host->slot &&
>   	    (mmc_host_can_gpio_cd(host->slot->mmc) ||
> -	     !mmc_card_is_removable(host->slot->mmc)))
> -		clk_disable_unprepare(host->biu_clk);
> -
> +	     !mmc_card_is_removable(host->slot->mmc))) {
> +		if (IS_ERR(host->biu_clk))
> +			dev_dbg(host->dev, "biu clock not available\n");
> +		else
> +			clk_disable_unprepare(host->biu_clk);
> +	}
>   	return ret;
>   }
>   EXPORT_SYMBOL(dw_mci_runtime_resume);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ