Bug 144696 - [uart] tcdrain(3) does not work right with uart(4) driver
Summary: [uart] tcdrain(3) does not work right with uart(4) driver
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-12 15:20 UTC by Uniballer
Modified: 2017-12-31 22:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uniballer 2010-03-12 15:20:01 UTC
tcdrain(3) does not wait for serial output to complete when used with the uart(4) driver.  This worked correctly on 6.4 and 7.x with the sio(4) driver.

How-To-Repeat: Loop back a serial port, write a long buffer to it, then call tcdrain(3) to wait for output to complete, and call tcflush(3) to get rid of the data.  A subsequent read will show that part of the data is in the receive buffer, probably because it was received after tcflush(3) was called because tcdrain(3) was called early.

See http://forums.freebsd.org/showthread.php?t=12154 for more info and sample code.
Comment 1 Marcel Moolenaar freebsd_committer freebsd_triage 2011-01-24 19:49:24 UTC
Responsible Changed
From-To: freebsd-bugs->ed

Ed, 
Can you do a quick triage to see if there's a problem in the TTY layer? 
Thanks,
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:01 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped