The 10/23/2015 11:38, Timur Tabi wrote: > On 10/23/2015 11:02 AM, Dave P Martin wrote: > >I'm pretty sure CREAD should default to enabled[1], and that usually > >software won't modify it. > > > >Assuming that this is indeed the problem, it's possible that another bug > >in the pl011 driver is wrongly clearing this flag. Sadly I don't have > >time to look at the code again just now ...:( > > Perhaps, but !CREAD is definitely broken without this patch. So if the > driver really is clearing CREAD somewhere else, then that's where the real > bug is. > > > > >Could be interesting to stick some BUG_ON(!CREAD) in the driver to > >try and track down where that's coming from. > > CREAD is disabled by default when opening the console. You need to > explicitly set it in the termios structure. I can easily believe that > Huang's rootfs is just forgetting to set that bit because for the last five > years, it didn't matter. > > Huang, > > In the beginning of pl011_set_termios() and sbsa_uart_set_termios(), please > add this code: > > BUG_ON(!(termios->c_cflag & CREAD)); > I find after I reverted this patch, the console also can hang sometimes! So the hang issue maybe caused by other patches. thanks Huang Shijie ________________________________ -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html