Bug 517270 - rndis incorrectly binds to a Nokia E71
Summary: rndis incorrectly binds to a Nokia E71
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-13 10:32 UTC by Ville Skyttä
Modified: 2011-08-26 14:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-26 14:13:36 UTC


Attachments (Terms of Use)
lspci -vv with Nokia E71 in PC Suite mode (35.09 KB, text/plain)
2009-08-16 21:23 UTC, Ville Skyttä
no flags Details
Plugging in Noka E71: /var/log/messages with rndis_host and rndis_wlan blacklisted (3.99 KB, text/plain)
2009-11-02 21:54 UTC, Patrick
no flags Details
Rawhide and Nokia E71 PC Suite: output of lshal -l (28.20 KB, text/plain)
2009-11-02 22:15 UTC, Patrick
no flags Details
Rawhide and Nokia 71 PC Suite: output of lsusb -vv (15.83 KB, text/plain)
2009-11-02 22:16 UTC, Patrick
no flags Details
Rawhide and Nokia E71 PC Suite: modem-manager --debug (4.58 KB, text/plain)
2009-11-03 00:33 UTC, Patrick
no flags Details
Rawhide and Nokia E71 PC Suite: modem-manager --debug and /var/log/messages (7.61 KB, text/plain)
2009-11-05 00:17 UTC, Patrick
no flags Details

Description Ville Skyttä 2009-08-13 10:32:44 UTC
When trying to test http://fedoraproject.org/wiki/QA:Testcase_NetworkManager_celldata , I got some kernel oopses when plugging in my Nokia E71 phone via USB (happened both in PC suite mode and internet connection sharing mode).  I used the x86_64 live cd from http://fedoraproject.org/wiki/Test_Day:2009-08-13_NetworkManager

http://www.kerneloops.org/submitresult.php?number=628739

Comment 1 Chuck Ebbert 2009-08-13 13:24:43 UTC
Were there any problems other than the warning message?

