[PATCH] amba-pl011: support hardware flow control

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Feb 9 17:14:49 EST 2010


On Tue, Feb 09, 2010 at 08:00:56PM +0530, Rabin VINCENT wrote:
> On Mon, Feb 08, 2010 at 02:51:24PM +0100, Russell King - ARM Linux wrote:
> > On Mon, Feb 08, 2010 at 07:11:50PM +0530, Rabin Vincent wrote:
> > > Enable/disable hardware flow control as requested by the termios.
> > 
> > From what I remember, I didn't implement this because there were
> > corner cases to be dealt with.  I don't remember what they were
> > off hand though.
> 
> We haven't seen any problems with it thus far.  Nothing obvious strikes
> me on rechecking the pl011 spec; it would be helpful if you could
> elaborate.

Right, the problem with RTS flow control is that if you enable it,
the hardware takes full control of the RTS signal.

This means that when the kernel's buffers fill up, the kernel calls
down to the serial core layer to throttle the input.  This then
calls into the set_mctrl function to de-assert RTS.  However, because
the hardware ignores the requested software state, the RTS signal
is not de-asserted, and the remote end continues sending data.

So, enabling hardware auto-RTS is bad news - you will lose data if
the application stops reading data.

Auto-CTS flow control looks safe.



More information about the linux-arm-kernel mailing list