Bug 8094

Summary: ipaq oops on connecting "Vodafone VPA-II"
Product: Drivers Reporter: Alexander Weber (web.alexander)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: CLOSED CODE_FIX    
Severity: normal CC: akpm, bunk, jcd, oliver, protasnb, stern
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.21-rc1-git1 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 5089    
Attachments: Kernel-Messages
Check the number of interfaces
Check the exact number of endpoints
my linux-2.6.23-rc5 config
usbnet patch to compute dev->maxpacket before calling bind()

Description Alexander Weber 2007-02-26 22:50:52 UTC
2.6.18 does not known VPA-II, 2.6.19-2.6.21 oops
Distribution: Gentoo
Hardware Environment: AMD Athlon(tm) XP
Software Environment: Synce 0.9.1
Problem Description:


A2600 kernel: [  298.707099] Oops: 0002 [#1]
A2600 kernel: [  298.707101] PREEMPT 
A2600 kernel: [  298.707144] CPU:    0
A2600 kernel: [  298.707145] EIP:    0060:[<f93cc9cd>]    Tainted: PF      VLI
A2600 kernel: [  298.707147] EFLAGS: 00210286   (2.6.21-rc1-git1 #1)
A2600 kernel: [  298.707163] EIP is at ipaq_open+0x1a5/0x2e0 [ipaq]
A2600 kernel: [  298.707166] eax: 00000000   ebx: 00000100   ecx: c18dc120  
edx: f2026000
A2600 kernel: [  298.707170] esi: ee2b8e80   edi: ece833d4   ebp: f21ebc00  
esp: ece81e5c
A2600 kernel: [  298.707173] ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
A2600 kernel: [  298.707176] Process pppd (pid: 11257, ti=ece80000 task=ecfc8050
task.ti=ece80000)
A2600 kernel: [  298.707178] Stack: ecad0400 f22057f8 f0503600 c01f3209 00000000
c01f3a1a ece833c0 ed6d1fa0 
A2600 kernel: [  298.707184]        00000064 f21ebc00 ed6d1fa0 ffffffed ecad0400
f93d6ff1 c01b603d f93dc1c0 
A2600 kernel: [  298.707190]        ed6d1460 edb535a0 00000001 00000802 edb535a0
ecad0400 0bc00000 c01f61b0 
A2600 kernel: [  298.707196] Call Trace:
A2600 kernel: [  298.707200]  [<c01f3209>] tty_ldisc_enable+0x26/0x28
A2600 kernel: [  298.707206]  [<c01f3a1a>] init_dev+0x3a8/0x4b8
A2600 kernel: [  298.707213]  [<f93d6ff1>] serial_open+0xf7/0x148 [usbserial]
A2600 kernel: [  298.707222]  [<c01b603d>] kobject_get+0xf/0x13
A2600 kernel: [  298.707231]  [<c01f61b0>] tty_open+0x16c/0x2ae
A2600 kernel: [  298.707238]  [<c01521dc>] chrdev_open+0x160/0x17c
A2600 kernel: [  298.707245]  [<c015207c>] chrdev_open+0x0/0x17c
A2600 kernel: [  298.707248]  [<c014e46b>] __dentry_open+0xe1/0x197
A2600 kernel: [  298.707257]  [<c014e59b>] nameidata_to_filp+0x24/0x33
A2600 kernel: [  298.707262]  [<c014e5dc>] do_filp_open+0x32/0x39
A2600 kernel: [  298.707273]  [<c014e319>] get_unused_fd+0x4d/0xbe
A2600 kernel: [  298.707279]  [<c014e625>] do_sys_open+0x42/0xc3
A2600 kernel: [  298.707286]  [<c014e6df>] sys_open+0x1c/0x1e
A2600 kernel: [  298.707290]  [<c0103cda>] sysenter_past_esp+0x5f/0x85
A2600 kernel: [  298.707302]  =======================
A2600 kernel: [  298.707303] Code: 45 34 0f 84 21 01 00 00 a1 e4 3f 31 c0 ba d0
00 00 00 e8 00 04 d8 c6 85 c0 89 45 44 8b 55 34 75 07 89 d0 e9 fc 00 00 00 8b 45
3c <89> 50 28 8b 45 44 8b 55 4c 89 42 28 8b 45 3c c7 40 30 00 10 00 
A2600 kernel: [  298.707330] EIP: [<f93cc9cd>] ipaq_open+0x1a5/0x2e0 [ipaq]
SS:ESP 0068:ece81e5c

Steps to reproduce:
 connect device

[  237.486198] usb 2-3: new full speed USB device using ohci_hcd and address 2
[  238.553857] usb 2-3: configuration #1 chosen from 1 choice
[  238.696403] usbcore: registered new interface driver usbserial
[  238.696879] drivers/usb/serial/usb-serial.c: USB Serial support registered
for generic
[  238.697263] usbcore: registered new interface driver usbserial_generic
[  238.697408] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[  238.699289] drivers/usb/serial/usb-serial.c: USB Serial support registered
for PocketPC PDA
[  238.699444] drivers/usb/serial/ipaq.c: USB PocketPC PDA driver v0.5
[  238.699797] ipaq 2-3:1.0: PocketPC PDA converter detected
[  238.704807] usb 2-3: PocketPC PDA converter now attached to ttyUSB0
[  238.705001] ipaq 2-3:1.1: PocketPC PDA converter detected
[  238.707520] usbcore: registered new interface driver ipaq
[  238.736393] usbcore: registered new interface driver cdc_ether
[  238.737833] usbcore: registered new interface driver rndis_host
synce-serial-config /dev/ttyUSB0
ddcm
synce-serial-start
-> oops
Comment 1 Anonymous Emailer 2007-02-27 12:37:42 UTC
Reply-To: akpm@linux-foundation.org



Begin forwarded message:

Date: Mon, 26 Feb 2007 22:50:55 -0800
From: bugme-daemon@bugzilla.kernel.org
To: bugme-new@lists.osdl.org
Subject: [Bugme-new] [Bug 8094] New: ipaq oops on connecting "Vodafone VPA-II"


http://bugzilla.kernel.org/show_bug.cgi?id=8094

           Summary: ipaq oops on connecting  "Vodafone VPA-II"
    Kernel Version: 2.6.21-rc1-git1
            Status: NEW
          Severity: normal
             Owner: greg@kroah.com
         Submitter: web.alexander@web.de


2.6.18 does not known VPA-II, 2.6.19-2.6.21 oops
Distribution: Gentoo
Hardware Environment: AMD Athlon(tm) XP
Software Environment: Synce 0.9.1
Problem Description:


A2600 kernel: [  298.707099] Oops: 0002 [#1]
A2600 kernel: [  298.707101] PREEMPT 
A2600 kernel: [  298.707144] CPU:    0
A2600 kernel: [  298.707145] EIP:    0060:[<f93cc9cd>]    Tainted: PF      VLI
A2600 kernel: [  298.707147] EFLAGS: 00210286   (2.6.21-rc1-git1 #1)
A2600 kernel: [  298.707163] EIP is at ipaq_open+0x1a5/0x2e0 [ipaq]
A2600 kernel: [  298.707166] eax: 00000000   ebx: 00000100   ecx: c18dc120  
edx: f2026000
A2600 kernel: [  298.707170] esi: ee2b8e80   edi: ece833d4   ebp: f21ebc00  
esp: ece81e5c
A2600 kernel: [  298.707173] ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
A2600 kernel: [  298.707176] Process pppd (pid: 11257, ti=ece80000 task=ecfc8050
task.ti=ece80000)
A2600 kernel: [  298.707178] Stack: ecad0400 f22057f8 f0503600 c01f3209 00000000
c01f3a1a ece833c0 ed6d1fa0 
A2600 kernel: [  298.707184]        00000064 f21ebc00 ed6d1fa0 ffffffed ecad0400
f93d6ff1 c01b603d f93dc1c0 
A2600 kernel: [  298.707190]        ed6d1460 edb535a0 00000001 00000802 edb535a0
ecad0400 0bc00000 c01f61b0 
A2600 kernel: [  298.707196] Call Trace:
A2600 kernel: [  298.707200]  [<c01f3209>] tty_ldisc_enable+0x26/0x28
A2600 kernel: [  298.707206]  [<c01f3a1a>] init_dev+0x3a8/0x4b8
A2600 kernel: [  298.707213]  [<f93d6ff1>] serial_open+0xf7/0x148 [usbserial]
A2600 kernel: [  298.707222]  [<c01b603d>] kobject_get+0xf/0x13
A2600 kernel: [  298.707231]  [<c01f61b0>] tty_open+0x16c/0x2ae
A2600 kernel: [  298.707238]  [<c01521dc>] chrdev_open+0x160/0x17c
A2600 kernel: [  298.707245]  [<c015207c>] chrdev_open+0x0/0x17c
A2600 kernel: [  298.707248]  [<c014e46b>] __dentry_open+0xe1/0x197
A2600 kernel: [  298.707257]  [<c014e59b>] nameidata_to_filp+0x24/0x33
A2600 kernel: [  298.707262]  [<c014e5dc>] do_filp_open+0x32/0x39
A2600 kernel: [  298.707273]  [<c014e319>] get_unused_fd+0x4d/0xbe
A2600 kernel: [  298.707279]  [<c014e625>] do_sys_open+0x42/0xc3
A2600 kernel: [  298.707286]  [<c014e6df>] sys_open+0x1c/0x1e
A2600 kernel: [  298.707290]  [<c0103cda>] sysenter_past_esp+0x5f/0x85
A2600 kernel: [  298.707302]  =======================
A2600 kernel: [  298.707303] Code: 45 34 0f 84 21 01 00 00 a1 e4 3f 31 c0 ba d0
00 00 00 e8 00 04 d8 c6 85 c0 89 45 44 8b 55 34 75 07 89 d0 e9 fc 00 00 00 8b 45
3c <89> 50 28 8b 45 44 8b 55 4c 89 42 28 8b 45 3c c7 40 30 00 10 00 
A2600 kernel: [  298.707330] EIP: [<f93cc9cd>] ipaq_open+0x1a5/0x2e0 [ipaq]
SS:ESP 0068:ece81e5c

Steps to reproduce:
 connect device

[  237.486198] usb 2-3: new full speed USB device using ohci_hcd and address 2
[  238.553857] usb 2-3: configuration #1 chosen from 1 choice
[  238.696403] usbcore: registered new interface driver usbserial
[  238.696879] drivers/usb/serial/usb-serial.c: USB Serial support registered
for generic
[  238.697263] usbcore: registered new interface driver usbserial_generic
[  238.697408] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[  238.699289] drivers/usb/serial/usb-serial.c: USB Serial support registered
for PocketPC PDA
[  238.699444] drivers/usb/serial/ipaq.c: USB PocketPC PDA driver v0.5
[  238.699797] ipaq 2-3:1.0: PocketPC PDA converter detected
[  238.704807] usb 2-3: PocketPC PDA converter now attached to ttyUSB0
[  238.705001] ipaq 2-3:1.1: PocketPC PDA converter detected
[  238.707520] usbcore: registered new interface driver ipaq
[  238.736393] usbcore: registered new interface driver cdc_ether
[  238.737833] usbcore: registered new interface driver rndis_host
synce-serial-config /dev/ttyUSB0
ddcm
synce-serial-start
-> oops

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Comment 2 Anonymous Emailer 2007-02-27 13:52:37 UTC
Reply-To: oliver@neukum.org


> http://bugzilla.kernel.org/show_bug.cgi?id=8094
> 
>            Summary: ipaq oops on connecting  "Vodafone VPA-II"
>     Kernel Version: 2.6.21-rc1-git1
>             Status: NEW
>           Severity: normal
>              Owner: greg@kroah.com
>          Submitter: web.alexander@web.de

Most likely a known bug I caused. This should help.

	Regards
		Oliver
----
--- linux-2.6.21-rc1/drivers/usb/serial/usb-serial.c.alt	2007-02-21 05:32:30.000000000 +0100
+++ linux-2.6.21-rc1/drivers/usb/serial/usb-serial.c	2007-02-26 15:32:50.000000000 +0100
@@ -826,7 +826,6 @@
 			num_ports = type->num_ports;
 	}
 
-	serial->minor = minor;
 	serial->num_ports = num_ports;
 	serial->num_bulk_in = num_bulk_in;
 	serial->num_bulk_out = num_bulk_out;
@@ -980,6 +979,7 @@
 		dev_err(&interface->dev, "No more free serial devices\n");
 		goto probe_error;
 	}
+	serial->minor = minor;
 
 	/* register all of the individual ports with the driver core */
 	for (i = 0; i < num_ports; ++i) {

Comment 3 Alexander Weber 2007-02-28 11:44:16 UTC
Created attachment 10557 [details]
Kernel-Messages

the patch did not fixed for me.
after the patch is only new line in the Log:
  usb-serial ttyUSB0: Error registering port device, continuing
Comment 4 Andrew Morton 2007-02-28 22:45:57 UTC
But did Oliver's patch prevent the oops?
Comment 5 Alexander Weber 2007-03-01 00:38:23 UTC
Olivers patch didnt prevent the oops.
the new oops is in attachment 10557 [details]
Comment 6 Natalie Protasevich 2007-06-13 23:21:40 UTC
Can you please test with newest kernel, 2.6.22-rc4?
Thanks.
Comment 7 Alexander Weber 2007-06-14 10:05:03 UTC
tested with 2.6.22-rc4

new oops, this time immediately after connect the device:


Jun 14 18:56:36 A2600 kernel: [  332.345227] usb 2-3: new full speed USB device using ohci_hcd and address 3
Jun 14 18:56:36 A2600 kernel: [  332.547168] usb 2-3: configuration #1 chosen from 1 choice
Jun 14 18:56:36 A2600 kernel: [  332.675517] usbcore: registered new interface driver usbserial
Jun 14 18:56:36 A2600 kernel: [  332.675950] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Jun 14 18:56:36 A2600 kernel: [  332.676343] usbcore: registered new interface driver usbserial_generic
Jun 14 18:56:36 A2600 kernel: [  332.676461] drivers/usb/serial/usb-serial.c: USB Serial Driver core
Jun 14 18:56:36 A2600 kernel: [  332.678625] drivers/usb/serial/usb-serial.c: USB Serial support registered for PocketPC PDA
Jun 14 18:56:36 A2600 kernel: [  332.678814] drivers/usb/serial/ipaq.c: USB PocketPC PDA driver v0.5
Jun 14 18:56:36 A2600 kernel: [  332.679196] ipaq 2-3:1.0: PocketPC PDA converter detected
Jun 14 18:56:36 A2600 kernel: [  332.684137] usb 2-3: PocketPC PDA converter now attached to ttyUSB0
Jun 14 18:56:36 A2600 kernel: [  332.684326] ipaq 2-3:1.1: PocketPC PDA converter detected
Jun 14 18:56:36 A2600 kernel: [  332.691995] usb 2-3: PocketPC PDA converter now attached to ttyUSB1
Jun 14 18:56:36 A2600 kernel: [  332.692160] usbcore: registered new interface driver ipaq
Jun 14 18:56:36 A2600 kernel: [  332.718157] usbcore: registered new interface driver cdc_ether
Jun 14 18:56:36 A2600 kernel: [  332.719051] usbcore: registered new interface driver rndis_host

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948658] Oops: 0002 [#1]

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948660] PREEMPT 

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948694] CPU:    0

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948695] EIP:    0060:[<f932b9cd>]    Tainted: P       VLI

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948696] EFLAGS: 00010286   (2.6.22-rc4 #1)

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948714] EIP is at ipaq_open+0x1a5/0x2e0 [ipaq]

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948717] eax: 00000000   ebx: 00000100   ecx: c18dc120   edx: f1aea000

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948721] esi: e4cb1a00   edi: ea85fdd4   ebp: f3d7c400   esp: e4ae5e5c

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948724] ds: 007b   es: 007b   fs: 0000  gs: 0033  ss: 0068

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948727] Process hald-probe-seri (pid: 11486, ti=e4ae4000 task=e9844030 task.ti=e4ae4000)

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948730] Stack: e8c8ac00 f17fb7f8 e92ede00 c01f993d 00000000 c01fa205 ea85fdc0 e9886e60 

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948736]        00000064 f3d7c400 e9886e60 ffffffed e8c8ac00 f9335fe2 c01bbab8 f933b200 

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948742]        e9886460 e54b66e0 00000001 00008800 e54b66e0 e8c8ac00 0bc00000 c01fca0b 

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948749] Call Trace:

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948752]  [<c01f993d>] tty_ldisc_enable+0x26/0x28

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948759]  [<c01fa205>] init_dev+0x3b4/0x4c4

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948765]  [<f9335fe2>] serial_open+0xf7/0x148 [usbserial]

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948775]  [<c01bbab8>] kobject_get+0xf/0x13

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948783]  [<c01fca0b>] tty_open+0x16c/0x29f

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948789]  [<c0153231>] chrdev_open+0x160/0x17b

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948797]  [<c01530d1>] chrdev_open+0x0/0x17b

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948800]  [<c014f45a>] __dentry_open+0xe1/0x197

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948805]  [<c014f58a>] nameidata_to_filp+0x24/0x33

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948810]  [<c014f5cb>] do_filp_open+0x32/0x39

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948819]  [<c014f308>] get_unused_fd+0x4b/0xbc

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948824]  [<c014f614>] do_sys_open+0x42/0xc3

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948829]  [<c014f6ce>] sys_open+0x1c/0x1e

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948833]  [<c0103bfa>] sysenter_past_esp+0x5f/0x85

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948842]  =======================

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948844] Code: 45 34 0f 84 21 01 00 00 a1 24 5d 32 c0 ba d0 00 00 00 e8 db 22 e2 c6 85 c0 89 45 44 8b 55 34 75 07 89 d0 e9 fc 00 00 00 8b 45 3c <89> 50 28 8b 45 44 8b 55 4c 89 42 28 8b 45 3c c7 40 30 00 10 00 

Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
A2600 kernel: [  342.948867] EIP: [<f932b9cd>] ipaq_open+0x1a5/0x2e0 [ipaq] SS:ESP 0068:e4ae5e5c
Jun 14 18:56:47 A2600 kernel: [  342.948653] f932b9cd
Jun 14 18:56:47 A2600 kernel: [  342.948662] Modules linked in: rndis_host cdc_ether usbnet mii ipaq usbserial udf snd_pcm_oss snd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq wlan_ccmp rtc floppy dm_crypt dm_mod realtime cpufreq_powersave asb100 atxp1 hwmon_vid hwmon nvidia(P) snd_cmipci snd_pcm snd_page_alloc snd_opl3_lib snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore wlan_scan_sta ath_rate_sample ns558 gameport ath_pci wlan ath_hal(P) ide_cd cdrom ohci1394 ieee1394 nvidia_agp agpgart i2c_nforce2 forcedeth
Comment 8 Natalie Protasevich 2007-06-14 10:16:40 UTC
Subject: Re:  ipaq oops on connecting "Vodafone VPA-II"

