Re: Small fix to to_erl
Fredrik <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <[email protected]> |
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 > [email protected] > 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 _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches