read() from ttyS1 issue while write() is Ok

Hi! I’ve got a problem with reading from serial port, when I run this code on Digi ConnectCore Wi-9c. But writing to serial port is Ok. By the way, when I’m running this code on “full” Linux it is working Ok - I can read and write to serial without mistakes. Where could be a problem?

uname -a: Linux ccw9cjsnand #7 PREEMPT Sat Jul 16 23:31:41 EEST 2011 armv5tejl unknown

The code is posted in,9395