All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [BUG] Re: [PATCH v2 2/2] mmc: mmc-uclass: Use dev_seq() to read aliases node's index
Date: Thu, 20 May 2021 18:32:38 +0200	[thread overview]
Message-ID: <189016b3-ce51-8ad7-d605-e3b664fec4e7@gmx.de> (raw)
In-Reply-To: <20210325071848.27181-3-a-govindraju@ti.com>

On 25.03.21 08:18, Aswath Govindraju wrote:
> Use dev_seq() to read aliases node's index and pass it as device number
> for creating bulk device.
>
> Suggested-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Since this patch merged as commit 2243d19e5618122 SD cards on
orangepi_pc_defconfig are not detected anymore.

=> mmc rescan
MMC Device 0 not found
no mmc device at slot 0
=>

Best regards

Heinrich

> ---
>  drivers/mmc/mmc-uclass.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index 53eabc9e612d..d36aae367e7c 100644
> --- a/drivers/mmc/mmc-uclass.c
> +++ b/drivers/mmc/mmc-uclass.c
> @@ -383,18 +383,16 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg)
>  {
>  	struct blk_desc *bdesc;
>  	struct udevice *bdev;
> -	int ret, devnum = -1;
> +	int ret;
>
>  	if (!mmc_get_ops(dev))
>  		return -ENOSYS;
> -#ifndef CONFIG_SPL_BUILD
> -	/* Use the fixed index with aliase node's index */
> -	ret = dev_read_alias_seq(dev, &devnum);
> -	debug("%s: alias ret=%d, devnum=%d\n", __func__, ret, devnum);
> -#endif
> +
> +	/* Use the fixed index with aliases node's index */
> +	debug("%s: alias devnum=%d\n", __func__, dev_seq(dev));
>
>  	ret = blk_create_devicef(dev, "mmc_blk", "blk", IF_TYPE_MMC,
> -			devnum, 512, 0, &bdev);
> +			dev_seq(dev), 512, 0, &bdev);
>  	if (ret) {
>  		debug("Cannot create block device\n");
>  		return ret;
>

  parent reply	other threads:[~2021-05-20 16:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  7:18 [PATCH v2 0/2] mmc: Add support for checking device number against alias index Aswath Govindraju
2021-03-25  7:18 ` [PATCH v2 1/2] mmc: Check for device with a seq number equal to num before checking against index Aswath Govindraju
2021-07-06 23:09   ` Ricardo Salveti
2021-07-07  4:55     ` Aswath Govindraju
2021-07-07 22:59       ` Ricardo Salveti
2021-03-25  7:18 ` [PATCH v2 2/2] mmc: mmc-uclass: Use dev_seq() to read aliases node's index Aswath Govindraju
2021-03-25 22:51   ` Jaehoon Chung
2021-05-20 16:32   ` Heinrich Schuchardt [this message]
2021-05-20 16:46     ` [BUG] " Heinrich Schuchardt
2021-05-20 16:55     ` Andre Przywara
2021-05-20 18:17       ` Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=189016b3-ce51-8ad7-d605-e3b664fec4e7@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.