[erlang-patches] Small fix to to_erl
Fredrik
fredrik@REDACTED
Wed May 29 17:10:28 CEST 2013
On 05/29/2013 04:50 PM, Stefan Zegenhagen wrote:
> Dear all,
>
> we've stumbled across a small problem.
>
> One of our devices does not like 'to_erl' to be run over a serial port.
> When to_erl is started, we see "Attaching to /tm<0xFF>" being printed
> and the device then refuses to accept any input. Occasionally, we have
> seen a linux kernel error message "serial8250: too much work for irq16"
> simultaneously. After some debugging we found out that cause is a call
> to tcsetattr() by to_erl, immediately preceeded by some printf().
>
> The UART in our device doesn't like hardware parameters to be changed
> while output is concurrently active. In fact, the GNU libc manual also
> mentions that it might be dangerous to change UART hardware parameters
> when a transmission is ongoing.
>
> The patch attached to this e-mail changes the behaviour of to_erl to use
> TCSADRAIN instead of TCSANOW when changing terminal parameters. This
> makes the serial driver wait for the output queues to be empty before
> applying the terminal parameter change.
>
>
> Kind regards,
>
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
Hello Stefan,
Your patch should soon be visible in the 'pu' branch.
Thanks,
--
BR Fredrik Gustafsson
Erlang OTP Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130529/4cbe9323/attachment.htm>
More information about the erlang-patches
mailing list