Comment 2 Ville Skyttä 2009-08-13 14:33:47 UTC
When I did the test case referred to in comment 1, I completed the steps in it but IIRC (that was a one-off boot from a live CD, I don't have it around any more) there was and empty/disabled drop down box in the first networkmanager "new mobile broadband connection" wizard view but it allowed me to continue configuring the connection, and after completing the wizard, I saw the connection in NM applet's connection view, but not in NM-applet's systray icon menu and I found no way to activate or connect with it in the applet.

I assumed that it was because of the oops I got and sent and that's why there was no hardware associated with the configured connection or something and thus it was not possible to try connecting with it.  There are no oopses when I plug the same phone to the same port on the same box in my "usual" setup (F-10 x86_64, KDE, kernel-2.6.29.3-60.fc10.x86_64), this is what I see in syslog when doing that:

Aug 13 17:30:03 viper kernel: usb 1-2.1: new full speed USB device using ehci_hcd and address 6
Aug 13 17:30:03 viper kernel: usb 1-2.1: New USB device found, idVendor=0421, idProduct=00aa
Aug 13 17:30:09 viper kernel: usb 1-2.1: new full speed USB device using ehci_hcd and address 7
Aug 13 17:30:09 viper kernel: usb 1-2.1: New USB device found, idVendor=0421, idProduct=00ab
Aug 13 17:30:09 viper kernel: usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Aug 13 17:30:09 viper kernel: usb 1-2.1: Product: Nokia E71
Aug 13 17:30:09 viper kernel: usb 1-2.1: Manufacturer: Nokia
Aug 13 17:30:09 viper kernel: usb 1-2.1: configuration #1 chosen from 1 choice
Aug 13 17:30:09 viper kernel: cdc_acm 1-2.1:1.10: ttyACM0: USB ACM device
Aug 13 17:30:09 viper kernel: usbcore: registered new interface driver cdc_acm
Aug 13 17:30:09 viper kernel: cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Aug 13 17:30:09 viper kernel: usbcore: registered new interface driver cdc_ether
Aug 13 17:30:09 viper kernel: usb 1-2.1: bad CDC descriptors
Aug 13 17:30:09 viper kernel: usbcore: registered new interface driver rndis_host
Aug 13 17:30:09 viper kernel: usb 1-2.1: bad CDC descriptors
Aug 13 17:30:09 viper kernel: usbcore: registered new interface driver rndis_wlan

I haven't tried using mobile broadband in this configuration (nor do use NetworkManager in it) so I have no idea whether it'd work.

Comment 3 Dan Williams 2009-08-14 19:09:29 UTC
Loading 'rndis_wlan' is really odd...  Can you attach the "lsusb -vv" output for your device?

Comment 4 Ville Skyttä 2009-08-16 21:23:59 UTC
Created attachment 357589 [details]
lspci -vv with Nokia E71 in PC Suite mode

Comment 5 Jean-Philippe 2009-10-26 10:50:34 UTC
Less scientific, sorry: plugged a 5800 (quite same software, works OK F9 & F10) && I can't connect to the network: NM applet tries for a split second then shows disconnected. My wife has an E71, works too in 9 and 10.

Gnome/HAL/NM are trying to outsmart the customer, trying to mount the phone as usb while to act as a modem it must be in "pc" mode - where Gnomad2 is able to reach it, but usually not nautilus. It would be a progress, but nothing works anyway: not as a modem, not as an external storage. Very strange. I use it on my f10 and UNR904 laptops everyday.

[It was a live session too; currently reporting so much issues that I didn't care to keep it up, sorry - well, especially with no network anyway. If given enough instructions, I can give it another go of course]

Jean-Philippe

Comment 6 Dan Williams 2009-10-26 21:57:56 UTC
This looks like an rndis bug; I'm pretty sure the phone isn't going to do rndis, yet the kernel thinks it's doing rndis:

    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber       12
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
      iInterface             11 CDC Comms Interface

Is there a blacklist for the rndis module somewhere?  It seems to be misdetecting.

Comment 7 Patrick 2009-11-02 14:15:15 UTC
Dan: do you need more information or are there any more tests you would like to be done? If there's anything I can do to move this forward please let me know. Would love to see this working again as flawlessly as it did in F11. Thanks!

Comment 8 Dan Williams 2009-11-02 17:34:26 UTC
No, I don't think anymore information is needed, we just need kernel people to follow up on it and see if there's a blacklist that rndis needs to use.  Unfortunately it looks like that USB descriptor actually is matched by the rndis driver:

	/* RNDIS is MSFT's un-official variant of CDC ACM */
	USB_INTERFACE_INFO(USB_CLASS_COMM, 2 /* ACM */, 0x0ff),
	.driver_info = (unsigned long) &rndis_info,

Can you try to blacklist the rndis driver for us?  Add the line "blacklist rndis_host" to the file /etc/modprobe.d/blacklist.conf at the bottom, and restart your machine, then plug in the Nokia.

Comment 9 Ville Skyttä 2009-11-02 18:27:02 UTC
Did that, but it makes no difference, rndis_host load is still attempted, and I see same messages as in comment 3.  This is on F-11, kernel 2.6.30.9-90.fc11.x86_64.

FWIW, I'm not sure what RNDIS is but if it is something specific to Microsoft, it could be a good idea not to try loading it with Nokia devices (I'm not aware of any Nokia devices that run on Microsoft platforms).

Comment 10 Dan Williams 2009-11-02 20:48:28 UTC
RNDIS (Remote NDIS) is a pseudo-ethernet protocol used by Windows Mobile and some WLAN devices and it is completely Microsoft specific.  It is almost certainly not used by the Nokia device, though we can't entirely rule that out.

I guess the blacklist rules didn't work, we need to figure out what the right rule here would be so that rndis doesn't bind to your device.

In the end, the *real* fix is to have a blacklist in rndis of known devices that look like rndis but aren't.  The rndis driver appears to bind devices in a less-specific manner than it should.

Comment 11 Patrick 2009-11-02 21:52:17 UTC
On up-to-date Rawhide x86_64 I just blacklisted both rndis modules:

blacklist rndis_host
blacklist rndis_wlan

Then I rebooted, plugged the Nokia E71 in and on the Nokia selected PC Suite. I don't see the rndis modules being loaded anymore but also don't get a connection (T-Mobile). I'll attach the output of /var/log/messages separately but here's a snippet:

Nov  2 22:51:49 localhost modem-manager: (ttyACM0) opening serial device...
Nov  2 22:52:53 localhost NetworkManager: <WARN>  stage1_prepare_done(): GSM modem connection failed: Serial command timed out
Nov  2 22:52:53 localhost NetworkManager: <info>  (ttyACM0): device state change: 4 -> 9 (reason 1)
Nov  2 22:52:53 localhost NetworkManager: <info>  Marking connection 'T-Mobile' invalid.
Nov  2 22:52:53 localhost NetworkManager: <info>  Activation (ttyACM0) failed.

Comment 12 Patrick 2009-11-02 21:54:39 UTC
Created attachment 367220 [details]
Plugging in Noka E71: /var/log/messages with rndis_host and rndis_wlan blacklisted

Comment 13 Patrick 2009-11-02 22:15:09 UTC
FWIW here is some more information:

[root@localhost usb]# ll /dev/ttyACM0 
crw-rw---- 1 root dialout 166, 0 2009-11-02 22:52 /dev/ttyACM0

[root@localhost /]# find /sys -name ttyACM*
/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.10/tty/ttyACM0
/sys/class/tty/ttyACM0

[root@localhost /]# ll /sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.10/tty/ttyACM0
total 0
-r--r--r-- 1 root root 4096 2009-11-02 23:03 dev
lrwxrwxrwx 1 root root    0 2009-11-02 23:03 device -> ../../../3-1:1.10
drwxr-xr-x 2 root root    0 2009-11-02 23:02 power
lrwxrwxrwx 1 root root    0 2009-11-02 22:51 subsystem -> ../../../../../../../../class/tty
-rw-r--r-- 1 root root 4096 2009-11-02 22:51 uevent

[root@localhost /]# ll /sys/class/tty/ttyACM0
lrwxrwxrwx 1 root root 0 2009-11-02 22:51 /sys/class/tty/ttyACM0 -> ../../devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.10/tty/ttyACM0

I'll also attach lsusb -vv and lshal -l.

Comment 14 Patrick 2009-11-02 22:15:57 UTC
Created attachment 367226 [details]
Rawhide and Nokia E71 PC Suite: output of lshal -l

Comment 15 Patrick 2009-11-02 22:16:29 UTC
Created attachment 367227 [details]
Rawhide and Nokia 71 PC Suite: output of lsusb -vv

Comment 16 Dan Williams 2009-11-03 00:00:45 UTC
For the NetworkManager thing, can you:

service NetworkManager stop
modem-manager --debug
(from another terminal...)
service NetworkManager start

and then try to connect the 3G.  Then paste the output of the modem-manager terminal in here.  Thanks!

Comment 17 Patrick 2009-11-03 00:33:49 UTC
Created attachment 367234 [details]
Rawhide and Nokia E71 PC Suite: modem-manager --debug

Comment 18 Patrick 2009-11-03 00:37:59 UTC
Output of modem-manager --debug is with both rndis modules still blacklisted. Don't know if it's relevant but the swirly NetworkManager thingy with the two green lights/dots in the taskbar froze with just grey lights/dots when I selected T-Mobile Default. Hope this makes sense :)

