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.

dm 8168 SD卡不支持热拔插 问题



mmcblk0: error -110 sending status comand
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
mmcblk0: error -110 transferring data, sector 64, nr 1, card status 0x0
mmcblk0: error -110 requesting status

func is mmc_sd_num_wr_blocks, file is drivers/mmc/card/block.c[187] <<<-----
end_request: I/O error, dev mmcblk0, sector 64
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1

板子上SD卡只能插入一次,拔出SD卡后 df 查看不发生变化,但是文件不能访问,再次插入SD卡会报错

root@ti81xx:~# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs             430.0M     55.7M    374.2M  13% /
devtmpfs                225.2M    172.0K    225.0M   0% /dev
none                    225.3M         0    225.3M   0% /dev/shm
tmpfs                    16.0M     60.0K     15.9M   0% /var/volatile
tmpfs                    16.0M         0     16.0M   0% /media/ram
/dev/sda                916.9G     67.0G    803.3G   8% /zigsun
/dev/mmcblk0p2            7.3G      3.7G      3.3G  53% /media/mmcblk0p2
/dev/mmcblk0p1           69.5M     45.3M     24.2M  65% /media/mmcblk0p1

 

  • Luo Yu,

    如果拔出前unmount一下,是否下次插入可以正常访问?

  • 手动 umount 拔出后,/dev/mmcblk0p1    /dev/mmcblk0p2 下还是有设备,重新插入还是会报错

  • Luo Yu,

    IPNC RDK的kernel软件有添加GPIO来判断sd卡的插拔,DM8127/DM385的SD接口和DM8168是类似的。

    请参考:

    http://arago-project.org/git/projects/?p=linux-ipnc-rdk-dm81xx.git;a=commit;h=f14b714cfb14f2cb2d347f18b58eeacb5e38aae2

    IPNC : MMC/SD support modifications for DM8127 and DM385 Hardware
    1. Uses GPIO to implement the card detect function.
    2. Export the GPIO2_16, so we can read the write protection status in our application.

  • 插拔有事件报上来,omap_hsmmc_card_detect 检测sd状态  是正常的,而且不论插拔多少次,都能上报正确状态

    检查过 硬件的io 插拔电平变化也是正常的

    现在是 拔出SD卡后,/dev 下设备没有消失;第二次插入SD卡后,文件系统就会报错。(手动umount 再mount 现象也是一样的)