how to debug dropped bytes?

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

 



Hi all,

Can anyone suggest how to go about debugging an issue involving bytes
being dropped by the usbserial and serial8250 drivers?  I have an i686
architecture machine running 2.6.35 that needs to speak to two
different serial devices, one connected to the onboard 16550 and the
other connected via USB to an FTDI chip.  I am not using hardware flow
control.

Both devices drop bytes even at low bit rates (19200 on both ports).
They do so in a somewhat predictable manner.  On one of these ports
all my program has to do is read a 65-byte packet each second, and
what I see is that the packet almost always comes in at 64 bytes,
sometimes 63.  At first I suspected that a bug in my code was to
blame, but I can see the same behavior by just running 'cat
/dev/ttyUSB0 | hexdump -C'.  Packets come in a single byte short, and
then every 20 seconds or so I lose an additional byte.  It's similar
behavior for /dev/ttyS0, according to what I've seen in the logs
written out by my program.

The fact that two totally different drivers are involved makes me
think maybe there is some other device driver that has a very
long-running ISR?  Just a guess- I'm not too familiar with such
things.  I read about a program called irqtune, which I thought about
trying, but it looks like that is very old.  By the way, some of the
other device drivers in use on this system are: r8169, ath9k,
snd_hda_intel (loaded but not used) and udlfb (DisplayLink framebuffer
running xorg).  The chipset is an 82801GBM and CPU is Intel Atom
Diamondville.

Nothing of interest from the kernel log.  Oh, and, I don't know if
this means anything, but I also experienced dropped packets a few
months back, when I briefly decided to try switching from Ubuntu to
plain Debian.  The problem went away when I went back to Ubuntu.  Even
when I booted it up with the Debian kernel, which I thought was very
strange.  And now this problem is back.  Back then it was with
different hardware, although also Intel Atom.

Suggestions appreciated very much.
Thanks,
Kyle
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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