>Number:         144696
>Category:       misc
>Synopsis:       tcdrain(3) does not work right with uart(4) driver
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 12 15:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Uniballer
>Release:        8.0-RELEASE-p2
>Organization:
>Environment:
FreeBSD ????.xxxx.com 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 
16:02:27 UTC 2010     
[email protected]:/usr/obj/usr/src/sys/GENERIC  i386

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

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to