public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Matt Corallo <linux@bluematt.me>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MMC: Do not write to mmc_uclass_priv if it was not allocated
Date: Thu, 30 Jun 2016 22:35:07 +0000	[thread overview]
Message-ID: <57759E9B.7050606@bluematt.me> (raw)
In-Reply-To: <CAPnjgZ0QLm0rcgg+vJDbF06OgdDrLFF5ViKaD7+CdPV_3fPSbg@mail.gmail.com>

Sorry, this was related to https://patchwork.ozlabs.org/patch/624614/,
not dragonboard, and yes, is the same issue that was addressed by the
patch you linked.

With this patch the MMC worked fine, but, indeed, as with dragonboard,
its better to assign mmc instead of removing this (this seems to be the
only place where mmc is actually used during boot for me, so maybe not?).

Matt

On 06/30/16 19:28, Simon Glass wrote:
> Hi Meteusz,
> 
> On 30 June 2016 at 12:18, Mateusz Kulikowski
> <mateusz.kulikowski@gmail.com> wrote:
>> On 29.06.2016 05:27, Simon Glass wrote:
>>> Hi Matt,
>>>
>>> On 25 June 2016 at 14:57, Matt Corallo <linux@bluematt.me> wrote:
>>>> Signed-off-by: Matt Corallo <git@bluematt.me>
>>>> ---
>>>>  drivers/mmc/mmc.c | 3 ++-
>>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>>>> index aabfc71..eba20f0 100644
>>>> --- a/drivers/mmc/mmc.c
>>>> +++ b/drivers/mmc/mmc.c
>>>> @@ -1734,7 +1734,8 @@ int mmc_init(struct mmc *mmc)
>>>>  #ifdef CONFIG_DM_MMC
>>>>         struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev);
>>>>
>>>> -       upriv->mmc = mmc;
>>>> +       if (upriv)
>>>> +               upriv->mmc = mmc;
>>>>  #endif
>>>>         if (mmc->has_init)
>>>>                 return 0;
>>>> --
>>>> 2.1.4
>>>
>>> Can you please add a commit message explaining why this is needed and
>>> what it fixes?  How can mmc_init() be called before the MMC device is
>>> there? Is this related to this patch?
>>>
>>> http://patchwork.ozlabs.org/patch/640735/
>>
>> It's related in a way that it fixed crash of dragonboard before I submitted my patch :)
>>
>> Not sure if it meant to fix dragonboard or some other board.
>>
>> Although - imho - it's nice to make check like that.. or at least some kind of assert.
> 
> An assert() would be fine with me.
> 
> Regards,
> Simon
> 

  reply	other threads:[~2016-06-30 22:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-25 21:57 [U-Boot] [PATCH] MMC: Do not write to mmc_uclass_priv if it was not allocated Matt Corallo
2016-06-29  3:27 ` Simon Glass
2016-06-30 19:18   ` Mateusz Kulikowski
2016-06-30 19:28     ` Simon Glass
2016-06-30 22:35       ` Matt Corallo [this message]
2016-07-01 11:37       ` Jaehoon Chung
2016-07-01 18:17         ` Simon Glass
2016-07-04  2:28           ` Jaehoon Chung

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=57759E9B.7050606@bluematt.me \
    --to=linux@bluematt.me \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox