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: <a49619b7-2340-2726-8c7e-df6ff0c1793a@gmail.com>
Date:   Sat, 1 Apr 2023 22:50:12 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Sarthak Garg <quic_sartgarg@...cinc.com>, adrian.hunter@...el.com,
        ulf.hansson@...aro.org
Cc:     linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, quic_rampraka@...cinc.com,
        quic_bhaskarv@...cinc.com, quic_sachgupt@...cinc.com,
        quic_pragalla@...cinc.com, quic_sayalil@...cinc.com,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Kees Cook <keescook@...omium.org>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Christian Löhle <CLoehle@...erstone.com>,
        Yann Gautier <yann.gautier@...s.st.com>,
        ChanWoo Lee <cw9316.lee@...sung.com>,
        Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>,
        Ye Bin <yebin10@...wei.com>,
        Alexander Stein <alexander.stein@...tq-group.com>,
        Yu Zhe <yuzhe@...china.com>,
        Yang Yingliang <yangyingliang@...wei.com>,
        Brian Norris <briannorris@...omium.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Jens Axboe <axboe@...nel.dk>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Vincent Whitchurch <vincent.whitchurch@...s.com>,
        David Sterba <dsterba@...e.com>,
        John Garry <john.garry@...wei.com>
Subject: Re: [PATCH V1 2/2] mmc: core: Export core functions to let vendors
 use for their features

On 01.04.2023 18:57, Sarthak Garg wrote:
> Export core functions to let vendors use for their internal features.
> 
Typically extensions to the core require at least one user. So you should
add your driver, that makes use of the changes, to the series.
And best explain what's special with your hardware so that it needs a core
extension whilst drivers for other hardware are fine with the core as-is.