On 6/14/07, bugme-daemon@bugzilla.kernel.org
<bugme-daemon@bugzilla.kernel.org> wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=8094
>
>
>
>
>
> ------- Comment #7 from web.alexander@web.de  2007-06-14 10:05 -------
> tested with 2.6.22-rc4
>
> new oops, this time immediately after connect the device:
>
>
> Jun 14 18:56:36 A2600 kernel: [  332.345227] usb 2-3: new full speed USB
> device
> using ohci_hcd and address 3
> Jun 14 18:56:36 A2600 kernel: [  332.547168] usb 2-3: configuration #1 chosen
> from 1 choice
> Jun 14 18:56:36 A2600 kernel: [  332.675517] usbcore: registered new
> interface
> driver usbserial
> Jun 14 18:56:36 A2600 kernel: [  332.675950] drivers/usb/serial/usb-serial.c:
> USB Serial support registered for generic
> Jun 14 18:56:36 A2600 kernel: [  332.676343] usbcore: registered new
> interface
> driver usbserial_generic
> Jun 14 18:56:36 A2600 kernel: [  332.676461] drivers/usb/serial/usb-serial.c:
> USB Serial Driver core
> Jun 14 18:56:36 A2600 kernel: [  332.678625] drivers/usb/serial/usb-serial.c:
> USB Serial support registered for PocketPC PDA
> Jun 14 18:56:36 A2600 kernel: [  332.678814] drivers/usb/serial/ipaq.c: USB
> PocketPC PDA driver v0.5
> Jun 14 18:56:36 A2600 kernel: [  332.679196] ipaq 2-3:1.0: PocketPC PDA
> converter detected
> Jun 14 18:56:36 A2600 kernel: [  332.684137] usb 2-3: PocketPC PDA converter
> now attached to ttyUSB0
> Jun 14 18:56:36 A2600 kernel: [  332.684326] ipaq 2-3:1.1: PocketPC PDA
> converter detected
> Jun 14 18:56:36 A2600 kernel: [  332.691995] usb 2-3: PocketPC PDA converter
> now attached to ttyUSB1
> Jun 14 18:56:36 A2600 kernel: [  332.692160] usbcore: registered new
> interface
> driver ipaq
> Jun 14 18:56:36 A2600 kernel: [  332.718157] usbcore: registered new
> interface
> driver cdc_ether
> Jun 14 18:56:36 A2600 kernel: [  332.719051] usbcore: registered new
> interface
> driver rndis_host
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948658] Oops: 0002 [#1]
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948660] PREEMPT
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948694] CPU:    0
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948695] EIP:    0060:[<f932b9cd>]    Tainted: P      
> VLI
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948696] EFLAGS: 00010286   (2.6.22-rc4 #1)
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948714] EIP is at ipaq_open+0x1a5/0x2e0 [ipaq]
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948717] eax: 00000000   ebx: 00000100   ecx: c18dc120
> edx: f1aea000
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948721] esi: e4cb1a00   edi: ea85fdd4   ebp: f3d7c400
> esp: e4ae5e5c
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948724] ds: 007b   es: 007b   fs: 0000  gs: 0033  ss:
> 0068
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948727] Process hald-probe-seri (pid: 11486, ti=e4ae4000
> task=e9844030 task.ti=e4ae4000)
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948730] Stack: e8c8ac00 f17fb7f8 e92ede00 c01f993d
> 00000000 c01fa205 ea85fdc0 e9886e60
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948736]        00000064 f3d7c400 e9886e60 ffffffed
> e8c8ac00 f9335fe2 c01bbab8 f933b200
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948742]        e9886460 e54b66e0 00000001 00008800
> e54b66e0 e8c8ac00 0bc00000 c01fca0b
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948749] Call Trace:
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948752]  [<c01f993d>] tty_ldisc_enable+0x26/0x28
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948759]  [<c01fa205>] init_dev+0x3b4/0x4c4
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948765]  [<f9335fe2>] serial_open+0xf7/0x148 [usbserial]
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948775]  [<c01bbab8>] kobject_get+0xf/0x13
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948783]  [<c01fca0b>] tty_open+0x16c/0x29f
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948789]  [<c0153231>] chrdev_open+0x160/0x17b
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948797]  [<c01530d1>] chrdev_open+0x0/0x17b
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948800]  [<c014f45a>] __dentry_open+0xe1/0x197
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948805]  [<c014f58a>] nameidata_to_filp+0x24/0x33
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948810]  [<c014f5cb>] do_filp_open+0x32/0x39
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948819]  [<c014f308>] get_unused_fd+0x4b/0xbc
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948824]  [<c014f614>] do_sys_open+0x42/0xc3
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948829]  [<c014f6ce>] sys_open+0x1c/0x1e
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948833]  [<c0103bfa>] sysenter_past_esp+0x5f/0x85
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948842]  =======================
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948844] Code: 45 34 0f 84 21 01 00 00 a1 24 5d 32 c0 ba
> d0
> 00 00 00 e8 db 22 e2 c6 85 c0 89 45 44 8b 55 34 75 07 89 d0 e9 fc 00 00 00 8b
> 45 3c <89> 50 28 8b 45 44 8b 55 4c 89 42 28 8b 45 3c c7 40 30 00 10 00
>
> Message from syslogd@A2600 at Thu Jun 14 18:56:47 2007 ...
> A2600 kernel: [  342.948867] EIP: [<f932b9cd>] ipaq_open+0x1a5/0x2e0 [ipaq]
> SS:ESP 0068:e4ae5e5c
> Jun 14 18:56:47 A2600 kernel: [  342.948653] f932b9cd
> Jun 14 18:56:47 A2600 kernel: [  342.948662] Modules linked in: rndis_host
> cdc_ether usbnet mii ipaq usbserial udf snd_pcm_oss snd_mixer_oss snd_seq_oss
> snd_seq_midi_event snd_seq wlan_ccmp rtc floppy dm_crypt dm_mod realtime
> cpufreq_powersave asb100 atxp1 hwmon_vid hwmon nvidia(P) snd_cmipci snd_pcm
> snd_page_alloc snd_opl3_lib snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi
> snd_seq_device snd soundcore wlan_scan_sta ath_rate_sample ns558 gameport
> ath_pci wlan ath_hal(P) ide_cd cdrom ohci1394 ieee1394 nvidia_agp agpgart
> i2c_nforce2 forcedeth
>
>
> --
> Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
Thank you very much foe quick response. I will contact the developer for now.
--Natalie
Comment 9 Greg Kroah-Hartman 2007-09-05 06:41:44 UTC
This is now fixed, right?
Comment 10 Alexander Weber 2007-09-06 13:52:23 UTC
It's not fixed for me.

