结论
有两种死机:
- 一种是有异常栈,此种情况应该是由于linux的实时补丁导致的,去掉实时补丁后未复现;
- 一种无异常栈,但是打印mmc异常:mmc0: cache flush error -110,此种情况需要加打印继续定位。
无异常栈死机
无异常栈死机是由于MMC初始化失败导致,根本原因是系统启动过程中供电不稳导致:
CMD6:命令功能为切换eMMC设备的操作模式或者修改eMMC设备的EXT_CSD寄存器。
#define MMC_SWITCH 6 /* ac [31:0] See below R1b */
mmc0: req failed (CMD6): -110, retrying...
CMD12: MMC_STOP_TRANSMISSION
在任意时刻,所有的数据读命令都可以被STOP_TRANSMISSION命令(CMD12)终止。数据传输将会结束并且eMMC设备将返回到Transfer状态。读命令包括:READ_SINGLE_BLOCK(CMD17),READ_MULTIPLE_BLOCK(CMD18),SEND_TUNING_BLOCK(CMD21),SEND_WRITE_PROT(CMD30)。
在任意时刻,所有的数据写命令都可以被STOP_TRANSMISSION命令(CMD12)终止。停止写命令的STOP_TRANSMISSION命令(CMD12)要在CMD7取消选择设备之前发送。写命令包括:WRITE_BLOCK(CMD24),WRITE_MULTIPLE_BLOCK(CMD25),PROGRAM_CID(CMD26),PROGRAM_CSD(CMD27)。
#define MMC_STOP_TRANSMISSION 12 /* ac R1b */
[ 6.403127] mmc0: req failed (CMD12): -110, retrying...
[ 6.403152] mmc0: req failed (CMD12): -110, retrying...
[ 6.403179] mmc0: req failed (CMD12): -110, retrying...
[ 6.403205] mmc0: req failed (CMD12): -110, retrying...
[ 6.403230] mmc0: req failed (CMD12): -110, retrying...
[ 6.403417] _mmc_hw_reset: call mmc_flush_cache
MMC初始化正常时的打印:
[ 30.481558] mmc_blk_issue_flush: call mmc_flush_cache
[ 30.481579] mmc_wait_for_cmd: cmd->arg=52429057
[ 30.481683] mmc_wait_for_req: call mmc_wait_for_req_done
[ 30.482[ OK ] Stopped snmp service.
39] mmc0: return err =0
[ OK ] Started snmp service.
[ 32.186790] vcc5v0_otg: disabling
[ 32.186870] vcc3v3_lcd0_n: disabling
[ 32.186904] vcc3v3_lcd1_n: disabling
[ 32.186936] vcc3v3_pcie: disabling
[ 33.681936] mmc_blk_issue_flush: call mmc_flush_cache
[ 33.681942] mmc_wait_for_cmd: cmd->arg=52429057
[ 33.681979] mmc_wait_for_req: call mmc_wait_for_req_done
[ 33.684167] mmc0: return err =0
[ 34.137782] ttyFIQ ttyFIQ0: tty_port_close_start: tty->count = 1 port count = 2Debian GNU/Linux 10 jenet ttyFIQ0jenet login: [ 36.667972] mmc_blk_issue_flush: call mmc_flush_cache
[ 36.667993] mmc_wait_for_cmd: cmd->arg=52429057
[ 36.668095] mmc_wait_for_req: call mmc_wait_for_req_done
[ 36.668514] mmc0: return err =0
[ 39.654626] mmc_blk_issue_flush: call mmc_flush_cache
[ 39.654647] mmc_wait_for_cmd: cmd->arg=52429057
[ 39.654744] mmc_wait_for_req: call mmc_wait_for_req_done
MMC初始化异常日志
[ 5.518271] dwmmc_rockchip fe2b0000.dwmmc: Linked as a consumer to regulator.32
[ 5.518348] dwmmc_rockchip fe2b0000.dwmmc: Linked as a consumer to regulator.26
[ 5.518516] dwmmc_rockchip fe2b0000.dwmmc: Dropping the link to regulator.26
[ 5.518582] dwmmc_rockchip fe2b0000.dwmmc: Dropping the link to regulator.32
[ 5.572557] timer end
[ 5.599311] rk-pcie 3c0000000.pcie: PCIe Linking... LTSSM is 0x1
[ 6.401383] mmc_wait_for_cmd: cmd->arg=65536[ 6.401405] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.401422] mmc_wait_for_cmd: cmd->arg=65536[ 6.401430] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.401443] mmc_wait_for_cmd: cmd->arg=0[ 6.401451] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.401464] mmc0: req failed (CMD12): -110, retrying...
[ 6.401490] mmc0: req failed (CMD12): -110, retrying...
[ 6.401514] mmc0: req failed (CMD12): -110, retrying...
[ 6.401538] mmc0: req failed (CMD12): -110, retrying...
[ 6.401561] mmc0: req failed (CMD12): -110, retrying...
[ 6.401793] mmc_wait_for_cmd: cmd->arg=65536[ 6.401818] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.401838] mmc_wait_for_cmd: cmd->arg=65536[ 6.401850] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.401867] mmc_wait_for_cmd: cmd->arg=0[ 6.401878] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.401895] mmc0: req failed (CMD12): -110, retrying...
[ 6.401922] mmc0: req failed (CMD12): -110, retrying...
[ 6.401949] mmc0: req failed (CMD12): -110, retrying...
[ 6.401975] mmc0: req failed (CMD12): -110, retrying...
[ 6.402001] mmc0: req failed (CMD12): -110, retrying...
[ 6.402220] mmc_wait_for_cmd: cmd->arg=65536[ 6.402234] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.402252] mmc_wait_for_cmd: cmd->arg=65536[ 6.402264] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.402281] mmc_wait_for_cmd: cmd->arg=0[ 6.402292] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.402307] mmc0: req failed (CMD12): -110, retrying...
[ 6.402333] mmc0: req failed (CMD12): -110, retrying...
[ 6.402359] mmc0: req failed (CMD12): -110, retrying...
[ 6.402385] mmc0: req failed (CMD12): -110, retrying...
[ 6.402410] mmc0: req failed (CMD12): -110, retrying...
[ 6.402629] mmc_wait_for_cmd: cmd->arg=65536[ 6.402645] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.402664] mmc_wait_for_cmd: cmd->arg=65536[ 6.402675] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.402689] mmc_wait_for_cmd: cmd->arg=0[ 6.402701] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.402718] mmc0: req failed (CMD12): -110, retrying...
[ 6.402743] mmc0: req failed (CMD12): -110, retrying...
[ 6.402769] mmc0: req failed (CMD12): -110, retrying...
[ 6.402799] mmc0: req failed (CMD12): -110, retrying...
[ 6.402825] mmc0: req failed (CMD12): -110, retrying...
[ 6.403042] mmc_wait_for_cmd: cmd->arg=65536[ 6.403056] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.403074] mmc_wait_for_cmd: cmd->arg=65536[ 6.403086] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.403103] mmc_wait_for_cmd: cmd->arg=0[ 6.403114] mmc_wait_for_req: call mmc_wait_for_req_done[ 6.403127] mmc0: req failed (CMD12): -110, retrying...
[ 6.403152] mmc0: req failed (CMD12): -110, retrying...
[ 6.403179] mmc0: req failed (CMD12): -110, retrying...
[ 6.403205] mmc0: req failed (CMD12):