INIT: version 2.88 booting

会有一股神秘感。 提交于 2019-12-01 10:16:07

发现调试串口启动时,INIT: 卡了30s, version 2.88 booting 又卡了30s,通过分析sysvinit代码发现串口执行close时,阻塞到tx_empty函数,在串口驱动中添加uart_update_timeout(port, termios->c_cflag, baud);即可解决这个问题。

下面是具体的分析流程

串口执行close时,最后调用

    while (!port->ops->tx_empty(port)) {
        msleep_interruptible(jiffies_to_msecs(char_time));
        if (signal_pending(current))
            break;
        if (time_after(jiffies, expire))
            break;
    }

这个msleep_interruptible就是导致那个30s 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!