This is the mail archive of the 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:

--- Comment #1 from Bernard Fouchà <> 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()
  is called.

- 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:
------- 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]