Skip to contentSkip to conversation

cdc_ether: fix autosuspend for mbm devices

PATCH In review Torgny Johansson 3 participants 4 messages Apr 26, 2010 – Apr 28, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cdc_ether: fix autosuspend for mbm devices

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

---

drivers/net/usb/cdc_ether.c +1 -0
index c8cdb7f..3547cf1 100644
@@ -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,
 };
 
 /*-------------------------------------------------------------------------*/
#1 lore raw

Am Montag, 26. April 2010 12:14:13 schrieb Torgny Johansson:

Quoted 3 lines

Hi!

In 2.6.33 it seems autosuspend is broken for mbm devices.

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

Quoted 7 lines

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.

Quoted 1 line

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

maintainer
#2 lore raw

From: Oliver Neukum <[email protected]>
Date: Mon, 26 Apr 2010 12:30:21 +0200

Quoted 3 lines
Quoted 1 line

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.

#3 lore raw

onsdagen den 28 april 2010 02.07.57 skrev David Miller:

Quoted 9 lines

From: Oliver Neukum <[email protected]>
Date: Mon, 26 Apr 2010 12:30:21 +0200

Quoted 4 lines
Quoted 2 lines

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!