* Opening already open serial port now sets RTS and DTR?
@ 2022-02-17 15:28 Grant Edwards
2022-02-17 15:36 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Grant Edwards @ 2022-02-17 15:28 UTC (permalink / raw)
To: linux-serial
It used to be that opening a serial port only set RTS and DTR if it
was a "first open". If the port was already open, subsequent opens
didn't mess up RTS and DTR. This was a very useful behavior in the
embedded world where RTS and DTR are often used to power and or
control things (reset lines, mode controls, line driver enables,
etc.).
This seems to have changed, and now _every_ open sets RTS and DTR even
if the port was already open and RTS and DTR had already been put in
the desired state.
Is there no longer any way to open an already-open serial port without
changing the state of RTS and DTR?
What was the reasoning for breaking user-application backwards
compatiblity like that?
--
Grant
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Opening already open serial port now sets RTS and DTR?
2022-02-17 15:28 Opening already open serial port now sets RTS and DTR? Grant Edwards
@ 2022-02-17 15:36 ` Greg KH
2022-02-17 16:50 ` Grant Edwards
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-02-17 15:36 UTC (permalink / raw)
To: Grant Edwards; +Cc: linux-serial
On Thu, Feb 17, 2022 at 03:28:00PM -0000, Grant Edwards wrote:
> It used to be that opening a serial port only set RTS and DTR if it
> was a "first open". If the port was already open, subsequent opens
> didn't mess up RTS and DTR. This was a very useful behavior in the
> embedded world where RTS and DTR are often used to power and or
> control things (reset lines, mode controls, line driver enables,
> etc.).
>
> This seems to have changed, and now _every_ open sets RTS and DTR even
> if the port was already open and RTS and DTR had already been put in
> the desired state.
When did it change? Any chance you can do 'git bisect' to track it
down?
And what hardware are you using here? Different hardware works
differently in this way at times.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Opening already open serial port now sets RTS and DTR?
2022-02-17 15:36 ` Greg KH
@ 2022-02-17 16:50 ` Grant Edwards
0 siblings, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2022-02-17 16:50 UTC (permalink / raw)
To: linux-serial
On 2022-02-17, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Thu, Feb 17, 2022 at 03:28:00PM -0000, Grant Edwards wrote:
>> It used to be that opening a serial port only set RTS and DTR if it
>> was a "first open". [...]
>> This seems to have changed, and now _every_ open sets RTS and DTR
>> even if the port was already open and RTS and DTR had already been
>> put in the desired state.
>
> When did it change?
I'm not sure. It's been a couple years since the last time I
personally used something that relied on the "old" behavior.
> Any chance you can do 'git bisect' to track it down?
Unfortunately, it would take a lot of work to get set up to do that.
I can probably try the past half-dozen or so Ubuntu distros (I'm not
sure how far back I can go with available hardware). I'll check around
with colleagues to see if we have any existing installations that are
using on the old behavior.
> And what hardware are you using here?
I've tried a couple different FTDI USB devices (FT232R single port and
FT4232H quad port). I've also tried a 16550A motherboard UART. I
believe that both FTDI and 16550 used to set RTS/DTR only on "first
open".
> Different hardware works differently in this way at times.
Which is the "expected correct" behavior?
--
Grant
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-17 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 15:28 Opening already open serial port now sets RTS and DTR? Grant Edwards
2022-02-17 15:36 ` Greg KH
2022-02-17 16:50 ` Grant Edwards
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).