Serial Port hanging issues in Ubuntu 10.04 with kernel linux-126.96.36.199
I am new to this forum. We were using Ubuntu 10.04 with the linux-188.8.131.52 and we have customized the kernel for our requirement. We are using serial port rs 232 for communicating the peripherals. It’s basically 4 wires with the only RTS flow control. Couple of days later serial communication failed and Transmitting byte is successful and we are checking whether all the transmitted bytes are send from serial port buffer using below logic and found TIOCSERGETLSR bit never set and every ioct call get success. Even if we try to flush the serial port using tcflush but no success. This issues happening in few systems so for. Once this issue happens we have to reboot the system and same problem happens again with in few day. After these issues happened serial port was not responding. This code was working with Redhat 9 more than 7 years without issues and we have recently updated the system from the Redhat 9 to Ubuntu 10.04.
Find the attachment contains serial port status after hanging. Please advise how to solve this issues!!
ioctl(hanio->fd, TIOCSERGETLSR, &status);
}while(!(status & TIOCSER_TEMT));