public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Andrzej Hajda <a.hajda@samsung.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Javier Martinez Canillas <javier@dowhile0.org>
Cc: Alim Akhtar <alim.akhtar@gmail.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Seungwon Jeon <tgih.jun@samsung.com>,
	Chris Ball <chris@printf.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [RFC PATCH] mmc: dw_mmc: add status check before clock update
Date: Fri, 13 Feb 2015 20:10:32 +0900	[thread overview]
Message-ID: <54DDDBA8.9090405@samsung.com> (raw)
In-Reply-To: <54DDB23B.3050407@samsung.com>

On 02/13/2015 05:13 PM, Andrzej Hajda wrote:
> On 02/13/2015 08:30 AM, Jaehoon Chung wrote:
>> Hi, Andrzej.
>>
>> On 02/13/2015 01:53 AM, Javier Martinez Canillas wrote:
>>> Hello Andrzej,
>>>
>>> On Wed, Feb 11, 2015 at 10:06 AM, Andrzej Hajda <a.hajda@samsung.com> wrote:
>>>> On 02/11/2015 09:32 AM, Jaehoon Chung wrote:
>>>>> On 02/11/2015 04:51 PM, Andrzej Hajda wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Thanks for comments.
>>>>>>
>>>>>> On 02/10/2015 03:54 PM, Alim Akhtar wrote:
>>>>>>> Hi Andrzej,
>>>>>>>
>>>>>>> On Tue, Feb 10, 2015 at 7:59 PM, Andrzej Hajda <a.hajda@samsung.com> wrote:
>>>>>>>> According to specs for version 250A, status register should be
>>>>>>>> tested before clock update. Otherwise in case MMC card is missing
>>>>>>>> mci_send_cmd timeouts and subsequent CTYPE registry write causes system hang.
>>>>>>>> This behavior has been observed on Exynos5422/Odroid-XU3.
>>> I've also observed the same behavior (mmc command send timing out and
>>> system hang) on an Exynos5420 Peach Pit Chromebook and an Exynos5800
>>> Peach Pi Chromebok which both have the same dw_mmc 250A IP version.
>>>
>>> Unfortunately $subject doesn't seem to be enough since even with that
>>> applied I got:
>>>
>>> [    4.264418] mmc_host mmc1: Timeout sending command (cmd 0x202000
>>> arg 0x0 status 0x80202000)
>>> [    4.283988] random: nonblocking pool is initialized
>>> [   28.054406] INFO: rcu_sched detected stalls on CPUs/tasks:
>>> [   28.058412] 0: (5 ticks this GP) idle=65f/140000000000001/0
>>> softirq=215/216 fqs=39
>>> [   28.066129] (detected by 1, t=4765 jiffies, g=-294, c=-295, q=2)
>>> [   28.072202] Task dump for CPU 0:
>>> [   28.075412] kworker/u16:0   R running      0     6      2 0x00000002
>>> [   28.081749] Workqueue: kmmcd mmc_rescan
>>> [   28.085570] [<c04c2698>] (__schedule) from [<00000000>] (  (null))
>>> [   28.091724] rcu_sched kthread starved for 796 jiffies!
>>>
>>>>>>>> +static bool dw_mci_wait_busy(struct dw_mci *host)
>>>>>>>> +{
>>>>>>>> +       unsigned long timeout;
>>>>>>>> +
>>>>>>>> +       if (host->verid < DW_MMC_250A)
>>>>>>>> +               return true;
>>>>>>>> +
>>>>>>> I wonder this might be true for 240A as well.
>>>>>> Odroid-U3 board with Exynos4412 and MMC 240A does not have this problem.
>>>>>> On the other side busy check does not hurt it anyway.
>>> This problem also does not happen on an Exynos5250 Snow Chromebook
>>> which has a dw_mmc IP version 241A.
>>>
>>>>> Which kernel version do you use?
>>>>> I also have the exynos5422 board, but i didn't find the below error yet.
>>>>> It doesn't relate with IP version.
>>>>> If you share your environment, i can check with exynos5422 board.
>>>> linux-next on odroid-xu3. With MMC card removed, booting from sdcard.
>>>> Please also note that broken-cd quirk is on in dts.
>> I can't find this problem on exynos5422 board.(Odroix-xu3)
>> Could you share the properties into dts file?
> 
> It is just linux-next with exynos_defconfig and
> arch/arm/boot/dts/exynos5422-odroidxu3.dts, without changes:
> ...
> &mmc_0 {
>         status = "okay";
>         mmc-pwrseq = <&emmc_pwrseq>;
>         broken-cd;
>         card-detect-delay = <200>;
>         samsung,dw-mshc-ciu-div = <3>;
>         samsung,dw-mshc-sdr-timing = <0 4>;
>         samsung,dw-mshc-ddr-timing = <0 2>;
>         pinctrl-names = "default";
>         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
>         bus-width = <8>;
>         cap-mmc-highspeed;
> };
> ...

This is node relevant to eMMC.
I have tested with exynos5422 board(Odroid-xu3) and latest linux-next.
(Without eMMC card, just booting from SD-card.)
root-device is SD-card, right? When i try to boot with platform image, it's working fine from Sd-card.
I can't find anything..

Best Regards,
Jaehoon Chung

> 
> Regarding hardware:
> eMMC card removed,
> booting from sdcard.
> 
> Regards
> Andrzej
> 
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>> I tested by trying to add wifi support to the Peach Pit/Pi Chromebooks
>>> which have an SDIO wifi chip attached to mmc@12210000. This [0] is the
>>> patch I've on top of linux-next fwiw.
>>>
>>>>> I'm not sure but this patch could be dropped.
>>>>> Because this patch is just only checking whether card is busy or not.
>>>>>
>>>>> this patch(mmc:dw_mmc: fix bug that case 'timeout sending command') can cover your patch.
>>>> I will test it.
>>>>
>>> I tested it and although the mentioned patch does fix the mmc commands
>>> send timing out, now card detection seems to not be working since the
>>> kernel keeps waiting for aiting for root device /dev/mmcblk1p4...
>>>
>>> and the this error is shown:
>>>
>>> [    4.249434] dwmmc_exynos 12210000.mmc: Data busy (status 0x306)
>>>
>>> So I tried the other patch from Addy's series "mmc: dw_mmc: Don't
>>> start command while data busy" but it did not have an effect. I still
>>> see the data busy error and the uSD card is not detected.
>>>
>>> Best regards,
>>> Javier
>>>
>>> [0]: http://paste.debian.net/plain/145877
>>>
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2015-02-13 11:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 12:51 [PATCH] mmc: dw_mmc: add status check before clock update Andrzej Hajda
2015-02-10 14:29 ` [RFC PATCH] " Andrzej Hajda
2015-02-10 14:54   ` Alim Akhtar
2015-02-11  7:51     ` Andrzej Hajda
2015-02-11  8:32       ` Jaehoon Chung
2015-02-11  9:06         ` Andrzej Hajda
2015-02-12 16:53           ` Javier Martinez Canillas
2015-02-13  7:30             ` Jaehoon Chung
2015-02-13  8:13               ` Andrzej Hajda
2015-02-13 11:10                 ` Jaehoon Chung [this message]
2015-02-16 16:33                   ` Andrzej Hajda

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=54DDDBA8.9090405@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=alim.akhtar@gmail.com \
    --cc=chris@printf.net \
    --cc=javier@dowhile0.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=tgih.jun@samsung.com \
    --cc=ulf.hansson@linaro.org \
    /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