On Tue, Sep 4, 2012 at 6:36 PM, Bjørn Mork <bjorn@xxxxxxx> wrote: > > I believe any Ericsson or Gobi modem would do, and most likely other USB > networking devices too. > > I haven't explored the gadget. Doesn't it support remote wakeup? Well, No. > it doesn't really have to just for testing this. You just have to fake > the remote wakeup support, either in the gadget or in the device > driver. It doesn't matter whether it works or not. The point is making > the driver suspend the USB device while the network device is running. The attachment patch is what I have been using to make it support remote wakeup, and looks it works wrt. runtime PM. > > > > So the code trigging this seems to be > > > static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb, > struct sk_buff_head *list, enum skb_state state) > { > unsigned long flags; > enum skb_state old_state; > struct skb_data *entry = (struct skb_data *) skb->cb; > > spin_lock_irqsave(&list->lock, flags); > old_state = entry->state; > entry->state = state; > __skb_unlink(skb, list); > spin_unlock(&list->lock); > spin_lock(&dev->done.lock); > __skb_queue_tail(&dev->done, skb); > if (dev->done.qlen == 1) > tasklet_schedule(&dev->bh); > spin_unlock_irqrestore(&dev->done.lock, flags); > return old_state; > } > > > Hmm, I should probably dump stack here as well.. Anyway, it's a start. Maybe a debug message in defer_bh is enough, :-) Thanks, -- Ming Lei
Attachment:
usb-gadget-remote-wakeup.patch
Description: Binary data