Patchwork usbnet/cdc_ncm: add missing .reset_resume hook

login
register
mail settings
Submitter Stefan Metzmacher
Date June 1, 2011, 9:13 a.m.
Message ID <1306919630-13426-2-git-send-email-metze@samba.org>
Download mbox | patch
Permalink /patch/98152/
State Superseded
Delegated to: David Miller
Headers show

Comments

Stefan Metzmacher - June 1, 2011, 9:13 a.m.
This avoids messages like this after suspend:

   cdc_ncm 2-1.4:1.6: no reset_resume for driver cdc_ncm?
   cdc_ncm 2-1.4:1.7: no reset_resume for driver cdc_ncm?
   cdc_ncm 2-1.4:1.6: usb0: unregister 'cdc_ncm' usb-0000:00:1d.0-1.4, CDC NCM

This is important for the Ericsson F5521gw GSM/UMTS modem.
Otherwise modemmanager looses the fact that the cdc_ncm and cdc_acm devices
belong together.

The cdc_ether module does the same.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
---
 drivers/net/usb/cdc_ncm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Oliver Neukum - June 1, 2011, 9:43 a.m.
Am Mittwoch, 1. Juni 2011, 11:13:50 schrieb Stefan Metzmacher:
> This avoids messages like this after suspend:
> 
>    cdc_ncm 2-1.4:1.6: no reset_resume for driver cdc_ncm?
>    cdc_ncm 2-1.4:1.7: no reset_resume for driver cdc_ncm?
>    cdc_ncm 2-1.4:1.6: usb0: unregister 'cdc_ncm' usb-0000:00:1d.0-1.4, CDC NCM
> 
> This is important for the Ericsson F5521gw GSM/UMTS modem.
> Otherwise modemmanager looses the fact that the cdc_ncm and cdc_acm devices
> belong together.
> 
> The cdc_ether module does the same.

Yes, it does. Have you tested this with active connections and unconnected?

	Regards
		Oliver
Stefan Metzmacher - June 1, 2011, 10:03 a.m.
Am 01.06.2011 11:43, schrieb Oliver Neukum:
> Am Mittwoch, 1. Juni 2011, 11:13:50 schrieb Stefan Metzmacher:
>> This avoids messages like this after suspend:
>>
>>    cdc_ncm 2-1.4:1.6: no reset_resume for driver cdc_ncm?
>>    cdc_ncm 2-1.4:1.7: no reset_resume for driver cdc_ncm?
>>    cdc_ncm 2-1.4:1.6: usb0: unregister 'cdc_ncm' usb-0000:00:1d.0-1.4, CDC NCM
>>
>> This is important for the Ericsson F5521gw GSM/UMTS modem.
>> Otherwise modemmanager looses the fact that the cdc_ncm and cdc_acm devices
>> belong together.
>>
>> The cdc_ether module does the same.
> 
> Yes, it does. Have you tested this with active connections and unconnected?

Yes, I've just tested suspend while having an active connection
(My original tests where without an active connection).

BTW: I'm testing this on top of linux-image-2.6.38-8-generic from ubuntu
11.04.

metze
Alexey ORISHKO - June 1, 2011, 10:08 a.m.
> -----Original Message-----
> From: linux-usb-owner@vger.kernel.org [mailto:linux-usb-
> owner@vger.kernel.org] On Behalf Of Stefan (metze) Metzmacher
> Sent: Wednesday, June 01, 2011 12:04 PM

Please, change a date in DRIVER_VERSION, so it would be easier to track a version of deployed driver

Regards,
Alexey
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stefan Metzmacher - June 1, 2011, 12:01 p.m.
Here comes the patch with the DRIVER_VERSION change.

Are there chances to get this also backported in stable kernel.
I need it for 2.6.38.x (ubuntu 11.04).

metze

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

Patch

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index cdd3ae4..3257aaa 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1234,6 +1234,7 @@  static struct usb_driver cdc_ncm_driver = {
 	.disconnect = cdc_ncm_disconnect,
 	.suspend = usbnet_suspend,
 	.resume = usbnet_resume,
+	.reset_resume =	usbnet_resume,
 	.supports_autosuspend = 1,
 };