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: <1eb94100-32eb-45fa-9dd9-6c5c96d9c0e4@rock-chips.com>
Date: Tue, 9 Dec 2025 15:03:34 +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,
 linux-mmc@...r.kernel.org, ulf.hansson@...aro.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: dw_mmc: Use pre_request & post_request_end helper

On 2025/12/09 Tuesday 14:49, ping.gao wrote:
> Use vendor drv function to let other vendor can add some vendor function
> before and after request
> 

Without a real user, these are dead code.
Please add a driver using it, and explain how the variant driver use it.

> Signed-off-by: ping.gao <ping.gao@...sung.com>
> ---
>   drivers/mmc/host/dw_mmc.c | 7 ++++++-
>   drivers/mmc/host/dw_mmc.h | 2 ++
>   2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c5db92bbb094..5f1353b7f8d6 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1416,6 +1416,7 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
>   {
>   	struct dw_mci_slot *slot = mmc_priv(mmc);
>   	struct dw_mci *host = slot->host;
> +	const struct dw_mci_drv_data *drv_data = host->drv_data;
>   
>   	WARN_ON(slot->mrq);
>   
> @@ -1430,7 +1431,8 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
>   		mmc_request_done(mmc, mrq);
>   		return;
>   	}
> -
> +	if (drv_data && drv_data->pre_request)
> +		drv_data->pre_request(host);
>   	spin_lock_bh(&host->lock);
>   
>   	dw_mci_queue_request(host, slot, mrq);
> @@ -1897,6 +1899,7 @@ static void dw_mci_request_end(struct dw_mci *host, struct mmc_request *mrq)
>   {
>   	struct dw_mci_slot *slot;
>   	struct mmc_host	*prev_mmc = host->slot->mmc;
> +	const struct dw_mci_drv_data *drv_data = host->drv_dat
>   
>   	WARN_ON(host->cmd || host->data);
>   
> @@ -1921,6 +1924,8 @@ static void dw_mci_request_end(struct dw_mci *host, struct mmc_request *mrq)
>   
>   	spin_unlock(&host->lock);
>   	mmc_request_done(prev_mmc, mrq);
> +	if (drv_data && drv_data->post_request_end)
> +		drv_data->post_request_end(host);
>   	spin_lock(&host->lock);
>   }
>   
> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
> index 648b4a5641bf..6c258e0865e7 100644
> --- a/drivers/mmc/host/dw_mmc.h
> +++ b/drivers/mmc/host/dw_mmc.h
> @@ -618,5 +618,7 @@ struct dw_mci_drv_data {
>   					  unsigned int timeout_ns);
>   	u32		(*get_drto_clks)(struct dw_mci *host);
>   	void		(*hw_reset)(struct dw_mci *host);
> +	void		(*pre_request)(struct dw_mci *host);
> +	void		(*post_request_end)(struct dw_mci *host);
>   };
>   #endif /* _DW_MMC_H_ */


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