This is the mail archive of the
mailing list for the eCos project.
[Bug 1001483] Generic 16x5x driver has incorrect error processing
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Mon, 13 Feb 2012 15:43:42 +0000
- Subject: [Bug 1001483] Generic 16x5x driver has incorrect error processing
- Auto-submitted: auto-generated
- References: <email@example.com/>
Please do not reply to this email. Use the web interface provided at:
--- Comment #1 from Bernard FouchÃ <firstname.lastname@example.org> 2012-02-13 15:43:39 GMT ---
Before making a patch I had a look at other hw serial drivers to know what is
the behavior to follow regarding errors. This is what I've understood:
- break character is read from FIFO and discarded, indicate_status()
- all other errors are firt signaled by call to indicate_status() and
top-of-fifo character is sent to upper layer.
- all errors (but overrun error) discard top-of-fifo character.
- if an error is met, the top-of-fifo character is first sent to upper
layer, and then indicate_status() is called. (reverted sequence
compared to mcf5272_serial.c)
- from what I understand of the driver, it seems that error processing
has its own ISR/DSR and an error can't be linked to a particular
character in the hardware rx buffer (but I didn't look at any
datasheet, only the driver code).
IMHO if the error is related to the top-of-fifo character, then this character
should be discarded because it's impossible for a reading thread to know
precisely which character is broken even if the thread implements the callback
function called by indicate_status(): indicate_status() is called when the
error is discovered, not when the broken character is read by the reading
thread. (And I don't think it's acceptable to provide to the reading thread
characters that are known to be broken.)
So the patch should have a behavior similar to the one implemented in
Since errors and FIFO reading have to be implemented in the same loop, this
would also solve bug #1001475.
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.