From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 22:09:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78F621065673 for ; Tue, 2 Dec 2008 22:09:22 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173003pub.verizon.net (vms173003pub.verizon.net [206.46.173.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5AAD38FC17 for ; Tue, 2 Dec 2008 22:09:22 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms226.mailsrvcs.net ([172.18.12.131]) by vms173003.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KB900BLQS736NI9@vms173003.mailsrvcs.net> for freebsd-hackers@freebsd.org; Tue, 02 Dec 2008 16:09:03 -0600 (CST) Received: from 65.242.108.162 ([65.242.108.162]) by vms226.mailsrvcs.net (Verizon Webmail) with HTTP; Tue, 02 Dec 2008 16:09:03 -0600 (CST) Date: Tue, 02 Dec 2008 16:09:03 -0600 (CST) From: Sergey Babkin X-Originating-IP: [65.242.108.162] To: noresult@xs4all.nl Message-id: <1446553908.92321228255743687.JavaMail.root@vms226.mailsrvcs.net> Content-transfer-encoding: quoted-printable X-Mailman-Approved-At: Tue, 02 Dec 2008 22:30:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: TCSBRK not implemented in linux compat X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 22:09:22 -0000 >While trying to get = a linux binary running on FreeBSD I encountered >the following prob= lem during serial port I/O. > >Dec 1 22:22:34 soekris kernel: = linux: pid 7239 (linuxbinary): ioctl >fd=3D0, cmd=3D0x5409 ('T',9) = is not implemented > >0x5409 turns out to be TCSBRK, which is = not implemented (yet?). Can >anyone give me some clues where / how = to start implementing this? It >seems like the linux way of handlin= g it is to call tcdrain(), but I'm >not sure as to how this transla= tes to the FreeBSD compat layer. It should probably be translated to= the same BSD call. What it does is drain the buffer then send the seria= l BREAK signal: a low-voltage signal lasting longer than the length of o= ne normal character. The other side can detect this and generate an inte= rrupt, which then may get translated to a signal (see the stty parameters&n= bsp; ignbrk, brkint). -SB