This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001483] Generic 16x5x driver has incorrect error processing


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001483

--- Comment #2 from Bernard Fouchà <bernard.fouche@kuantic.com> 2012-02-14 10:53:52 GMT ---
Another side effect of this bug: it seems there was a confusion when the driver
was written between asking the controller to trigger interrupts for errors and
doing error processing: errors can show up even if there is no interrupt set
for Line Status so they must always be considered. Only calling
indicate_status() is optional and related to
CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS.

When looking at other drivers, for drivers that considers that errors have to
be considered only if CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS is set:

mcf5272_serial.c has a similar bug.

mpc55_serial_with_ints.c seems ok (according to comments)

ser_mcf52xx.c has a similar bug. Comments show authors thought that an error
could be matched with the corresponding byte in the data stream sent upward
which is, IMHO, impossible, unless the client thread perform reads one byte at
a time in such a way that the input stream is always empty when an error
occurs, while synchronizing with indicate_status() which runs in DSR mode: a
very complex setup. And since other drivers don't work that way, such an
application would be specific to MCF52XX processing. BTW I wonder how one can
do error processing in the thread if the error is reported *after* having the
erroneous character: this implies waiting for a call to indicate_status() after
each received byte, and there is no call done to indicate_status() if nothing
special occurs on the line. (I may have missed something since such processing
seems very erroneous?)

sh_scif_serial.c: can't tell since error handling is very different from other
drivers.

-- 
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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]