netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH torvalds-2.6] cdc_ether: fix autosuspend for mbm devices
@ 2010-04-26 10:14 Torgny Johansson
  2010-04-26 10:30 ` Oliver Neukum
  0 siblings, 1 reply; 4+ messages in thread
From: Torgny Johansson @ 2010-04-26 10:14 UTC (permalink / raw)
  To: oliver, davem, netdev

Hi!

In 2.6.33 it seems autosuspend is broken for mbm devices.

Autosuspend works until you bring the wwan interface up, then the device does not enter autosuspend anymore.

The following patch fixes the problem by setting the .manage_power field in the mbm_info struct 
to the same as in the cdc_info struct (cdc_manager_power).

I am unsure exactly what that does and why autosuspend doesn't work without it. 
Can you guys comment on that? Is this fix the correct approach?

Also, if you like this patch, is it possible to get it included in a minor release of 2.6.33 (e.g. 2.6.33.3) as a bugfix?

Regards
Torgny Johansson

---
Signed-off-by: Torgny Johansson <torgny.johansson@ericsson.com>

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index c8cdb7f..3547cf1 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -431,6 +431,7 @@ static const struct driver_info mbm_info = {
 	.bind = 	cdc_bind,
 	.unbind =	usbnet_cdc_unbind,
 	.status =	cdc_status,
+	.manage_power =	cdc_manage_power,
 };
 
 /*-------------------------------------------------------------------------*/


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH torvalds-2.6] cdc_ether: fix autosuspend for mbm devices
  2010-04-26 10:14 [PATCH torvalds-2.6] cdc_ether: fix autosuspend for mbm devices Torgny Johansson
@ 2010-04-26 10:30 ` Oliver Neukum
  2010-04-28  0:07   ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2010-04-26 10:30 UTC (permalink / raw)
  To: Torgny Johansson; +Cc: netdev

Am Montag, 26. April 2010 12:14:13 schrieb Torgny Johansson:
> Hi!
> 
> In 2.6.33 it seems autosuspend is broken for mbm devices.

It is hardly broken. It simply wasn't implemented.

> Autosuspend works until you bring the wwan interface up, then the device does not enter autosuspend anymore.
> 
> The following patch fixes the problem by setting the .manage_power field in the mbm_info struct 
> to the same as in the cdc_info struct (cdc_manager_power).
> 
> I am unsure exactly what that does and why autosuspend doesn't work without it. 
> Can you guys comment on that? Is this fix the correct approach?

The patch is correct. If you use another struct driver_info it is a different
driver as far as usbnet is concerned. A driver needs to give some
minimal support for autosuspend. mbm didn't do so.
 
> Also, if you like this patch, is it possible to get it included in a minor release of 2.6.33 (e.g. 2.6.33.3) as a bugfix?

Up to David.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH torvalds-2.6] cdc_ether: fix autosuspend for mbm devices
  2010-04-26 10:30 ` Oliver Neukum
@ 2010-04-28  0:07   ` David Miller
  2010-04-28  7:07     ` Torgny Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2010-04-28  0:07 UTC (permalink / raw)
  To: oneukum; +Cc: torgny.johansson, netdev

From: Oliver Neukum <oneukum@suse.de>
Date: Mon, 26 Apr 2010 12:30:21 +0200

>> Also, if you like this patch, is it possible to get it included in a minor release of 2.6.33 (e.g. 2.6.33.3) as a bugfix?
> 
> Up to David.

I'll apply to net-2.6 and queue up for -stable, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH torvalds-2.6] cdc_ether: fix autosuspend for mbm devices
  2010-04-28  0:07   ` David Miller
@ 2010-04-28  7:07     ` Torgny Johansson
  0 siblings, 0 replies; 4+ messages in thread
From: Torgny Johansson @ 2010-04-28  7:07 UTC (permalink / raw)
  To: David Miller; +Cc: oneukum@suse.de, netdev@vger.kernel.org

onsdagen den 28 april 2010 02.07.57 skrev  David Miller:
> From: Oliver Neukum <oneukum@suse.de>
> Date: Mon, 26 Apr 2010 12:30:21 +0200
> 
> >> Also, if you like this patch, is it possible to get it included in a
> >> minor release of 2.6.33 (e.g. 2.6.33.3) as a bugfix?
> > 
> > Up to David.
> 
> I'll apply to net-2.6 and queue up for -stable, thanks.

Great, thank you!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-28  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-26 10:14 [PATCH torvalds-2.6] cdc_ether: fix autosuspend for mbm devices Torgny Johansson
2010-04-26 10:30 ` Oliver Neukum
2010-04-28  0:07   ` David Miller
2010-04-28  7:07     ` Torgny Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).