All of lore.kernel.org
 help / color / mirror / Atom feed
* uart : lost characters when system is busy
@ 2011-06-10  8:58 ` Matthieu CASTET
  0 siblings, 0 replies; 7+ messages in thread
From: Matthieu CASTET @ 2011-06-10  8:58 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-serial, Alan Cox

Hi,

the linux uart layer can loose some characters if the system is busy.

uart_throttle/uart_unthrottle is called from a workqueue.
If the system is busy, and the uart receive lot's of data, we fill the tty
buffer, but the workqueue doesn't run and we never have a chance to call
uart_throttle. So the uart is never slow down.

And because most uart driver call uart_insert_char (that doesn't return if
tty_insert_flip_char manage to push the character), we never detect that there
are some lost characters.


A workaround could be to check the buffer threshold in tty_flip_buffer_push and
call throttle callback if needed.


Matthieu

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-10 11:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10  8:58 uart : lost characters when system is busy Matthieu CASTET
2011-06-10  8:58 ` Matthieu CASTET
2011-06-10  9:20 ` Alan Cox
2011-06-10  9:20   ` Alan Cox
2011-06-10 10:05   ` Matthieu CASTET
2011-06-10 10:05     ` Matthieu CASTET
2011-06-10 11:35     ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.