Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756970AbbBEK4X (ORCPT ); Thu, 5 Feb 2015 05:56:23 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:55776 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751706AbbBEK4V (ORCPT ); Thu, 5 Feb 2015 05:56:21 -0500 MIME-Version: 1.0 Date: Thu, 5 Feb 2015 12:56:20 +0200 X-Google-Sender-Auth: eHbLcaEbZ54lgW1BxDS8njFgbzI Message-ID: Subject: usb serial: pl2303 driver TxD "break" stays after close() bug From: Jari Ruusu To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1413 Lines: 49 Tested on 3.10.67 and 3.18.5 kernels with ATEN UC-232A usb-serial adapter. No patch, sorry. To actually see the stuck "break" signal on TxD line, you need either some sort of LED or voltmeter connected to the data transmit line. Other RS-232 serial ports that I have access to (normal PC hardware serial ports and FTDI usb-serial adapters) do not have this bug. /* pl2303 TxD "break" stays after close() demo */ #include #include #include #include #include #include #include #include int main(int argc, char **argv) { struct termios tt; int fd; if(argc < 2) { fprintf(stderr, "usage: %s /dev/ttyUSB0\n", argv[0]); exit(1); } if((fd = open(argv[1], O_RDWR | O_NOCTTY, 0)) == -1) { perror("serial port open failed"); exit(1); } tcgetattr(fd, &tt); cfmakeraw(&tt); tcsetattr(fd, TCSANOW, &tt); if(ioctl(fd, TIOCSBRK, 0) == -1) { perror("set BRK failed"); exit(1); } close(fd); exit(0); } -- Jari Ruusu 4096R/8132F189 12D6 4C3A DCDA 0AA4 27BD ACDF F073 3C80 8132 F189 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/