> Signed-off-by: Sarthak Garg <quic_sartgarg@...cinc.com>
> ---
>  drivers/mmc/core/core.c    |  6 ++++++
>  drivers/mmc/core/host.c    |  1 +
>  drivers/mmc/core/mmc.c     | 18 ++++++++++++------
>  drivers/mmc/core/mmc_ops.c |  1 +
>  drivers/mmc/core/queue.c   |  1 +
>  5 files changed, 21 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 3d3e0ca52614..ed44b65f19e0 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -916,6 +916,7 @@ void mmc_set_clock(struct mmc_host *host, unsigned int hz)
>  	host->ios.clock = hz;
>  	mmc_set_ios(host);
>  }
> +EXPORT_SYMBOL_GPL(mmc_set_clock);
>  
>  int mmc_execute_tuning(struct mmc_card *card)
>  {
> @@ -950,6 +951,7 @@ int mmc_execute_tuning(struct mmc_card *card)
>  
>  	return err;
>  }
> +EXPORT_SYMBOL_GPL(mmc_execute_tuning);
>  
>  /*
>   * Change the bus mode (open drain/push-pull) of a host.
> @@ -959,6 +961,7 @@ void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode)
>  	host->ios.bus_mode = mode;
>  	mmc_set_ios(host);
>  }
> +EXPORT_SYMBOL_GPL(mmc_set_bus_mode);
>  
>  /*
>   * Change data bus width of a host.
> @@ -968,6 +971,7 @@ void mmc_set_bus_width(struct mmc_host *host, unsigned int width)
>  	host->ios.bus_width = width;
>  	mmc_set_ios(host);
>  }
> +EXPORT_SYMBOL_GPL(mmc_set_bus_width);
>  
>  /*
>   * Set initial state after a power cycle or a hw_reset.
> @@ -1001,6 +1005,7 @@ void mmc_set_initial_state(struct mmc_host *host)
>  
>  	mmc_crypto_set_initial_state(host);
>  }
> +EXPORT_SYMBOL_GPL(mmc_set_initial_state);
>  
>  /**
>   * mmc_vdd_to_ocrbitnum - Convert a voltage to the OCR bit number
> @@ -1270,6 +1275,7 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing)
>  	host->ios.timing = timing;
>  	mmc_set_ios(host);
>  }
> +EXPORT_SYMBOL_GPL(mmc_set_timing);
>  
>  /*
>   * Select appropriate driver type for host.
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index 76900f67c782..1c5eb1d9d585 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -166,6 +166,7 @@ void mmc_retune_hold(struct mmc_host *host)
>  		host->retune_now = 1;
>  	host->hold_retune += 1;
>  }
> +EXPORT_SYMBOL(mmc_retune_hold);
>  
>  void mmc_retune_release(struct mmc_host *host)
>  {
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 32386e4644df..b984a4f90535 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1002,7 +1002,7 @@ static void mmc_set_bus_speed(struct mmc_card *card)
>   * If the bus width is changed successfully, return the selected width value.
>   * Zero is returned instead of error value if the wide width is not supported.
>   */
> -static int mmc_select_bus_width(struct mmc_card *card)
> +int mmc_select_bus_width(struct mmc_card *card)
>  {
>  	static unsigned ext_csd_bits[] = {
>  		EXT_CSD_BUS_WIDTH_8,
> @@ -1067,11 +1067,12 @@ static int mmc_select_bus_width(struct mmc_card *card)
>  
>  	return err;
>  }
> +EXPORT_SYMBOL_GPL(mmc_select_bus_width);
>  
>  /*
>   * Switch to the high-speed mode
>   */
> -static int mmc_select_hs(struct mmc_card *card)
> +int mmc_select_hs(struct mmc_card *card)
>  {
>  	int err;
>  
> @@ -1085,11 +1086,12 @@ static int mmc_select_hs(struct mmc_card *card)
>  
>  	return err;
>  }
> +EXPORT_SYMBOL_GPL(mmc_select_hs);
>  
>  /*
>   * Activate wide bus and DDR if supported.
>   */
> -static int mmc_select_hs_ddr(struct mmc_card *card)
> +int mmc_select_hs_ddr(struct mmc_card *card)
>  {
>  	struct mmc_host *host = card->host;
>  	u32 bus_width, ext_csd_bits;
> @@ -1158,8 +1160,9 @@ static int mmc_select_hs_ddr(struct mmc_card *card)
>  
>  	return err;
>  }
> +EXPORT_SYMBOL_GPL(mmc_select_hs_ddr);
>  
> -static int mmc_select_hs400(struct mmc_card *card)
> +int mmc_select_hs400(struct mmc_card *card)
>  {
>  	struct mmc_host *host = card->host;
>  	unsigned int max_dtr;
> @@ -1253,6 +1256,7 @@ static int mmc_select_hs400(struct mmc_card *card)
>  	       __func__, err);
>  	return err;
>  }
> +EXPORT_SYMBOL_GPL(mmc_select_hs400);
>  
>  int mmc_hs200_to_hs400(struct mmc_card *card)
>  {
> @@ -1533,7 +1537,7 @@ static int mmc_select_hs200(struct mmc_card *card)
>  /*
>   * Activate High Speed, HS200 or HS400ES mode if supported.
>   */
> -static int mmc_select_timing(struct mmc_card *card)
> +int mmc_select_timing(struct mmc_card *card)
>  {
>  	int err = 0;
>  
> @@ -1568,12 +1572,13 @@ static int mmc_select_timing(struct mmc_card *card)
>  	mmc_set_bus_speed(card);
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(mmc_select_timing);
>  
>  /*
>   * Execute tuning sequence to seek the proper bus operating
>   * conditions for HS200 and HS400, which sends CMD21 to the device.
>   */
> -static int mmc_hs200_tuning(struct mmc_card *card)
> +int mmc_hs200_tuning(struct mmc_card *card)
>  {
>  	struct mmc_host *host = card->host;
>  
> @@ -1588,6 +1593,7 @@ static int mmc_hs200_tuning(struct mmc_card *card)
>  
>  	return mmc_execute_tuning(card);
>  }
> +EXPORT_SYMBOL_GPL(mmc_hs200_tuning);
>  
>  /*
>   * Handle the detection and initialisation of a card.
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index 3b3adbddf664..62c16dac9d62 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -118,6 +118,7 @@ int mmc_select_card(struct mmc_card *card)
>  
>  	return _mmc_select_card(card->host, card);
>  }
> +EXPORT_SYMBOL_GPL(mmc_select_card);
>  
>  int mmc_deselect_cards(struct mmc_host *host)
>  {
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index b396e3900717..2c710d736032 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -69,6 +69,7 @@ enum mmc_issue_type mmc_issue_type(struct mmc_queue *mq, struct request *req)
>  
>  	return MMC_ISSUE_SYNC;
>  }
> +EXPORT_SYMBOL_GPL(mmc_issue_type);
>  
>  static void __mmc_cqe_recovery_notifier(struct mmc_queue *mq)
>  {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