From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: Re: [PATCH V3] input: Fix USB autosuspend on bcm5974 Date: Wed, 12 Oct 2011 17:16:51 +0100 Message-ID: <20111012161651.GA28601@srcf.ucam.org> References: <201110121637.22442.oliver@neukum.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from cavan.codon.org.uk ([93.93.128.6]:36363 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753458Ab1JLQQz (ORCPT ); Wed, 12 Oct 2011 12:16:55 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Alan Stern Cc: Oliver Neukum , Henrik Rydberg , linux-input@vger.kernel.org, dtor@mail.ru On Wed, Oct 12, 2011 at 11:28:06AM -0400, Alan Stern wrote: > Well, if the usage counter is 0 then you wouldn't want to call > usb_put_interface_async(). On the other hand, if the usage counter is > 0 then by definition the device isn't in use, so you shouldn't need to > fail an autosuspend request -- not unless it races with an I/O event. Yeah. Plausibly the model we have in hid is wrong at the moment - rather than set flags that block suspend, it might make more sense to take references. It'd complicate things a little, in that we'd have to take more care in terms of keeping track of the state. -- Matthew Garrett | mjg59@srcf.ucam.org