From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: [PATCH 1/2 v5] usbnet: allow status interrupt URB to always be active Date: Wed, 10 Apr 2013 23:35:06 +0200 Message-ID: <4272156.Maoc6Md9Rk@linux-5eaq.site> References: <20110727141246.GC29616@orbit.nwl.cc> <7761183.G42DetJs5Z@linux-5eaq.site> <1365625850.22411.1.camel@dcbw.foobar.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Ming Lei , Elina Pasheva , Network Development , linux-usb , Rory Filer , Phil Sutter To: Dan Williams Return-path: Received: from smtp-out002.kontent.com ([81.88.40.216]:40138 "EHLO smtp-out002.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934676Ab3DJVeV (ORCPT ); Wed, 10 Apr 2013 17:34:21 -0400 In-Reply-To: <1365625850.22411.1.camel@dcbw.foobar.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wednesday 10 April 2013 15:30:50 Dan Williams wrote: > Some drivers (sierra_net) need the status interrupt URB > active even when the device is closed, because they receive > custom indications from firmware. Add functions to refcount > the status interrupt URB submit/kill operation so that > sub-drivers and the generic driver don't fight over whether > the status interrupt URB is active or not. > > A sub-driver can call usbnet_status_start() at any time, but > the URB is only submitted the first time the function is > called. Likewise, when the sub-driver is done with the URB, > it calls usbnet_status_stop() but the URB is only killed when > all users have stopped it. The URB is still killed and > re-submitted for suspend/resume, as before, with the same > refcount it had at suspend. > > Signed-off-by: Dan Williams Acked-by: Oliver Neukum