Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753668AbaDOJNz (ORCPT ); Tue, 15 Apr 2014 05:13:55 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:49004 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbaDOJNr (ORCPT ); Tue, 15 Apr 2014 05:13:47 -0400 Date: Tue, 15 Apr 2014 11:13:17 +0200 From: Johan Hovold To: Oliver Neukum Cc: Johan Hovold , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Peter Hurley , One Thousand Gnomes , Xiao Jin , david.a.cohen@linux.intel.com, yanmin.zhang@intel.com Subject: Re: [PATCH] USB: cdc-acm: fix broken runtime suspend Message-ID: <20140415091317.GB24422@localhost> References: <20140411093715.GA17522@localhost> <1397505492-10018-1-git-send-email-jhovold@gmail.com> <1397550919.3307.39.camel@linux-fkkt.site> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1397550919.3307.39.camel@linux-fkkt.site> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 15, 2014 at 10:35:19AM +0200, Oliver Neukum wrote: > On Mon, 2014-04-14 at 21:58 +0200, Johan Hovold wrote: > > > Fix this by implementing a delayed-write queue using urb anchors and > > making sure to discard the queue properly at shutdown. > > Looks very good, with one exception: acm_tty_close() must > synchronously resume the device so that the anchor is emptied > before ASYNCB is cleared. That isn't necessary as the device is already about to be resumed and the initialised flag will not be cleared until chars_in_buffer() returns 0 or closing wait times out. In the first case, the queue has been emptied as the urbs are submitted at resume(), and in the second case the queue is discarded at shutdown(). Johan -- 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/