This is the mail archive of the
ecos-bugs@sourceware.org
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: unassigned at bugs dot 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: <bug-1001483-777@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001483
--- Comment #1 from Bernard Fouchà <bernard.fouche@kuantic.com> 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:
mcf5272_serial.c:
- break character is read from FIFO and discarded, indicate_status()
is called.
- all other errors are firt signaled by call to indicate_status() and
top-of-fifo character is sent to upper layer.
mpc55_serial_with_ints.c:
- all errors (but overrun error) discard top-of-fifo character.
ser_mcf52xx.c:
- 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)
sh_scif_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
mpc55_serial_with_ints.c.
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 the assignee for the bug.