Re: [PATCH 2/8] serial: imx: fix breaking RTS/CTS handshake by mctrl change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Fri, May 31, 2019 at 08:33:15AM +0300, Sergey Organov wrote:
> This is still wrong, as it turns off RTS/CTS handshake in hardware on
> TIOCM_RTS=0. Once again, set_mctrl() should not touch UCR2_CTSC, -- it's
> as simple as that.
> 
> I still think it's rather what I did in the patch above is the right
> thing to do. It's simple and does the job, no surprises.

I agree that your patch implements the behaviour you intend as the right
one. I believe however that this behaviour isn't right.

We agree that with handshaking disabled (i.e CRTSCTS unset) the RTS
output should be set active iff TIOCM_RTS is requested.

With hardware handshaking enabled the two options we disagree about are:

 a) RTS is not supposed to be changed, only the hardware controls the
    level of RTS.
 b) RTS should be set to inactive if !TIOCM_RTS. Otherwise the hardware
    controls the RTS level.

An equivalent wording of b) is:

	RTS should be active iff both the receiver and the software
	request want it to be active.

Sergey thinks a) is the right one, I believe in b).

I think b) is sane, because with a) the kernel (or userspace) cannot
stop the other side sending data (unless they disable handshaking).

Documentation/serial/driver isn't clear here, we should improve that
once we found an agreement (probably by other people chiming in on what
they think is right).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux