Hi All,
From my virtual tty device, I am pushing data to the TTY layer as follows
static int vs_rx_data(u8 *buf, int size, struct dev_info *dev) { int ret_val =3D 0; LOG_INFO("In vs_rx_data \n"); if(dev->vs_dev.tty =3D=3D NULL) { LOG_ERR("tty is null!!\n"); return 0; } ret_val =3D tty_insert_flip_string(dev->vs_dev.tty, buf, size); if(size !=3D ret_val) { LOG_ERR("vs_rx_data =3D=3D> tty_insert_flip_string returned[%d], requested [%d]\n", ret_val, size); } tty_flip_buffer_push(dev->vs_dev.tty); return ret_val; }
For this virtual TTY device, =93low_latency=94 is set to ZERO and the TTY line discipline is PPP. So every time when I do, tty_flip_buffer_push, the TTY layer will schedule a work item and call flush_to_ldisc(), which calls ldisc function ppp_asynctty_receive().
1) This path is working as far as I do some low amount of traffic( Say ping). 2) But when I do extensive traffic, after sometime, the ldisc flushing work item in TTY layer is not getting called anymore. What could be the reason? 3) I found that the tty_flip_buffer_push() is scheduling the work item always. But the worker function is not called (ie flush_to_ldisc() 4) So this means the worker is dying/got corrupted. But at the same time the kernel is fully functioning(like other tasklet/worker/ interrupts etc.) 5) How do I debug this situation further?. How to check whether the worker thread is still alive and in good condition?Any help is really appreciated.
Thanks, Shibu