mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [UART] 8250:RTS/CTS flow control issue.
@ 2005-03-15 16:05 moreau francis
  2005-03-17  9:57 ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: moreau francis @ 2005-03-15 16:05 UTC (permalink / raw)
  To: linux-kernel

I tried to use my serial port with rts/cts flow 
control enabled in order to transfer a data file
between 2 DTE. The first one is a PC running Linux
with a 8250 UART and the second one is a developement 
board running Linux with a particular UART (I wrote
its driver based on 8250's one).

Actually 8250 UARTs have rts/cts line but they're
managed by software (and then called hw flow control
!!!). Hence when my board's UART (which have a "true"
hw flow control) asserts its RTS line, 8250's UART
sends 8 bytes before stopping TX...
Therefore board's UART fifo have been overrun because
it has only 8 bytes for its fifo.

Does it mean that we can't do any reliable flow
controls with 8250 UART ? In that case a simple
workaround would be to limit tx fifo to 1 byte...

Thanks

     Francis



	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [UART] 8250:RTS/CTS flow control issue.
@ 2005-03-17 14:34 moreau francis
  2005-03-17 16:17 ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: moreau francis @ 2005-03-17 14:34 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

Russell King wrote:
>I, therefore, strongly suggest that you arrange to do
the same - iow,
>deassert RTS when your buffer is approaching approx.
2/3 full rather
>than absolutely full.

Well, I don't think this gonna work because my rx fifo
is only 8 bytes
length and 8250's one is 16 bytes length. This means
that if I
deassert RTS when my fifo is 5 bytes full, I can
potentially receive 8
bytes and thus get an overrun...

But why should I "degrade" my UART because some 8250
devices have
poor hardware implementation. Maybe we should limit
their tx fifo to
one byte when rts/cts flow control is enabled...

thanks

	Francis


	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [UART] 8250:RTS/CTS flow control issue.
@ 2005-03-18  9:30 moreau francis
  0 siblings, 0 replies; 5+ messages in thread
From: moreau francis @ 2005-03-18  9:30 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel


--- Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> If you want it to be immediate, then I'm afraid
> you're going to have a
> relatively hard time, with compatibility problems
> with various systems.
> You can't really dictate to people that they must
> turn off the FIFOs on
> their UARTs for your product to work.  (Well, you
> can, but _you_ would
> have to support them.)
> 

well, I don't specially wan't to be immediate.
My hardware has "auto flow control" and a 8 bytes
fifo...So *whatever* the trigger level is for RTS
(actually I can't tune it), I will overrun because 
the end *driver*, which should be aware of the lack of
its "hw auto flow control", decides to fill up its tx
fifo to 8 bytes when transmiting...

One other solution may be to give the possibility of
the user to tune the size of tx fifo ?

thanks

      Francis


	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-18  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-15 16:05 [UART] 8250:RTS/CTS flow control issue moreau francis
2005-03-17  9:57 ` Russell King
2005-03-17 14:34 moreau francis
2005-03-17 16:17 ` Russell King
2005-03-18  9:30 moreau francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome