From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756179AbbCEOca (ORCPT ); Thu, 5 Mar 2015 09:32:30 -0500 Received: from mail-qc0-f181.google.com ([209.85.216.181]:37243 "EHLO mail-qc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756144AbbCEOc2 (ORCPT ); Thu, 5 Mar 2015 09:32:28 -0500 Message-ID: <54F868F9.1050804@hurleysoftware.com> Date: Thu, 05 Mar 2015 09:32:25 -0500 From: Peter Hurley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Johan Hovold , Greg Kroah-Hartman CC: Jiri Slaby , Samuel Ortiz , "David S. Miller" , Alan Cox , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, netdev@vger.kernel.org, ZIV-Asier Llano Palacios Subject: Re: [PATCH 5/5] TTY: fix tty_wait_until_sent maximum timeout References: <1425461947-15888-1-git-send-email-johan@kernel.org> <1425461947-15888-6-git-send-email-johan@kernel.org> In-Reply-To: <1425461947-15888-6-git-send-email-johan@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/04/2015 04:39 AM, Johan Hovold wrote: > Currently tty_wait_until_sent may take up to twice as long as the > requested timeout while waiting for driver and hardware buffers to > drain. > > Fix this by taking the remaining number of jiffies after waiting for > driver buffers to drain into account so that the timeout actually > becomes a maximum timeout as it is documented to be. > > Note that this specifically implies tighter timings when closing a port > as a consequence of actually honouring the port closing-wait setting > for drivers relying on tty_wait_until_sent_from_close (e.g. via > tty_port_close_start). Reviewed-by: Peter Hurley