Comment 19 Dan Williams 2009-11-03 00:51:36 UTC
Ok, can you also include /var/log/messages from your failed attempt?  MM looks like it's doing pretty much everything correctly at this point, need to see what NM is doing.

THanks!

Comment 20 Ville Skyttä 2009-11-03 21:05:23 UTC
I don't have MM or NM installed on this box, but blacklisting both rndis_host and rndis_wlan works for me in the sense that it prevents loading both of those modules and the "bad CDC descriptors" messages no longer appear.

Comment 21 Patrick 2009-11-05 00:16:04 UTC
Dan: I've just updated my laptop to latest Rawhide, rebooted and followed your instructions:

# service NetworkManager stop
<odem-manager is not stopped with the command above
# pkill -9 modem-manager
# modem-manager --debug
From other terminal
# service NetworkManager start && tail -f /var/log/messages

Next plug in the Nokia E71 and select PC Suite on the phone. Then create the new broadband connection: The Netherlands, T-Mobile, Default

The Serial command times out and neither led in the swirly thingy becomes green. It actually doesn't swirl around at all but seems to be frozen while the connection is attempted. This is still with both rndis modules blacklisted. Please let me know if you need anything else or would like me to test something. Thanks!

Comment 22 Patrick 2009-11-05 00:17:03 UTC
Created attachment 367550 [details]
Rawhide and Nokia E71 PC Suite: modem-manager --debug and /var/log/messages

