Current-Users archive

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

Possible problem with com(4) at 115200 baud when 16550 has only 1 byte in its fifo?



Hello. It looks like there is a problem in the comsoft() routine in
sys/dev/ic/com.c.   When a panic occurred, I was using com0 on the machine in question, and
the port was sending and receiving data at a baud rate of 115200 simultaneously.  It's been a
long time since I touched this com.c code, but it looks to me like comsoft() doesn't use the
mutex cominter() uses to ensure exclusive access.  My question is, what happens if cominter()
fires, it does its thing, launches comsoft() and, before comsoft() finishes, cominter() fires
again?  The serial port on this machine has a fifo of 1 byte, so interrupts can com in pretty
fast when it's receiving at 115200 baud.  

On the machine in question, an NetBSD-99.77/amd64 device with a 1-byte fifo 16550 compatible
serial chip, I was able to reproduce this panic twice in just a few minutes of each other.

-thanks
-Brian




Home | Main Index | Thread Index | Old Index