Re: [PATCH 0/3] usb: cdc-wdm: subdriver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, 30. Januar 2012, 19:26:17 schrieb Bjørn Mork:
> Oliver Neukum <oliver@xxxxxxxxxx> writes:
> 
> > Bjørn, in this case it is best to provide two helping function
> > pointers when you create the "subdevice" and realize the counters
> > in the network driver.
> 
> Do you mean to let the cdc-wdm subdriver call back the main driver when
> it wants to set/clear the needs_remote_wakeup flag?

Yes.

> Yes, I can do that but I sort of feel it messes up the interface for
> little gain.  We'd need to store the callback pointers and modify
> wdm_open and wdm_release to use them conditionally. Or provide local
> callbacks for use as a normal driver.  Not pretty at all.

Providing local alternatives is pretty clean. probe() can pass them to create()

> I am currently leaning towards just documenting that cdc-wdm will change
> the needs_remote_wakeup flag and that any driver using cdc-wdm as a
> subdriver therefore will have to prevent autosuspending while being
> active.  This can be done without involving neither usb core nor

We want devices to be able to autosuspend as often as possible.

> cdc-wdm.  The main driver can keep its' private version of the
> needs_remote_wakeup flag and consult that and device_can_wakeup() on
> autosuspend.

Ugh. Not good.

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux