I've been doing a lot of work recently on the linux-wlan-ng prism2.5 USB driver, and I've finally reached the pointw here I have to break down and ask for help from someone more familiar with the USB way of things.
Basically, thanks to firmware bugs in the hardware, it's often necessary to reset the device on initialization. Unfortunately, this caruses a kernel oops on some machines. (and by device reset, I mean usb_reset_device() or something similar, ie resetting the port that the device is plugged into) There are several scenarios here, some work; some don't.. so please bear with me. All of these cases are with kernel 2.4.19-pre8/i386 1) Device plugged in on bootup. a) Without the device reset, the device does not initialize properly, and unplugging/replugging is necessary. b) With the device reset in the driver, on a KT266 (usb-uhci) the devices initializes fine. c) With the device reset, on an i830m (usb-uhci) we get a kernel oops. d) With the device reset, on the same i830m (uhci-alt), it initializes fine. e) With the reset, on an i830m, and the usb-uhci driver, with the device plugged into a hub, it works fine. 2) Device plugged in after boot Works fine with either driver. It seems that the way the usb-uhci resets ports on the root hub isn't quite sane. It's also worth noting that the device reset happens insie the usb_probe_device context. Attached is a dull dmesg output of the boot run with the kernel panic using usb-uhci, and the result of passing the oops through ksymoops. - Pizza [if you would CC replies to me, please..] -- Solomon Peachy I ain't broke, but I'm badly bent. ICQ# 1318344 Patience comes to those who wait. ...It's not "Beanbag Love", it's a "Transanimate Relationship"...
Linux version 2.4.19-pre8 ([EMAIL PROTECTED]) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)) #2 Thu May 23 10:46:31 EDT 2002 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) BIOS-e820: 0000000000100000 - 0000000013fe2800 (usable) BIOS-e820: 0000000013fe2800 - 0000000014000000 (reserved) BIOS-e820: 00000000feda0000 - 00000000fee00000 (reserved) BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved) 319MB LOWMEM available. On node 0 totalpages: 81890 zone(0): 4096 pages. zone(1): 77794 pages. zone(2): 0 pages. Kernel command line: root=/dev/hda2 video=radeonfb:1400x1050 Initializing CPU#0 Detected 996.794 MHz processor. Console: colour VGA+ 80x25 Calibrating delay loop... 1985.74 BogoMIPS Memory: 321872k/327560k available (1051k kernel code, 5300k reserved, 255k data, 228k init, 0k highmem) Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) Inode cache hash table entries: 32768 (order: 6, 262144 bytes) Mount-cache hash table entries: 8192 (order: 4, 65536 bytes) Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes) Page-cache hash table entries: 131072 (order: 7, 524288 bytes) CPU: Before vendor init, caps: 0383f9ff 00000000 00000000, vendor = 0 CPU: L1 I cache: 16K, L1 D cache: 16K CPU: L2 cache: 512K CPU: After vendor init, caps: 0383f9ff 00000000 00000000 00000000 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. CPU: After generic, caps: 0383f9ff 00000000 00000000 00000000 CPU: Common caps: 0383f9ff 00000000 00000000 00000000 CPU: Intel(R) Pentium(R) III Mobile CPU 1000MHz stepping 01 Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Checking 'hlt' instruction... OK. POSIX conformance testing by UNIFIX mtrr: v1.40 (20010327) Richard Gooch ([EMAIL PROTECTED]) mtrr: detected mtrr type: Intel PCI: PCI BIOS revision 2.10 entry at 0xfbfee, last bus=2 PCI: Using configuration type 1 PCI: Probing PCI hardware Unknown bridge resource 2: assuming transparent PCI: Discovered primary peer bus 08 [IRQ] PCI: Using IRQ router PIIX [8086/248c] at 00:1f.0 PCI: Found IRQ 11 for device 00:1f.1 PCI: Sharing IRQ 11 with 02:00.0 PCI: Cannot allocate resource region 0 of device 02:03.0 Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16) Starting kswapd VFS: Diskquotas version dquot_6.4.0 initialized Journalled Block Device driver loaded devfs: v1.12 (20020219) Richard Gooch ([EMAIL PROTECTED]) devfs: boot_options: 0x1 PCI: Found IRQ 11 for device 01:00.0 PCI: Sharing IRQ 11 with 00:1d.0 radeonfb: ref_clk=2700, ref_div=60, xclk=16600 from BIOS radeonfb: panel ID string: Samsung LTN150P1-L02 radeonfb: detected DFP panel size from BIOS: 1400x1050 Console: switching to colour frame buffer device 175x65 radeonfb: ATI Radeon M6 LY DDR SGRAM 16 MB radeonfb: DVI port LCD monitor connected radeonfb: CRT port no monitor connected pty: 256 Unix98 ptys configured Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled ttyS00 at 0x03f8 (irq = 4) is a 16550A ttyS01 at 0x02f8 (irq = 3) is a 16550A PCI: Found IRQ 11 for device 00:1f.6 PCI: Sharing IRQ 11 with 00:1f.5 PCI: Sharing IRQ 11 with 02:03.0 i810_rng: RNG not detected Uniform Multi-Platform E-IDE driver Revision: 6.31 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx PIIX4: IDE controller on PCI bus 00 dev f9 PCI: Enabling device 00:1f.1 (0005 -> 0007) PCI: Found IRQ 11 for device 00:1f.1 PCI: Sharing IRQ 11 with 02:00.0 PIIX4: chipset revision 1 PIIX4: not 100% native mode: will probe irqs later ide0: BM-DMA at 0xbfa0-0xbfa7, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0xbfa8-0xbfaf, BIOS settings: hdc:DMA, hdd:pio hda: IBM-DJSA-220, ATA DISK drive hdc: LG DVD-ROM DRN-8080B, ATAPI CD/DVD-ROM drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ide1 at 0x170-0x177,0x376 on irq 15 hda: host protected area => 1 hda: 39070080 sectors (20004 MB) w/1874KiB Cache, CHS=2432/255/63, UDMA(66) hdc: ATAPI 24X DVD-ROM drive, 512kB Cache, DMA Uniform CD-ROM driver Revision: 3.12 Partition check: /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 Linux Kernel Card Services 3.1.22 options: [pci] [cardbus] [pm] PCI: Found IRQ 11 for device 02:01.0 PCI: Sharing IRQ 11 with 02:01.1 PCI: Found IRQ 11 for device 02:01.1 PCI: Sharing IRQ 11 with 02:01.0 Intel PCIC probe: not found. NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 2048 buckets, 16Kbytes TCP: Hash tables configured (established 32768 bind 32768) NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. Yenta IRQ list 06f8, PCI irq11 Socket status: 30000006 Yenta IRQ list 06f8, PCI irq11 Socket status: 30000006 kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Mounted devfs on /dev Freeing unused kernel memory: 228k freed Adding Swap: 136512k swap-space (priority -1) usb.c: registered new driver usbdevfs usb.c: registered new driver hub usb-uhci.c: $Revision: 1.275 $ time 10:52:19 May 23 2002 usb-uhci.c: High bandwidth mode enabled PCI: Found IRQ 11 for device 00:1d.0 PCI: Sharing IRQ 11 with 01:00.0 PCI: Setting latency timer of device 00:1d.0 to 64 usb-uhci.c: USB UHCI at I/O 0xbf80, IRQ 11 usb-uhci.c: Detected 2 ports usb.c: new USB bus registered, assigned bus number 1 usb.c: kmalloc IF d3863440, numif 1 usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1 usb.c: USB device number 1 default language ID 0x0 Product: USB UHCI Root Hub SerialNumber: bf80 hub.c: USB hub found hub.c: 2 ports detected hub.c: standalone hub hub.c: ganged power switching hub.c: global over-current protection hub.c: Port indicators are not supported hub.c: power on to power good time: 2ms hub.c: hub controller current requirement: 0mA hub.c: port removable status: RR hub.c: local power source is good hub.c: no over-current condition exists hub.c: enabling power on all ports usb.c: hub driver claimed interface d3863440 usb.c: kusbd: /sbin/hotplug add 1 usb-uhci.c: v1.275:USB Universal Host Controller Interface driver EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,2), internal journal inserting floppy driver for 2.4.19-pre8 Floppy drive(s): fd0 is 1.44M FDC 0 is a post-1991 82077 hub.c: port 1, portstatus 101, change 1, 12 Mb/s hub.c: port 1 connection change hub.c: port 1, portstatus 101, change 1, 12 Mb/s hub.c: port 1, portstatus 101, change 0, 12 Mb/s hub.c: port 1, portstatus 101, change 0, 12 Mb/s hub.c: port 1, portstatus 101, change 0, 12 Mb/s hub.c: port 1, portstatus 101, change 0, 12 Mb/s hub.c: port 1, portstatus 103, change 0, 12 Mb/s hub.c: USB new device connect on bus1/1, assigned device number 2 usb.c: kmalloc IF d3ad59e0, numif 1 usb.c: new device strings: Mfr=0, Product=0, SerialNumber=1 usb.c: USB device number 2 default language ID 0x409 SerialNumber: 01190006 usb.c: unhandled interfaces on device usb.c: USB device 2 (vend/prod 0x9aa/0x3642) is not claimed by any active driver. Length = 18 DescriptorType = 01 USB version = 1.10 Vendor:Product = 09aa:3642 MaxPacketSize0 = 8 NumConfigurations = 1 Device version = 1.32 Device Class:SubClass:Protocol = 00:00:00 Per-interface classes Configuration: bLength = 9 bDescriptorType = 02 wTotalLength = 0027 bNumInterfaces = 01 bConfigurationValue = 01 iConfiguration = 00 bmAttributes = 80 MaxPower = 500mA Interface: 0 Alternate Setting: 0 bLength = 9 bDescriptorType = 04 bInterfaceNumber = 01 bAlternateSetting = 00 bNumEndpoints = 03 bInterface Class:SubClass:Protocol = ff:ff:ff iInterface = 00 Endpoint: bLength = 7 bDescriptorType = 05 bEndpointAddress = 81 (in) bmAttributes = 02 (Bulk) wMaxPacketSize = 0040 bInterval = 00 Endpoint: bLength = 7 bDescriptorType = 05 bEndpointAddress = 02 (out) bmAttributes = 02 (Bulk) wMaxPacketSize = 0040 bInterval = 00 Endpoint: bLength = 7 bDescriptorType = 05 bEndpointAddress = 83 (in) bmAttributes = 03 (Interrupt) wMaxPacketSize = 0008 bInterval = 01 usb.c: kusbd: /sbin/hotplug add 2 hub.c: port 2, portstatus 100, change 0, 12 Mb/s hub.c: port 1, portstatus 103, change 0, 12 Mb/s hub.c: port 2, portstatus 100, change 0, 12 Mb/s init_module: prism2_usb.o: 0.1.14-pre4 Loaded init_module: dev_info is: prism2_usb usb.c: registered new driver prism2_usb prism2_usb: Attempting to claim device Prism2.x 11Mbps WLAN USB Adapter with devnum 2 hub.c: port 1, portstatus 110, change 2, 12 Mb/s hub.c: port 1 enable change, status 110 hub.c: port 2, portstatus 100, change 0, 12 Mb/s hub.c: port 1, portstatus 103, change 1, 12 Mb/s hub.c: port 1 connection change hub.c: port 1, portstatus 103, change 1, 12 Mb/s usb.c: USB disconnect on device 2 usb.c: kusbd: /sbin/hotplug remove 2 hub.c: port 1, portstatus 103, change 0, 12 Mb/s Unable to handle kernel paging request at virtual address 693d4568 printing eip: d58212eb *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[<d58212eb>] Not tainted EFLAGS: 00010206 eax: 693d4550 ebx: d382ea00 ecx: d3bbdd4c edx: d35b64a0 esi: 0000012c edi: d3bbdd48 ebp: d3bbdd34 esp: d3bbdd34 ds: 0018 es: 0018 ss: 0018 Process modprobe (pid: 333, stackpage=d3bbd000) Stack: d3bbdd74 d58213f1 d35b64a0 d3bbdd58 d3bbc000 00000000 d3bbdd60 d3bbdd60 00000000 00000000 d3bbc000 d3bbdd4c d3bbdd4c d382ea00 80000000 d3ad58c0 d3bbdd98 d5821546 d35b64a0 0000012c d3bbdd88 d3fe10a0 00000000 d3ad58c0 Call Trace: [<d58213f1>] [<d5821546>] [<d58215d7>] [<d582ef84>] [<d5822383>] [<d582515d>] [<d5857833>] [<d5857861>] [<d585db22>] [<c0187dd5>] [<d586fc5c>] [<d586fc40>] [<d5820db2>] [<d582ef00>] [<d5820a28>] [<d58209fc>] [<d582ef08>] [<d582013e>] [<d586fc40>] [<d58200f5>] [<d585dd93>] [<d586fc40>] [<d586e288>] [<c01191b6>] [<d586f834>] [<d585b060>] [<c0108a63>] Code: 8b 40 18 85 c0 74 06 52 ff 50 0c eb 05 b8 ed ff ff ff 89 ec <7>hub.c: port 1, portstatus 103, change 0, 12 Mb/s hub.c: port 1, portstatus 103, change 0, 12 Mb/s hub.c: port 1, portstatus 103, change 0, 12 Mb/s hub.c: port 1, portstatus 103, change 0, 12 Mb/s PCI: Found IRQ 11 for device 02:00.0 PCI: Sharing IRQ 11 with 00:1f.1 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html 02:00.0: 3Com PCI 3c905C Tornado at 0xec80. Vers LK1.1.17 phy=0, phyx=24, mii_status=0x782d cs: IO port probe 0x0100-0x04ff: excluding 0x280-0x287 0x378-0x37f 0x4d0-0x4d7 cs: IO port probe 0x0c00-0x0cff: clean. cs: IO port probe 0x0800-0x08ff: excluding 0x800-0x817 0x828-0x837 0x840-0x84f 0x860-0x877 0x880-0x88f 0x898-0x89f 0x8a8-0x8cf 0x8e0-0x8ff cs: IO port probe 0x1000-0x17ff: clean. cs: IO port probe 0x0a00-0x0aff: clean. VFS: Disk change detected on device ide1(22,0) Dell laptop SMM driver v1.7 21/11/2001 Massimo Dal Zotto ([EMAIL PROTECTED])
ksymoops 2.4.1 on i686 2.4.19-pre8. Options used -V (default) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.4.19-pre8/ (default) -m /boot/System.map-2.4.19-pre8 (default) Warning: You did not tell me where to find symbol information. I will assume that the log matches the kernel and modules that are running right now and I'll use the default options above for symbol resolution. If the current kernel and/or modules do not match the log, you can get more accurate output by telling me the kernel version and where to find map, modules, ksyms etc. ksymoops -h explains the options. Warning (compare_maps): ksyms_base symbol GPLONLY_vmalloc_to_page not found in System.map. Ignoring ksyms_base entry Warning (compare_maps): mismatch on symbol usb_devfs_handle , usbcore says d582f454, /lib/modules/2.4.19-pre8/kernel/drivers/usb/usbcore.o says d582ef14. Ignoring /lib/modules/2.4.19-pre8/kernel/drivers/usb/usbcore.o entry Unable to handle kernel paging request at virtual address 693d4568 d58212eb *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[<d58212eb>] Not tainted Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010206 eax: 693d4550 ebx: d382ea00 ecx: d3bbdd4c edx: d35b64a0 esi: 0000012c edi: d3bbdd48 ebp: d3bbdd34 esp: d3bbdd34 ds: 0018 es: 0018 ss: 0018 Process modprobe (pid: 333, stackpage=d3bbd000) Stack: d3bbdd74 d58213f1 d35b64a0 d3bbdd58 d3bbc000 00000000 d3bbdd60 d3bbdd60 00000000 00000000 d3bbc000 d3bbdd4c d3bbdd4c d382ea00 80000000 d3ad58c0 d3bbdd98 d5821546 d35b64a0 0000012c d3bbdd88 d3fe10a0 00000000 d3ad58c0 Call Trace: [<d58213f1>] [<d5821546>] [<d58215d7>] [<d582ef84>] [<d5822383>] [<d582515d>] [<d5857833>] [<d5857861>] [<d585db22>] [<c0187dd5>] [<d586fc5c>] [<d586fc40>] [<d5820db2>] [<d582ef00>] [<d5820a28>] [<d58209fc>] [<d582ef08>] [<d582013e>] [<d586fc40>] [<d58200f5>] [<d585dd93>] [<d586fc40>] [<d586e288>] [<c01191b6>] [<d586f834>] [<d585b060>] [<c0108a63>] Code: 8b 40 18 85 c0 74 06 52 ff 50 0c eb 05 b8 ed ff ff ff 89 ec >>EIP; d58212eb <[usbcore]usb_submit_urb+1b/40> <===== Trace; d58213f1 <[usbcore]usb_start_wait_urb+81/180> Trace; d5821546 <[usbcore]usb_internal_control_msg+56/70> Trace; d58215d7 <[usbcore]usb_control_msg+77/90> Trace; d582ef84 <[usbcore]usb_address0_sem+0/14> Trace; d5822383 <[usbcore]usb_set_address+33/40> Trace; d582515d <[usbcore]usb_reset_device+cd/30d> Trace; d5857833 <[p80211]register_wlandev+6f/d4> Trace; d5857861 <[p80211]register_wlandev+9d/d4> Trace; d585db22 <[prism2_usb]prism2sta_probe_usb+34e/40c> Trace; c0187dd5 <vt_console_print+2a5/2c0> Trace; d586fc5c <[prism2_usb]prism2_usb_driver+1c/38> Trace; d586fc40 <[prism2_usb]prism2_usb_driver+0/38> Trace; d5820db2 <[usbcore]usb_find_interface_driver+172/1d0> Trace; d582ef00 <[usbcore]usb_bus_list_lock+0/0> Trace; d5820a28 <[usbcore]usb_check_support+68/80> Trace; d58209fc <[usbcore]usb_check_support+3c/80> Trace; d582ef08 <[usbcore]usb_bus_list+0/18> Trace; d582013e <[usbcore]usb_scan_devices+3e/60> Trace; d586fc40 <[prism2_usb]prism2_usb_driver+0/38> Trace; d58200f5 <[usbcore].text.start+95/a0> Trace; d585dd93 <[prism2_usb]init_module+53/58> Trace; d586fc40 <[prism2_usb]prism2_usb_driver+0/38> Trace; d586e288 <[prism2_usb].LC214+448/1d80> Trace; c01191b6 <sys_init_module+556/5f0> Trace; d586f834 <[prism2_usb].LC214+19f4/1d80> Trace; d585b060 <[prism2_usb]prism2wext_get_wireless_stats+0/0> Trace; c0108a63 <system_call+33/38> Code; d58212eb <[usbcore]usb_submit_urb+1b/40> 00000000 <_EIP>: Code; d58212eb <[usbcore]usb_submit_urb+1b/40> <===== 0: 8b 40 18 mov 0x18(%eax),%eax <===== Code; d58212ee <[usbcore]usb_submit_urb+1e/40> 3: 85 c0 test %eax,%eax Code; d58212f0 <[usbcore]usb_submit_urb+20/40> 5: 74 06 je d <_EIP+0xd> d58212f8 <[usbcore]usb_submit_urb+28/40> Code; d58212f2 <[usbcore]usb_submit_urb+22/40> 7: 52 push %edx Code; d58212f3 <[usbcore]usb_submit_urb+23/40> 8: ff 50 0c call *0xc(%eax) Code; d58212f6 <[usbcore]usb_submit_urb+26/40> b: eb 05 jmp 12 <_EIP+0x12> d58212fd <[usbcore]usb_submit_urb+2d/40> Code; d58212f8 <[usbcore]usb_submit_urb+28/40> d: b8 ed ff ff ff mov $0xffffffed,%eax Code; d58212fd <[usbcore]usb_submit_urb+2d/40> 12: 89 ec mov %ebp,%esp 3 warnings issued. Results may not be reliable.
msg06772/pgp00000.pgp
Description: PGP signature