Tested with kernel 2.6.23-rc5:

Sep  6 22:10:23 A2600 kernel: [  460.477015] usbcore: registered new interface driver ipaq
Sep  6 22:12:12 A2600 kernel: [  569.018087] usb 3-3: new full speed USB device using ohci_hcd and address 7
Sep  6 22:12:12 A2600 kernel: [  569.233664] usb 3-3: configuration #1 chosen from 1 choice
Sep  6 22:12:12 A2600 kernel: [  569.235970] ipaq 3-3:1.0: PocketPC PDA converter detected
Sep  6 22:12:12 A2600 kernel: [  569.239927] usb 3-3: PocketPC PDA converter now attached to ttyUSB0
Sep  6 22:12:12 A2600 kernel: [  569.240563] ipaq 3-3:1.1: PocketPC PDA converter detected
Sep  6 22:12:12 A2600 kernel: [  569.245191] usb 3-3: PocketPC PDA converter now attached to ttyUSB1
Sep  6 22:12:12 A2600 kernel: [  569.432596] usbcore: registered new interface driver cdc_ether
Sep  6 22:12:12 A2600 kernel: [  569.436041] usbcore: registered new interface driver rndis_host
Sep  6 22:12:32 A2600 kernel: [  588.877467] PPP generic driver version 2.4.2
Sep  6 22:12:32 A2600 kernel: [  588.986092] ip_tables: (C) 2000-2006 Netfilter Core Team
Sep  6 22:12:32 A2600 synce-serial-start: Executing '/usr/sbin/pppd call synce-device'
Sep  6 22:12:32 A2600 pppd[10169]: pppd 2.4.4 started by root, uid 0
Sep  6 22:12:33 A2600 kernel: [  589.363391] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000034
Sep  6 22:12:33 A2600 kernel: [  589.394491]  printing eip:
Sep  6 22:12:33 A2600 kernel: [  589.424169] f8f2b9cb
Sep  6 22:12:33 A2600 kernel: [  589.424171] *pde = 00000000
Sep  6 22:12:33 A2600 kernel: [  589.452569] Oops: 0002 [#1]
Sep  6 22:12:33 A2600 kernel: [  589.479676] PREEMPT 
Sep  6 22:12:33 A2600 kernel: [  589.505426] Modules linked in: iptable_filter ip_tables x_tables ppp_async ppp_generic slhc crc_ccitt rndis_host cdc_ether usbnet mii ipaq usbseria
l snd_pcm_oss snd_mixer_oss snd_seq_oss parport_pc parport snd_seq_midi_event snd_seq button floppy dm_crypt dm_mod ide_cd cdrom cpufreq_powersave asb100 atxp1 hwmon_vid hwmon snd_
cmipci snd_pcm snd_page_alloc snd_opl3_lib snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore thermal processor pcspkr firewire_ohci firewire_core crc_itu
_t analog gameport rtc ohci1394 ieee1394 nvidia_agp agpgart forcedeth i2c_nforce2
Sep  6 22:12:33 A2600 kernel: [  589.646840] CPU:    0
Sep  6 22:12:33 A2600 kernel: [  589.646841] EIP:    0060:[<f8f2b9cb>]    Not tainted VLI
Sep  6 22:12:33 A2600 kernel: [  589.646842] EFLAGS: 00010286   (2.6.23-rc5 #1)
Sep  6 22:12:33 A2600 kernel: [  589.733992] EIP is at ipaq_open+0x1a5/0x2de [ipaq]
Sep  6 22:12:33 A2600 kernel: [  589.763224] eax: 00000000   ebx: 00000100   ecx: c18df6c0   edx: f0061000
Sep  6 22:12:33 A2600 kernel: [  589.793111] esi: f3939700   edi: f0ddaf14   ebp: f7dfd600   esp: f407fe5c
Sep  6 22:12:33 A2600 kernel: [  589.823025] ds: 007b   es: 007b   fs: 0000  gs: 0033  ss: 0068
Sep  6 22:12:33 A2600 kernel: [  589.852904] Process pppd (pid: 10169, ti=f407e000 task=c1bd0ab0 task.ti=f407e000)
Sep  6 22:12:33 A2600 kernel: [  589.853969] Stack: 00000000 00000000 00000000 f7936400 f7fa4000 00000000 f0ddaf00 f0458ea0 
Sep  6 22:12:33 A2600 kernel: [  589.884884]        00000064 f7dfd600 f0458ea0 ffffffed f7936400 f906501a f04dc3fc f906a300 
Sep  6 22:12:33 A2600 kernel: [  589.915972]        c01573fb f7ddc6a0 00000001 00000802 f7ddc6a0 f7936400 0bc00000 c0202c2a 
Sep  6 22:12:33 A2600 kernel: [  589.946754] Call Trace:
Sep  6 22:12:33 A2600 kernel: [  590.004722]  [<f906501a>] serial_open+0xf7/0x148 [usbserial]
Sep  6 22:12:33 A2600 kernel: [  590.033891]  [<c01573fb>] cdev_get+0x4b/0x5f
Sep  6 22:12:33 A2600 kernel: [  590.062476]  [<c0202c2a>] tty_open+0x16c/0x29f
Sep  6 22:12:33 A2600 kernel: [  590.090434]  [<c0157979>] chrdev_open+0x160/0x17b
Sep  6 22:12:33 A2600 kernel: [  590.118303]  [<c0157819>] chrdev_open+0x0/0x17b
Sep  6 22:12:33 A2600 kernel: [  590.146344]  [<c0153a86>] __dentry_open+0xde/0x18a
Sep  6 22:12:33 A2600 kernel: [  590.174811]  [<c0153bac>] nameidata_to_filp+0x24/0x33
Sep  6 22:12:33 A2600 kernel: [  590.203734]  [<c0153bed>] do_filp_open+0x32/0x39
Sep  6 22:12:33 A2600 kernel: [  590.232995]  [<c0153920>] get_unused_fd_flags+0x4f/0xd0
Sep  6 22:12:33 A2600 kernel: [  590.262796]  [<c0153c38>] do_sys_open+0x44/0xc5
Sep  6 22:12:33 A2600 kernel: [  590.292934]  [<c0153cf2>] sys_open+0x1c/0x1e
Sep  6 22:12:33 A2600 kernel: [  590.323365]  [<c0103d02>] sysenter_past_esp+0x5f/0x85
Sep  6 22:12:33 A2600 kernel: [  590.354310]  =======================
Sep  6 22:12:33 A2600 kernel: [  590.384565] Code: 45 34 0f 84 21 01 00 00 a1 84 3d 33 c0 ba d0 00 00 00 e8 42 6a 22 c7 85 c0 89 45 44 8b 55 34 75 07 89 d0 e9 fc 00 00 00 8b 45 3c 
<89> 50 34 8b 45 44 8b 55 4c 89 42 34 8b 45 3c c7 40 3c 00 10 00 
Sep  6 22:12:33 A2600 kernel: [  590.449604] EIP: [<f8f2b9cb>] ipaq_open+0x1a5/0x2de [ipaq] SS:ESP 0068:f407fe5c
Comment 11 Alan Stern 2007-09-17 07:36:23 UTC
On Sun, 16 Sep 2007 bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=8094

Oliver, it looks like the problem is that in ipaq_open, port->read_urb 
is NULL.  Maybe port->write_urb is also.  I have no idea why that 
should be, do you?

Alan Stern
Comment 12 Anonymous Emailer 2007-09-17 11:04:40 UTC
Reply-To: oliver@neukum.org

Am Montag 17 September 2007 schrieb Alan Stern:
> On Sun, 16 Sep 2007 bugme-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=8094
> 
> Oliver, it looks like the problem is that in ipaq_open, port->read_urb 
> is NULL.  Maybe port->write_urb is also.  I have no idea why that 
> should be, do you?

No, it is not the bug I assumed at that time.
An obvious reason for that to be NULL is here (usb-serial.c):

	dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints);
	for (i = 0; i < max_endpoints; ++i) {
		port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
		if (!port)
			goto probe_error;
		port->serial = serial;
		spin_lock_init(&port->lock);
		mutex_init(&port->mutex);
		INIT_WORK(&port->work, usb_serial_port_work);
		serial->port[i] = port;
	}

	/* set up the endpoint information */
	for (i = 0; i < num_bulk_in; ++i) {
		endpoint = bulk_in_endpoint[i];
		port = serial->port[i];
		port->read_urb = usb_alloc_urb (0, GFP_KERNEL);

How many endpoints does this device have?

	Regards
		Oliver
Comment 13 Alan Stern 2007-09-17 11:20:41 UTC
Alexander, can you please attach the output from "lsusb -v" for this device?
Comment 14 Alexander Weber 2007-09-17 11:42:29 UTC
The device is a HTC Wizard, currently without Vodafone branding.

there is lsusb -v for this device

Bus 002 Device 008: ID 0bb4:0bce High Tech Computer Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         1 ?
  bDeviceProtocol         1 Microsoft ActiveSync
  bMaxPacketSize0        64
  idVendor           0x0bb4 High Tech Computer Corp.
  idProduct          0x0bce 
  bcdDevice            0.00
  iManufacturer           1 HTC
  iProduct                2 Generic RNDIS
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           62
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       239 Miscellaneous Device
      bInterfaceSubClass      1 ?
      bInterfaceProtocol      1 Microsoft ActiveSync
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Comment 15 Oliver Neukum 2007-09-17 23:58:54 UTC
This looks like an RNDIS device. Is there a good reason the ipaq driver should bind to it?
Comment 16 Alan Stern 2007-09-21 13:16:03 UTC
Created attachment 12901 [details]
Check the number of interfaces

I don't have a USB serial device, so I can't test this patch.  Does it fix your problem?
Comment 17 Anonymous Emailer 2007-09-22 02:02:26 UTC
Reply-To: oliver@neukum.org

Am Freitag 21 September 2007 schrieb bugme-daemon@bugzilla.kernel.org:
> http://bugzilla.kernel.org/show_bug.cgi?id=8094
> 
> 
> 
> 
> 
> ------- Comment #16 from stern@rowland.harvard.edu  2007-09-21 13:16 -------
> Created an attachment (id=12901)
>  --> (http://bugzilla.kernel.org/attachment.cgi?id=12901&action=view)
> Check the number of interfaces
> 
> I don't have a USB serial device, so I can't test this patch.  Does it fix
> your
> problem?

Alan, this is a quick hack. If a driver specifies 1 endpoint, you should
guarantee 1 endpoint, not at least 1.

	Regards
		Oliver
Comment 18 Alan Stern 2007-09-22 07:19:31 UTC
It's not as bad as you say.

For one thing, the old kerneldoc did not explain the meaning of those fields clearly.  "The number of endpoints this device will have" doesn't really mean anything, especially since it is part of a _driver_ structure, not a _device_ structure -- it would make sense to talk about "this driver" but it doesn't make sense to talk about "this device".  (My version of those comments could stand to be improved also.)  It certainly doesn't say that the serial core will reject devices not having exactly that many endpoints.

It would be easy to change the patch so that devices have to have exactly the specified number of endpoints.  But what's wrong with making the value a minimum?  At least it guarantees that all the endpoints the driver wants will indeed exist.
Comment 19 Alexander Weber 2007-09-22 07:26:07 UTC
With alans patch the ipaq module does not oops.

But i cannot connect the device with synce-serial (0.10.0)

synce-serial-start as root and
synce-trayicon as user 

does not connect.


Sep 22 15:52:05 A2600 kernel: [  101.101996] usb 3-3: new full speed USB device using ohci_hcd and address 3
Sep 22 15:52:05 A2600 kernel: [  101.299832] usb 3-3: configuration #1 chosen from 1 choice
Sep 22 15:52:05 A2600 kernel: [  101.522206] usbcore: registered new interface driver usbserial
Sep 22 15:52:05 A2600 kernel: [  101.522994] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Sep 22 15:52:05 A2600 kernel: [  101.523762] usbcore: registered new interface driver usbserial_generic
Sep 22 15:52:05 A2600 kernel: [  101.523903] drivers/usb/serial/usb-serial.c: USB Serial Driver core
Sep 22 15:52:05 A2600 kernel: [  101.526518] drivers/usb/serial/usb-serial.c: USB Serial support registered for PocketPC PDA
Sep 22 15:52:05 A2600 kernel: [  101.526691] drivers/usb/serial/ipaq.c: USB PocketPC PDA driver v0.5
Sep 22 15:52:05 A2600 kernel: [  101.527399] ipaq: probe of 3-3:1.0 failed with error -5
Sep 22 15:52:05 A2600 kernel: [  101.527562] ipaq 3-3:1.1: PocketPC PDA converter detected
Sep 22 15:52:05 A2600 kernel: [  101.529406] usb 3-3: PocketPC PDA converter now attached to ttyUSB0
Sep 22 15:52:05 A2600 kernel: [  101.529537] usbcore: registered new interface driver ipaq
Sep 22 15:52:05 A2600 kernel: [  101.614322] usbcore: registered new interface driver cdc_ether
Sep 22 15:52:29 A2600 kernel: [  124.791398] PPP generic driver version 2.4.2
Sep 22 15:52:29 A2600 kernel: [  124.893149] ip_tables: (C) 2000-2006 Netfilter Core Team
Sep 22 15:52:29 A2600 synce-serial-start: Executing '/usr/sbin/pppd call synce-device'
Comment 20 Anonymous Emailer 2007-09-24 03:06:31 UTC
Reply-To: oliver@neukum.org

Am Samstag 22 September 2007 schrieb bugme-daemon@bugzilla.kernel.org:
> For one thing, the old kerneldoc did not explain the meaning of those fields
> clearly.  "The number of endpoints this device will have" doesn't really mean
> anything, especially since it is part of a _driver_ structure, not a _device_

I'd say it is pretty specific. If a driver is asked to drive a device it will
have as many endpoints as thus specified. Rejecting non conforming
devices is implicit.

> structure -- it would make sense to talk about "this driver" but it doesn't
> make sense to talk about "this device".  (My version of those comments could
> stand to be improved also.)  It certainly doesn't say that the serial core
> will
> reject devices not having exactly that many endpoints.
> 
> It would be easy to change the patch so that devices have to have exactly the
> specified number of endpoints.  But what's wrong with making the value a
> minimum?  At least it guarantees that all the endpoints the driver wants will
> indeed exist.

1. You don't make sure the device will talk to the intended endpoint.
The consequences are undefined.

2. The device will end up with more struct usb_serial_port than it knows
itself to have and has requested. Again consequences are undefined.

3. On the additional port structures then allocated the device won't
have endpoints of the other types to talk to.

	Regards
		Oliver
Comment 21 Alan Stern 2007-09-24 07:57:25 UTC
Created attachment 12918 [details]
Check the exact number of endpoints

All right, here's a version that checks for the exact number of endpoints.  It should make Oliver happier.

But it won't help the synce-serial problem.  Oliver will have to debug that; I don't know what's involved.
Comment 22 Alexander Weber 2007-09-24 11:00:11 UTC
I tested last patch too. dmesg says the same as Comment #19.
I tested now the gnome hal integration. (auto start of multisync an connecting device). Thats works. The appliation is started.
But i dont have a ppp0 device on connect and after synce-serial-start.
synce-list-programs say
** (process:9330): WARNING **: No devices connected to odccm
Comment 23 Oliver Neukum 2007-09-24 11:26:51 UTC
The ipaq driver is incorrect for this device. Unload it.
Then try rndis_host.
Comment 24 Alexander Weber 2007-09-24 22:53:57 UTC
with rndis_host i have a new network iface eth4 !

i have synce svn-Version version from gentoo-overlay installed.

on start odccm eth4 is up and configured as 169.254.2.2/24
I receive this message
** (odccm:6971): DEBUG: PDA network interface discovered! 
udi='/org/freedesktop/Hal/devices/net_80_00_60_0f_e8_00'

On Mobile device is a usb rndis interface up too and configured as 169.254.2.1/???

But i cannot ping from PS to HTC and i cannot ping from HTC to PC.

pls says 
** (process:7101): WARNING **: No devices connected to odccm
pls: Could not find configuration at path '(Default)'
Comment 25 Anonymous Emailer 2007-09-24 23:22:38 UTC
Reply-To: oliver@neukum.org

Am Dienstag 25 September 2007 schrieben Sie:
> http://bugzilla.kernel.org/show_bug.cgi?id=8094
> 
> 
> 
> 
> 
> ------- Comment #24 from web.alexander@web.de  2007-09-24 22:53 -------
> with rndis_host i have a new network iface eth4 !

Load usbnet with debugging enabled. You need to use the "msg_level"
module parameter
Comment 26 Alexander Weber 2007-09-26 12:23:28 UTC
whitch ist the right value for msg_level? I tested it with -1, 1, 9, 99 and 256 but that gives not realy more messages.

Modules from synce usb-rndis-lite svn i cannot load:
[  285.569040] usbnet: Unknown symbol mii_ethtool_sset
[  285.569106] usbnet: Unknown symbol mii_link_ok
[  285.569415] usbnet: Unknown symbol mii_nway_restart
[  285.569531] usbnet: Unknown symbol mii_ethtool_gset
[  298.873161] usbnet: `debug' invalid for parameter `msg_level'
[  388.629807] usbcore: registered new interface driver cdc_ether
[  388.640639] usbcore: registered new interface driver rndis_host

there are messages from in-kernel modules 

Sep 26 21:01:39 A2600 kernel: [  164.964540] usb 3-3: new full speed USB device using ohci_hcd and address 3
Sep 26 21:01:40 A2600 kernel: [  165.169052] usb 3-3: configuration #1 chosen from 1 choice
Sep 26 21:01:40 A2600 kernel: [  165.349020] usbcore: registered new interface driver cdc_ether
Sep 26 21:01:40 A2600 kernel: [  165.448151] eth0: register 'rndis_host' at usb-0000:00:02.1-3, RNDIS device, 80:00:60:0f:e8:00
Sep 26 21:01:40 A2600 kernel: [  165.448321] usbcore: registered new interface driver rndis_host
Sep 26 21:01:40 A2600 kernel: [  165.454964] udev: renamed network interface eth0 to eth4
Sep 26 21:01:40 A2600 udev-net.sh: /etc/init.d/net.eth4: does not exist or is not executable
Sep 26 21:02:03 A2600 kernel: [  188.221968] usb 3-3: USB disconnect, address 3
Sep 26 21:02:03 A2600 kernel: [  188.222223] eth4: unregister 'rndis_host' usb-0000:00:02.1-3, RNDIS device
Sep 26 21:02:03 A2600 udev-net.sh: /etc/init.d/net.eth4: does not exist or is not executable
Sep 26 21:02:07 A2600 kernel: [  192.649103] usb 3-3: new full speed USB device using ohci_hcd and address 4
Sep 26 21:02:07 A2600 kernel: [  192.848625] usb 3-3: configuration #1 chosen from 1 choice
Sep 26 21:02:07 A2600 kernel: [  192.947977] eth0: register 'rndis_host' at usb-0000:00:02.1-3, RNDIS device, 80:00:60:0f:e8:00
Sep 26 21:02:07 A2600 kernel: [  193.019637] udev: renamed network interface eth0 to eth4
Sep 26 21:02:08 A2600 kernel: [  193.030835] eth4: open: enable queueing (rx 4, tx 4) mtu 1500 RNDIS framing
Sep 26 21:02:08 A2600 udev-net.sh: /etc/init.d/net.eth4: does not exist or is not executable
Sep 26 21:04:35 A2600 kernel: [  340.978499] usb 3-3: USB disconnect, address 4
Sep 26 21:04:35 A2600 kernel: [  340.981002] eth4: unregister 'rndis_host' usb-0000:00:02.1-3, RNDIS device
Sep 26 21:04:35 A2600 kernel: [  340.983869] eth4: stop stats: rx/tx 0/148, errs 280365/0
Sep 26 21:04:35 A2600 udev-net.sh: /etc/init.d/net.eth4: does not exist or is not executable

with wireshark on PC i see only ARP Messages from PC to HTC
Comment 27 Anonymous Emailer 2007-09-26 12:42:07 UTC
Reply-To: oliver@neukum.org

Am Mittwoch 26 September 2007 schrieben Sie:
> http://bugzilla.kernel.org/show_bug.cgi?id=8094

The device keeps disconnecting. Please attach .config of your kernel.
Comment 28 Alexander Weber 2007-09-26 13:17:45 UTC
Created attachment 12953 [details]
my linux-2.6.23-rc5 config
Comment 29 Oliver Neukum 2007-09-27 01:06:09 UTC
Use the correct MIME type.
.config is text/plain
Comment 30 Oliver Neukum 2007-09-27 01:08:30 UTC
Recompile your kernel without CONFIG_USB_SUSPEND and try again.
Comment 31 Alexander Weber 2007-09-27 10:20:08 UTC
without CONFIG_USB_SUSPEND the message

eth4: open: enable queueing (rx 4,
tx 4) mtu 1500 RNDIS framing

is not in dmesg.

The connection does not work.
usbnet msg_level=1 give not extra debug information.
Comment 32 Alexander Weber 2008-01-01 16:34:41 UTC
Today i tested now.

this patch helped me :-)
http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch

it works now !

for me is the bug closed.
thanks.
Comment 33 Jean-Christophe Dubois 2008-02-03 01:47:13 UTC
I guess the pointed synce patch should be pushed to the kernel main tree as it seems to be required to get "connected" with a wm5 device.

It is not yet part of the official kernel tree.
Comment 34 Anonymous Emailer 2008-02-04 00:16:00 UTC
Reply-To: oliver@neukum.org


> ------- Comment #33 from jcd@tribudubois.net  2008-02-03 01:47 -------
> I guess the pointed synce patch should be pushed to the kernel main tree as
> it
> seems to be required to get "connected" with a wm5 device.
> 
> It is not yet part of the official kernel tree.

It'll break other devices. It cannot become part of the standard kernel
in this form.
Comment 35 Jean-Christophe Dubois 2008-02-05 02:53:51 UTC
(In reply to comment #34)
> Reply-To: oliver@neukum.org
> 
> It'll break other devices. It cannot become part of the standard kernel
> in this form.
> 

Sorry for my ignorance but what devices beside wm5/wm6 devices are using RNDIS?

The synce project seems to support only the wm5 variant (see http://synce.svn.sourceforge.net/viewvc/synce/trunk/usb-rndis-lite/rndis_host.c). Are they overlooking something?
Comment 36 Anonymous Emailer 2008-02-05 03:44:11 UTC
Reply-To: oliver@neukum.org

Am Dienstag, 5. Februar 2008 11:53:52 schrieben Sie:

> > It'll break other devices. It cannot become part of the standard kernel
> > in this form.
> > 
> 
> Sorry for my ignorance but what devices beside wm5/wm6 devices are using
> RNDIS?
> 
> The synce project seems to support only the wm5 variant (see
>
> http://synce.svn.sourceforge.net/viewvc/synce/trunk/usb-rndis-lite/rndis_host.c).
> Are they overlooking something?

Yes, on smaller machines you cannot allocate more than 16K in one chunk.
The VM will not cope with that load easily.
Comment 37 Jean-Christophe Dubois 2008-02-06 05:20:13 UTC
Created attachment 14722 [details]
usbnet patch to compute dev->maxpacket before calling bind()

Is the actual driver known to work for any RNDIS device?

I tried to understand why the driver would not work with my device without the wm5 patch. Here is what I think is the problem.

When the rndis_host bind() function is called (by usbnet_probe()) the dev->maxpacket is not yet set (It will be set later in usbnet_probe()). As it is 0 the computed dev->rx_urb_size is also 0 and therefore the "max_transfer_size" sent to the device in the RNDIS_MSG_INIT message is also 0. I am not sure how the device will react to this but obviously this is a bogus value.

So it seems dev->maxpacket needs to be set before calling the bind() function (it makes some sense as rndis_bind() is using it). This means we need to move up the call to usb_maxpacket() in the  usbnet_probe()function. But the call to usb_maxpacket() is requiring dev->out to be set which in turn requires this computation to be moved above the call to usb_maxpacket() (by the way I am not sure dev->out is set correctly with the actual version of the driver in case of a bind() device)

I am attaching a proposal for a patch to fix this problem (assuming I didn't overlook anything). With this patch the dev->rx_urb_size and the "max_transfer_size" are computed to 1600 with my device (qtek 9100) which seems reasonable enough. More importantly this works for me and I am able to communicate with the smartphone (without changing rndis_host.c with the wm5 patch).

Any comment is welcome.
Comment 38 David Brownell 2008-02-09 02:02:22 UTC
Re Comment #37 ... a much better fix would be a one-liner to have the rndis_host code make sure that dev->maxpacket is set before it uses that value.  That would obviously not affect any other usbnet minidrivers.

BTW, I don't see the relationship of this usbnet bug to the original usb-serial bug.  If usb-serial was wrongly grabbing the device, that's one bug and should be addressed as such.  WM5 interop issues are an entirely unrelated problem.
Comment 39 Alan 2008-09-23 09:46:01 UTC
Reopen if not fixed