Comment 23 Patrick 2009-11-05 01:40:19 UTC
Just updated the Nokia E71 from firmware 200.x.x to 300.x.x and still no joy.

Comment 24 Jean-Philippe 2009-11-05 07:17:58 UTC
Hello again;

I don't know if there is any more info that could help: a tethering issue can be a showstopper for people. I have a 5800 up-to-date, and my wife an original E71 (no updates).

I did some tryouts with live material:

Sabayon5.0, (k 2.6.31; NM 0.7.1): my 5800 phone connects as a modem in NM perfectly using cdc_acm driver on ttyACM0, as do on F10 and UNR9.04 (pre- '30 kernels). 

Doing 'lsmod|grep cdc' on S5, I've got lots of rndis stuff:
cdc_phonet  5264 0
cdc_ether  4288  1  rndis_host
phonet  15964  1  cdc_phonet
usbnet  14712  3 rndis_wlan, rndis_host, cdc_ether
cdc_acm  14800  3

[I, for sure, don't know, but rndis seems to be 'doing fine' here]


Then Ubuntu 9.10 (k 2.6.31.14; NM 0.7.996): it does _not_ work. (I will report separately to U).

So I know that 'latest' kernel can cope with the Symbian modem, even with rndis 'in'.


I am not very good at all this, but one thing I sure can do is fire up different versions and report modules and other 'easy' stuff.
[I provide Linux here in Phnom Penh, so have a pretty extensive library at hand :) http://www.tropicalicecube.net]

Regards
Jean-Philippe

Comment 25 Patrick 2009-11-05 08:33:52 UTC
Dan: I just read that F12 TC is out and am downloading it as we speak. I'll do a fresh install of the TC on my laptop tonight (CET) and report back.

Jean-Philippe: thank you for your feedback.

Comment 26 Patrick 2009-11-05 13:10:26 UTC
Just did a fresh install of F12 TC.1 x86_64 and no joy. In /var/log/messages I see: 

<WARN>: stage1_prepare_done(): GSM modem connection failed: Serial command timed out

Tonight I'll try an F11 Live cd and check if there are any significant differences.

Comment 27 Dan Williams 2009-11-06 07:52:34 UTC
For those of you having problems with rawhide, please try this updated build of ModemManager from F13/devel:

http://koji.fedoraproject.org/koji/buildinfo?buildID=139944

that is basically latest trunk; what's in F12 RC is somewhat old as we're under freeze.  I'll be rolling out that ModemManager update after F12 is release later this month.  Please test, thanks!

For those of you on NM 0.7.1, there's a build in updates-testing that has a bunch of modem fixes as well:

https://admin.fedoraproject.org/updates/F11/FEDORA-2009-10696

testing on that would also be appreciated.

Comment 28 Patrick 2009-11-06 13:11:18 UTC
Dan: updated the laptop to latest Rawhide and installed modem-manager from koji you referred to. And ...<drum rolls>... it works like a charm :) And this is with the rndis_* modules loaded so blacklisting them was not necessary. Great job! Many thanks for fixing this!

Comment 29 Matthew Schick 2009-11-06 15:37:29 UTC
I can confirm the updated ModemManager package fixes the issue for me as well with no other workarounds enabled.

Thanks!

Comment 30 Bug Zapper 2009-11-16 11:23:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 31 Bug Zapper 2010-11-04 10:31:11 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 32 Ville Skyttä 2010-11-04 16:52:44 UTC
If the intent is that no rndis modules are loaded for this device, this is not fixed in F13.  On a F13 x86_64 KDE box, no networkmanager and no modemmanager installed, plugging the E71 in results in this in syslog:

Nov  4 18:47:48 viper kernel: usb 1-3.5: new full speed USB device using ehci_hcd and address 11
Nov  4 18:47:48 viper kernel: usb 1-3.5: New USB device found, idVendor=0421, idProduct=00aa
Nov  4 18:47:48 viper kernel: usb 1-3.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov  4 18:47:48 viper kernel: usb 1-3.5: Product: Nokia E71
Nov  4 18:47:48 viper kernel: usb 1-3.5: Manufacturer: Nokia
Nov  4 18:47:48 viper kernel: usb 1-3.5: SerialNumber: [removed]
Nov  4 18:47:48 viper kernel: Initializing USB Mass Storage driver...
Nov  4 18:47:48 viper kernel: scsi6 : usb-storage 1-3.5:1.0
Nov  4 18:47:48 viper kernel: usbcore: registered new interface driver usb-storage
Nov  4 18:47:48 viper kernel: USB Mass Storage support registered.
Nov  4 18:47:49 viper kernel: scsi 6:0:0:0: Direct-Access     Nokia    E71              1.0  PQ: 0 ANSI: 0
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: Attached scsi generic sg4 type 0
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: [sdc] 15946752 512-byte logical blocks: (8.16 GB/7.60 GiB)
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: [sdc] Write Protect is off
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
Nov  4 18:47:49 viper kernel: sdc:
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
Nov  4 18:47:49 viper kernel: sd 6:0:0:0: [sdc] Attached SCSI removable disk
Nov  4 18:47:51 viper kernel: usb 1-3.5: USB disconnect, address 11
Nov  4 18:47:53 viper kernel: usb 1-3.5: new full speed USB device using ehci_hcd and address 12
Nov  4 18:47:53 viper kernel: usb 1-3.5: New USB device found, idVendor=0421, idProduct=00ab
Nov  4 18:47:53 viper kernel: usb 1-3.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov  4 18:47:53 viper kernel: usb 1-3.5: Product: Nokia E71
Nov  4 18:47:53 viper kernel: usb 1-3.5: Manufacturer: Nokia
Nov  4 18:47:53 viper kernel: NET: Registered protocol family 35
Nov  4 18:47:53 viper kernel: cdc_acm 1-3.5:1.10: ttyACM0: USB ACM device
Nov  4 18:47:53 viper kernel: cdc_acm 1-3.5:1.12: ttyACM1: USB ACM device
Nov  4 18:47:53 viper kernel: usbcore: registered new interface driver cdc_acm
Nov  4 18:47:53 viper kernel: cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Nov  4 18:47:53 viper kernel: usbcore: registered new interface driver cdc_phonet
Nov  4 18:47:53 viper kernel: usbcore: registered new interface driver cdc_ether
Nov  4 18:47:53 viper kernel: usbcore: registered new interface driver rndis_host
Nov  4 18:47:53 viper kernel: cfg80211: Calling CRDA to update world regulatory domain
Nov  4 18:47:53 viper kernel: usbcore: registered new interface driver rndis_wlan

There are no error messages though.

Comment 33 Bug Zapper 2011-06-02 17:50:40 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 34 Ville Skyttä 2011-06-11 11:06:54 UTC
rndis related entries are still being logged when the E71 is plugged in with 2.6.35.13-91.fc14.x86_64:

kernel: [366966.144302] usbcore: registered new interface driver rndis_host
kernel: [366966.263315] usbcore: registered new interface driver rndis_wlan

Comment 35 Josh Boyer 2011-08-26 14:13:36 UTC
The rndis_host module doesn't have a blacklist for devices.  Given that the E71 USB descriptor matches what rndis supports, it binds.  This in and of itself doesn't seem to really be a problem given that there are no errors any longer.

Dan, if you think a blacklist should be introduced please reopen.  I'm closing this as worksforme since newer NetworkManager and ModemManager seem to support this device without issue.


Note You need to log in before you can comment on or make changes to this bug.