Thread (12 messages) 12 messages, 4 authors, 2013-03-28

Re: [PATCH 1/2] usbnet: allow status interrupt URB to always be active

From: Bjørn Mork <bjorn@mork.no>
Date: 2013-01-05 11:44:40

Oliver Neukum [off-list ref] writes:
On Friday 04 January 2013 19:26:33 Dan Williams wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help