From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 14:40:01 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 955D6106566B for ; Sun, 15 Aug 2010 14:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 55BF18FC16 for ; Sun, 15 Aug 2010 14:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FEe1iJ022475 for ; Sun, 15 Aug 2010 14:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FEe1Xu022474; Sun, 15 Aug 2010 14:40:01 GMT (envelope-from gnats) Resent-Date: Sun, 15 Aug 2010 14:40:01 GMT Resent-Message-Id: <201008151440.o7FEe1Xu022474@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Paul Thornton Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513E51065673 for ; Sun, 15 Aug 2010 14:31:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 409418FC12 for ; Sun, 15 Aug 2010 14:31:21 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7FEVKxG026530 for ; Sun, 15 Aug 2010 14:31:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o7FEVKS0026529; Sun, 15 Aug 2010 14:31:20 GMT (envelope-from nobody) Message-Id: <201008151431.o7FEVKS0026529@www.freebsd.org> Date: Sun, 15 Aug 2010 14:31:20 GMT From: Paul Thornton To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 14:40:01 -0000 >Number: 149675 >Category: usb >Synopsis: uftdi doesn't react to break properly >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Paul Thornton >Release: 8.1-RELEASE >Organization: >Environment: FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 i386 The same issue is seen with GENERIC kernel >Description: When setting the BRKINT and ~IGNBRK options on a handle where the underlying hardware has an FTDI chipset driven by uftdi and ucom, the break condition is not correctly acted upon. The underlying hardware is an FTDI FT232BL chip. The expected behaviour is that the buffer be flushed on reception of a break when BRKINT is used, however the driver appears to behave as if BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't flushed. FreeBSD 7.2 and 8.0 also exhibit the same behaviour. Using the same test program, and same USB hardware, Linux behaves as per documentation and flushes the buffer on reception of the break when BRKINT is set. >How-To-Repeat: Connect two machines using ftdi-driven hardware. Send a break followed by some data A. Send another break, followed by some data B. The correct response should be that on the receiver the buffer is flushed by both breaks, and a read will only return the data B. What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] The code I was using which brought this issue to light can be downloaded from: http://www.prt.org/dmxrx2.c >Fix: >Release-Note: >Audit-Trail: >Unformatted: