From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937536AbXG0RNH (ORCPT ); Fri, 27 Jul 2007 13:13:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S937490AbXG0RMv (ORCPT ); Fri, 27 Jul 2007 13:12:51 -0400 Received: from gateway.howardsilvan.com ([64.146.212.27]:48015 "EHLO mail.howardsilvan.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937473AbXG0RMu (ORCPT ); Fri, 27 Jul 2007 13:12:50 -0400 Message-ID: <46AA2748.80703@howardsilvan.com> Date: Fri, 27 Jul 2007 10:11:36 -0700 From: Lee Howard User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Maciej W. Rozycki" CC: Robert Hancock , linux-serial@vger.kernel.org, tytso@mit.edu, rmk@arm.linux.org.uk, linux-kernel@vger.kernel.org Subject: Re: serial flow control appears broken References: <46A84B4A.6070902@shaw.ca> <46A8C6F1.4080309@howardsilvan.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Maciej W. Rozycki wrote: >On Thu, 26 Jul 2007, Lee Howard wrote: > > > >>If the application were to use TIOCM_RTS how would it know when to apply it or >>not? Is there some approach that the application could take to manage flow >>control on the serial port? What about software flow control? Does the >> >> > > Well, an application could negate RTS when it receives a character and >is running out of resources for further processing of incoming data. > > Smarter UARTs may be able to negate RTS themselves based on the amount of >data in their receive FIFO. The threshold may be configurable. > Okay, so let's say we've got a loop around a blocking read on the modem file descriptor... for (;;) { read some data from modem process data from modem if (end-of-data detected) break; } Are you suggesting that the application should be using deasserting RTS after the read and asserting it before? I had previously thought that the control of RTS was something that the serial/tty driver was supposed to do independently based on the buffer fill. Was I wrong? Thanks, Lee.