Alexandre Courbot | 14 Jun 15:23 2004
Picon

Disabling the FIFO on the UART - Bug in 8250 mode?

Hello everybody,

I'm doing some serial-line programming on an embedded device which has a 
very limited UART, which doesn't feature a FIFO. For my tests I send 
bytes using "echo" or "cat" over the serial line for the device to 
receive. Since the processing of the received data can take some time, 
I've enable hardware flow control (RTS/CTS) which works fine - excepted 
that the PC naturally empty its 16 bytes FIFO before stopping sending 
bytes. Which means that when my device sets CTS to low, I'm losing all 
the bytes that the PC has in the FIFO.

This is a normal behavior and I can't do much about it, excepted 
disabling the FIFO on the PC. This is what I'd like to do, but 
unfortunately, as states the Linux Serial Howto:

"As of late 2000 there was no way the Linux user could set these [the 
FIFO buffers settings] directly (setserial can't do it)."

I've read somewhere else what seems to be a workaround to do it anyway:
(http://groups.google.nl/groups?q=stty+disable+fifo&hl=nl&lr=&ie=UTF-8&selm=Printing-HOWTO.1-24498.841892935%40cc.gatech.edu&rnum=8)

   7.2.  Older serial printers that drop characters

   Jon Luckey points out that some older serial printers with ten-cent
   serial interfaces and small buffers really mean stop when they say so
   with flow control.  He found that disabling the FIFO in his Linux
   box's 16550 serial port with setserial corrected the problem of
   dropped characters (you apparently just specify the uart type as an
   8250 to do this).

(Continue reading)

Alexandre Courbot | 14 Jun 15:43 2004
Picon

Re: Disabling the FIFO on the UART - Bug in 8250 mode?


> So I tried doing so (setserial /dev/ttyS0 uart 8250), and that's where 
> the weird things start. My device then only receives one byte on 16 
> (i.e. the latest to enter the FIFO when the serial interrupt is 
> triggered!). It is clearly stated that a 8250 uart does not have any 
> FIFO, so I'm starting to suspect a bug here. I've tested on two Linux 
> x86 machines, runnning kernels 2.6.3 and 2.6.6, the behavior is the 
> same. I've also tried with UARTs16550 and 16450.

Sorry for replying to myself - just to point out that with kernel 
2.4.25, on the same machines, it behaves properly (i.e. I'm receiving 
all the bytes). So it looks like there is a bug in the 2.6 series of the 
serial driver, not disabling the FIFO when setting the 8250 mode.

Would still be nice if it was possible to explicitely disable or tune 
the 16550A's FIFO with, say, setserial! :)

Alex.
--

-- 
Alexandre Courbot - PhD student
RD2P/LIFL
http://www.lifl.fr/~courbot
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Lawyer | 19 Jun 01:44 2004

Serial-Programming-HOWTO needs author/maintainer

There are two HOWTOs on this topic, but only one of them is at the Linux
Documentation Project.  The other HOWTO is by Verne Hoxie and is likely
the better one.  Someone who knows about Serial Programming needs to merge
them together, including likely writing some new material.

I've put both text versions of them on my Website:
http://www.lafn.org/~dave/linux/.  Also, the termios man page on my site goes
with Verne Hoxies HOWTO.  I put them on my site since Vernes site seems
to not be working.

If you can help, let me know and I'll find versions of these in LinuxDoc
sgml (which is acceptable by LDP).

			David Lawyer
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Lukasz Michal Rak | 19 Jun 16:31 2004
Picon
Picon

Re: Serial-Programming-HOWTO needs author/maintainer


	Hi!

 Exactly which HOWTOs needs to be merged? Maybe I could help.

			Lukasz

> There are two HOWTOs on this topic, but only one of them is at the Linux
> Documentation Project.  The other HOWTO is by Verne Hoxie and is likely
> the better one.  Someone who knows about Serial Programming needs to merge
> them together, including likely writing some new material.
>
> I've put both text versions of them on my Website:
> http://www.lafn.org/~dave/linux/.  Also, the termios man page on my site goes
> with Verne Hoxies HOWTO.  I put them on my site since Vernes site seems
> to not be working.
>
> If you can help, let me know and I'll find versions of these in LinuxDoc
> sgml (which is acceptable by LDP).
>
> 			David Lawyer
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Kimdon | 21 Jun 13:00 2004
Picon
Picon

[PATCH] : 8250.c don't iounmap() when no UPF_IOREMAP

Hi,

I have a PCI serial device, using 2.6.6 I get :

__iounmap: bad address fbc79200
__iounmap: bad address fbc79400
__iounmap: bad address fbc79600
. . . .

When the driver is unloaded.  Something like the included patch is, I
believe, necessary.  I don't see any drivers that actually use the
UPF_IOREMAP flag, so it isn't completely clear to me how it should be
used.

-David

* drivers/serial/8250.c 
  (serial8250_request_std_resource) : Only request a resource if
  UPF_IOREMAP is set.
  (serial8250_release_port) : If UPF_IOREMAP is not set then we
  didn't do an ioremap().  In that case we shouldn't do iounmap()
  or release_mem_region().

Index: linux/drivers/serial/8250.c
===================================================================
--- linux.orig/drivers/serial/8250.c	Mon May 10 11:48:00 2004
+++ linux/drivers/serial/8250.c	Mon Jun 21 12:26:42 2004
 <at>  <at>  -1634,7 +1634,7  <at>  <at>  serial8250_request_std_resource(struct u

 	switch (up->port.iotype) {
(Continue reading)

Tobias H. | 1 Jul 20:08 2004
Picon

Einer ist einfach nicht genug!

Einer ist einfach nicht genug! 
Das denken sich auch unsere geilen Girls und Paare und suchen sich deshalb
Gleichgesinnte für Ihre scharfen Gruppensex-Spiele. Dabei treiben sie es
natürlich richtig wild und kennen keine Hemmungen!

http://server42.com/6/?wmid=661

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane