This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Beaglebone: Add second SD Card

Hi,

I'm trying to add a second SD Card to beaglebone, (mmc1). I have modified the kernel.

During boot the kernel detects the second SD & hangs. Below is the log:

....

[ 1.665161] Waiting for root device /dev/mmcblk0p2...
[ 1.753662] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 1.766754] mmc0: new high speed SDHC card at address aaaa
[ 1.773223] mmcblk0: mmc0:aaaa SU08G 7.40 GiB
[ 1.779846] mmcblk0: p1 p2 p3
[ 1.861389] mmc1: host does not support reading read-only switch. assuming write-enable.
[ 1.871826] mmc1: new high speed SDHC card at address b368
[ 1.878173] mmcblk1: mmc1:b368 00000 7.51 GiB


[ 240.151245] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
[ 240.158355] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 240.166717] kworker/u:1 D c0261211 0 36 2 0x00000000
[ 240.173522] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
[ 240.180267] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 240.188598] mmcqd/1 D c0261211 0 42 2 0x00000000
[ 360.191253] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
[ 360.198364] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 360.206726] kworker/u:1 D c0261211 0 36 2 0x00000000
[ 360.213531] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
[ 360.220275] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 360.228607] mmcqd/1 D c0261211 0 42 2 0x00000000

...

Seems like the kernel hangs somewhere.

Any inputs?

-Pj

  • Prasant,

    Have you tried different cards? Can you try with a 2GB or lesser card? 

  • Hi,

    I only tried with a card of 8 GB (Class 10 SDHC). I did not try a small capacity card.

    Small capacity card will not solve my problem. I need a large space.

    I do not have 2 GB cards (difficult to find non-sdhc), but I tried with 4GB cards, but same issue.

    -Pj

  • hi,
    I let the system run for sometime & got this message:
    ...
    [    1.665527] Waiting for root device /dev/mmcblk0p2...
    [    1.754058] mmc0: host does not support reading read-only switch. assuming write-enable.
    [    1.767089] mmc0: new high speed SDHC card at address aaaa
    [    1.773529] mmcblk0: mmc0:aaaa SU08G 7.40 GiB
    [    1.780181]  mmcblk0: p1 p2 p3
    [    1.858001] mmc1: host does not support reading read-only switch. assuming write-enable.
    [    1.868286] mmc1: new high speed SDHC card at address 0001
    [    1.874694] mmcblk1: mmc1:0001 00000 3.79 GiB
    [  240.151611] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
    [  240.158721] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  240.167083] kworker/u:1     D c0261211     0    36      2 0x00000000
    [  240.173889] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
    [  240.180633] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  240.188964] mmcqd/1         D c0261211     0    42      2 0x00000000
    [  360.191619] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
    [  360.198730] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  360.207092] kworker/u:1     D c0261211     0    36      2 0x00000000
    [  360.213897] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
    [  360.220642] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  360.228973] mmcqd/1         D c0261211     0    42      2 0x00000000
    [  480.231628] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
    [  480.238739] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  480.247070] kworker/u:1     D c0261211     0    36      2 0x00000000
    [  480.253875] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
    [  480.260620] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  480.268951] mmcqd/1         D c0261211     0    42      2 0x00000000
    [  600.271606] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
    [  600.278717] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  600.287078] kworker/u:1     D c0261211     0    36      2 0x00000000
    [  600.293884] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
    [  600.300628] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  600.308959] mmcqd/1         D c0261211     0    42      2 0x00000000
    [  720.311645] INFO: task kworker/u:1:36 blocked for more than 120 seconds.
    [  720.318756] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  720.327117] kworker/u:1     D c0261211     0    36      2 0x00000000
    [  720.333923] INFO: task mmcqd/1:42 blocked for more than 120 seconds.
    [  720.340667] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  720.348999] mmcqd/1         D c0261211     0    42      2 0x00000000
    <7>[ 1472.531585] driver_probe_done: probe_count = 1
    ...
    I googled a bit, seems like a known issue with mmc detection in omap/am335x. (Someone talked about a kernel hang up)
    Any ideas? Anyone recollects any solution to this?
    -Pj
  • Prasant,

    It will be good to try with a < 2GB card, as it will give more clarity. We can rule out whether lack of support for SDHC might be the issue or not. Also enable maximum debug logs inside the SD/MMC driver and share the logs.

  • Hi Renjith,

    Thanks for inputs.

    I do not think its an issue with SDHC. I'm already booting the board with SDHC card (on mmc0) so I do not see any reason why SDHC will not be supported on mmc1.

    Yes, I will try enabling the debug logs of mmc (that might give some clue). I will post if I find any info.

    The kernel debug information points to some kernel thread being blocked. (Possible deadlock, not sure though).

    -Pj

  • Hello

    could you please tell me what you mofidied in the kernel for a second sd card support ?

    thanks