Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933455AbZJHUGs (ORCPT ); Thu, 8 Oct 2009 16:06:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933407AbZJHUGr (ORCPT ); Thu, 8 Oct 2009 16:06:47 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:45359 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933397AbZJHUGr (ORCPT ); Thu, 8 Oct 2009 16:06:47 -0400 Date: Thu, 8 Oct 2009 16:06:10 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Oliver Neukum cc: Alan Cox , Greg KH , Kernel development list , USB list Subject: Re: [PATCH 4/5] usb_serial: Kill port mutex In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 34 On Thu, 8 Oct 2009, Alan Stern wrote: > > > > 2. Can we get by with only one flag? > > > > > > If all you want to do is answer a single question ("Should URBs be > > > submitted") then a single flag should be all you need. Why, do you > > > think more information will be necessary? You can always add more. > > > > We have at least three reasons URBs should not be submitted. > > - closure > > - throttling > > - suspension > > Resume() should not submit if either closure or throttling are active, > > neither should unthrottle() resubmit if closure or suspension are active. > > True. Nor should open() submit if throttling is active. Feel free to > use three separate flags. :-) On further thought, unthrottle should autoresume if the device is open and autosuspended (but it shouldn't do anything if the device is suspended). After all, the reason for the autosuspend may have been the lack of activity caused by the throttling. In practice this isn't likely to come up. It would be surprising if throttling lasted long enough to cause an autosuspend or if the core decided to throttle while the device was autosuspended and hence idle. Alan Stern -- 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/