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

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

From: Dan Williams <hidden>
Date: 2013-01-14 17:49:32

On Sat, 2013-01-05 at 12:01 +0100, Oliver Neukum wrote:
On Friday 04 January 2013 19:26:33 Dan Williams wrote:
quoted
On Fri, 2013-01-04 at 23:16 +0100, Oliver Neukum wrote:
quoted
On Friday 04 January 2013 10:48:16 Dan Williams wrote:
quoted
Some drivers (ex sierra_net) need the status interrupt URB
active even when the device is closed, because they receive
custom indications from firmware.  Allow sub-drivers to set
a flag that submits the status interrupt URB on probe and
keeps the URB alive over device open/close.  The URB is still
killed/re-submitted for suspend/resume, as before.

Signed-off-by: Dan Williams <redacted>
---
Oliver: alternatively, is there a problem with *always*
submitting the interrupt URB, and then simply not calling
the subdriver's .status function when the netdev is
closed?  That would be a much simpler patch.
That is quite radical. We have no idea what a device
does when we do not react to a status update. I would
much prefer to not take the risk.
Besides, we don't use bandwidth if we don't have to.
Ok, so scratch the alternative.  Thus, does the posted patch look like
the right course of action?
In principle yes.
quoted
If I wasn't clear enough before, sierra_net needs to listen to the
status interrupt URB to receive the custom Restart indication as part of
the driver's device setup.  Thus for sierra_net at least, tying the
status interrupt URB submission to device open/close isn't right.
So, there seems to be an inevitable race before probe() is called.
Have you looked at FLAG_AVOID_UNLINK_URBS ?
So that looks like it only applies to the bulk URBs, what was your
suggestion here?  Sierra would want the same behavior as it currently
has (kill data urbs on stop/start) but only the interrupt urb needs to
be kept alive over stop/start.

Dan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help