[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r4lzn9b7.fsf@nemi.mork.no>
Date: Sat, 05 Jan 2013 12:44:28 +0100
From: Bjørn Mork <bjorn@...k.no>
To: Oliver Neukum <oliver@...kum.org>
Cc: Dan Williams <dcbw@...hat.com>,
Elina Pasheva <epasheva@...rrawireless.com>,
netdev@...r.kernel.org, linux-usb@...r.kernel.org,
Rory Filer <rfiler@...rrawireless.com>,
Phil Sutter <phil@....cc>
Subject: Re: [PATCH 1/2] usbnet: allow status interrupt URB to always be active
Oliver Neukum <oliver@...kum.org> writes:
> On Friday 04 January 2013 19:26:33 Dan Williams wrote:
>
>> I'd previously done a patch to handle this all in sierra_net, but the
>> problem there is suspend/resume: without directly accessing the usbnet
>> structure's ->suspend_count member (icky!) sierra_net can't correctly
>> kill/submit the URB itself. So I went with a flag to usbnet that Sierra
>> can set.
>
> That is absolutely the right way to do it.
Yes.
Just a comment regarding the ->suspend_count: Are you absolutely sure
you need to look at that, Dan? usbnet uses it to handle suspend/resume
for minidrivers with an unknown number of interfaces, without knowing
whether it is the control or data interface which is suspended or
resumed first. By using the counter it can ensure that the correct
action is taken exactly once regardless of this.
The sierra_net minidriver has the advantage of knowing that there always
is only *one* USB interface being suspended and resumed. So you don't
have to care about ->suspend_count. Just do whatever you need to do on
suspend and resume.
Bjørn
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists