>>>>> "Michal" == Michal Simek <monstr@xxxxxxxxx> writes: Hi, >> But I still don't understand why you would want to burn CPU spinning >> when you know the UART will be busy for a while. Leaving it alone >> until it generates the TX fifo empty interrupt seems more logical to >> me. Michal> I didn't know when tx fifo was full and then empty interrupt is Michal> generated. I have added some debug things to driver and I am going to Michal> look into. Michal> I just changed return value and I have got correct output and Michal> then I sent this email to check if is correct or not. According to the spec, you should get an interrupt when RX !empty or TX empty. We wouldn't ever be able to send more bytes than fits in the TX fifo if it didn't. >> Yeah, that loop should probably be time based (and perhaps calculated >> from baud rate). Michal> It is hard to say if you can find out any accurate number of loops Michal> which is baud rate dependent. Not loops, microseconds (or rather jiffies). -- Bye, Peter Korsgaard -- 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