All of lore.kernel.org
 help / color / mirror / Atom feed
* Strange problem with tty layer
@ 2007-01-24 20:40 Lennart Sorensen
  2007-01-24 21:20 ` Paul Fulghum
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Sorensen @ 2007-01-24 20:40 UTC (permalink / raw)
  To: linux-kernel

I am seeing a very strange problem which seems to be in the tty layer.

I am using an exar 17D154 based PCI card (like the digi neo style card)
using the jsm driver.  Kernel version 2.6.16.25.

My test involves connecting two ports together with a cross over cable
and then sending a test pattern of characters.  I am currently using
11520 characters at 230400bps (so 0.5s for the transfer).

Most of the time, it works perfectly, but once in a while, I never
receiver the last few characters (between 1 and 65 or so characters it
seems).

I have confirmed that the driver does in fact receive all the
characters, and that they are correct, and that they are being passed to
the tty layer using tty_insert_flip_string, and that it returns that all
the characters have been passed to the tty layer.  The user space
application however still doesn't see the last few characters (when it
fails).

The problem seems to occour every few hours of testing on a 266MHz Geode
SC1200.  When I change the clock to 133MHz, it happens every few minutes
instead (so much more frequently).  I suspect there is some race
condition that allows the tty layer to not get around to processing all
the data in the buffer, even when asked for data by the application
(which is waiting on the serial port using select, with a 4s timeout).

Any suggestions on where to head next to debug this?

Sending a few more characters when the receive times out before getting
the complete message does not cause the missing data to arive it seems,
only completely closing and starting the test program again seems to
recover it, although I may just not have been patient enough.

--
Len Sorensen

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Strange problem with tty layer
@ 2007-01-24 21:19 Kilau, Scott
  2007-01-24 21:34 ` Lennart Sorensen
  0 siblings, 1 reply; 14+ messages in thread
From: Kilau, Scott @ 2007-01-24 21:19 UTC (permalink / raw)
  To: lsorense; +Cc: linux-kernel

Hi Len,

> I am seeing a very strange problem which seems to be in the tty layer.
> 
> I am using an exar 17D154 based PCI card (like the digi neo style
card)
> using the jsm driver.  Kernel version 2.6.16.25.

There are a couple interesting things I would do here.

1) The tty "flip" buffer stuff was changed in 2.6.16+.

Maybe you could try going downwards to 2.6.15 or below and see if the
problem
still exists.

Then try going up to 2.6.19, I believe there were some bugs fixed
in 2.6.17/18/19, not sure how many of those made it backported into
2.6.16.25.

2) Try using Digi's "Out-Of-Kernel-Source-Tree"/GPL version of the
driver.
You can grab the latest and greatest beta version of it from here:
ftp://ftp1.digi.com/support/beta/linux/dgnc/
Its in source rpm format, let me know if you need it in a tarball format
instead.

You obviously will have to add in your specific PCI id into the driver,
but that should be a problem.

3) I seem to recall that someone mentioned that the Exar 17D154 PCI
chips were
easily "pushed" into the 8250 driver.
It might be interesting to try that route as well.

Scott Kilau

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

end of thread, other threads:[~2007-02-17 16:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-24 20:40 Strange problem with tty layer Lennart Sorensen
2007-01-24 21:20 ` Paul Fulghum
2007-01-24 21:48   ` Lennart Sorensen
2007-01-25 15:16   ` Lennart Sorensen
2007-01-26 14:20     ` Lennart Sorensen
2007-01-26 14:51       ` Paul Fulghum
2007-01-26 14:56         ` Lennart Sorensen
2007-01-26 15:06           ` Paul Fulghum
2007-01-26 16:08             ` Lennart Sorensen
2007-01-29 19:27               ` Lennart Sorensen
2007-02-17 16:09                 ` Lennart Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2007-01-24 21:19 Kilau, Scott
2007-01-24 21:34 ` Lennart Sorensen
2007-01-25 14:31   ` Russell King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.