NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/39211: ubsa device does no longer work since January 2008



>Number:         39211
>Category:       kern
>Synopsis:       ubsa device does no longer work since January 2008
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 25 20:05:01 +0000 2008
>Originator:     Frank Wille
>Release:        4.99.67
>Organization:
NetBSD
>Environment:
NetBSD nx6310.owl.de 4.99.67 NetBSD 4.99.67 (GENERIC) #2: Fri Jul 25 21:30:06 
CEST 2008  
frank%compaq.owl.de@localhost:/home/frank/netbsd/current/src/sys/arch/i386/compile/obj/GENERIC
 i386
>Description:
Since uhmodem support was added by ichiro in January 2008 the ubsa device is no 
longer usable. I am testing with a hp NX6310 notebook and a Option N.V. MC3G 
UMTS card on the cardbus slot.

The ubsa device (and ucom) does no longer attach:
---8<---
ohci0 at cardbus0 function 0: vendor 0x1045 product 0xc861 (rev. 0x10)
ohci0: OHCI version 1.0, legacy support
usb5 at ohci0: USB revision 1.0
uhub5 at usb5: vendor 0x1045 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
ugen0 at uhub5 port 1
ugen0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
---8<---

This definitely worked before with earlier 4.99.x releases (like 4.99.5).

The dmesg of my test system:
NetBSD 4.99.67 (GENERIC) #2: Fri Jul 25 21:30:06 CEST 2008
        
frank%compaq.owl.de@localhost:/home/frank/netbsd/current/src/sys/arch/i386/compile/obj/GENERIC
total memory = 503 MB
avail memory = 483 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Hewlett-Packard HP Compaq nx6310 (RH322EA#ABD) (F.0E)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 1729MHz, id 0x6e8
ioapic0 at mainbus0 apid 1: pa 0xfec00000, version 20, 24 pins
acpi0 at mainbus0: Intel ACPICA 20080321
acpi0: X/RSDT: OemId <HPQOEM,SLIC-MPC,00000001>, AslId <HP  ,00000001>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
acpiec0 at acpi0 (C005, PNP0C09): ACPI Embedded Controller
acpiec0: io 0x62,0x66
npx1 at acpi0 (C20F, PNP0C04)
npx1: io 0xf0-0xff irq 13
npx1: reported by CPUID; using exception 16
attimer1 at acpi0 (C210, PNP0100): AT Timer
attimer1: io 0x40-0x43 irq 0
pcppi1 at acpi0 (C211, PNP0800)
pcppi1: io 0x61
midi0 at pcppi1: PC speaker (CPU-intensive output)
sysbeep0 at pcppi1
hpet0 at acpi0 (C213, PNP0103)
hpet0: mem 0xfed00000-0xfed003ff
timecounter: Timecounter "hpet0" frequency 14318179 Hz quality 2000
pckbc1 at acpi0 (C217, PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
pckbc2 at acpi0 (C218, SYN0112): aux port
pckbc2: irq 12
hpqlb0 at acpi0 (C21B, HPQ0006): HP Quick Launch Buttons
acpibat0 at acpi0 (C1BC, PNP0C0A-1): ACPI Battery (Control Method)
acpibat0: battery info: Hewlett-Packard, LIon, Primary 20212 2006/09/19
acpibat1 at acpi0 (C1BB, PNP0C0A-2): ACPI Battery (Control Method)
acpiacad0 at acpi0 (C1BA, ACPI0003): ACPI AC Adapter
acpibut0 at acpi0 (C23F, PNP0C0E): ACPI Sleep Button
acpilid0 at acpi0 (C238, PNP0C0D): ACPI Lid Switch
C23D (PNP0C14) at acpi0 not configured
C325 (PNP0C0B) at acpi0 not configured
C326 (PNP0C0B) at acpi0 not configured
C327 (PNP0C0B) at acpi0 not configured
C328 (PNP0C0B) at acpi0 not configured
acpitz0 at acpi0 (TZ0): active cooling level 0: 80.0C active cooling level 1: 
70.0C active cooling level 2: 60.0C active cooling level 3: 50.0C
acpitz1 at acpi0 (TZ1): critical 105.0C passive 50.0C, passive cooling
acpitz2 at acpi0 (TZ2): critical 105.0C, passive cooling
acpitz3 at acpi0 (TZ3): critical 105.0C passive 25.6C, passive cooling
acpitz4 at acpi0 (TZ4): critical 110.0C, passive cooling
apm0 at acpi0: Power Management spec V1.2
attimer1: attached to pcppi1
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 6.2
pms0: Palm detect, Multi-finger
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x27a0 (rev. 0x03)
agp0 at pchb0: detected 7932k stolen memory
agp0: aperture at 0xd0000000, size 0x10000000
vga1 at pci0 dev 2 function 0: vendor 0x8086 product 0x27a2 (rev. 0x03)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga1 not configured
vendor 0x8086 product 0x27a6 (miscellaneous display, revision 0x03) at pci0 dev 
2 function 1 not configured
azalia0 at pci0 dev 27 function 0: Generic High Definition Audio Controller
azalia0: interrupting at ioapic0 pin 21
azalia0: host: 0x8086/0x27d8 (rev. 1), HDA rev. 1.0
ppb0 at pci0 dev 28 function 0: vendor 0x8086 product 0x27d0 (rev. 0x01)
ppb0: disabling notification events
pci1 at ppb0 bus 8
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x27c8 (rev. 0x01)
uhci0: interrupting at ioapic0 pin 20
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 0x8086 product 0x27c9 (rev. 0x01)
uhci1: interrupting at ioapic0 pin 21
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 0x8086 product 0x27ca (rev. 0x01)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 0x8086 product 0x27cb (rev. 0x01)
uhci3: interrupting at ioapic0 pin 19
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x27cc (rev. 0x01)
ehci0: interrupting at ioapic0 pin 20
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb1 at pci0 dev 30 function 0: vendor 0x8086 product 0x2448 (rev. 0xe1)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
cbb0 at pci2 dev 6 function 0: vendor 0x104c product 0x8039 (rev. 0x00)
fwohci0 at pci2 dev 6 function 1: vendor 0x104c product 0x803a (rev. 0x00)
fwohci0: interrupting at ioapic0 pin 19
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:02:3f:99:29:95:3c:0c
fwohci0: Phy 1394a available S400, 3 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
bce0 at pci2 dev 14 function 0: Broadcom BCM4401-B0 10/100 Ethernet
bce0: interrupting at ioapic0 pin 16
bmtphy0 at bce0 phy 1: BCM4401 10/100 media interface, rev. 0
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bce0: Ethernet address 00:17:08:38:8e:48
cbb0: cacheline 0x10 lattimer 0x40
cbb0: bhlc 0x824010
cbb0: interrupting at ioapic0 pin 18
cardslot0 at cbb0
cardbus0 at cardslot0: bus 3
pcmcia0 at cardslot0
pcib0 at pci0 dev 31 function 0
pcib0: vendor 0x8086 product 0x27b9 (rev. 0x01)
piixide0 at pci0 dev 31 function 2
piixide0: Intel 82801GBM/GHM Serial ATA Controller (ICH7) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel wired to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel wired to compatibility mode
piixide0: secondary channel interrupting at ioapic0 pin 15
atabus1 at piixide0 channel 1
isa0 at pcib0
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=2, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
fwohci0: phy int
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 1729089960 Hz quality 3000
acpiacad0: AC adapter online.
azalia0: codec[0]: Analog Devices AD1981HD (rev. 2.0), HDA rev. 1.0
azalia0: codec[1]: 0x11c1/0x3026 (rev. 7.0), HDA rev. 1.0
azalia0: codec[1]: No support for modem function groups
azalia0: codec[1] has no audio function groups
audio0 at azalia0: full duplex, independent
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb3: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhub4 at usb4: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
wd0 at atabus0 drive 0: <ST96812AS>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 57241 MB, 116301 cyl, 16 head, 63 sec, 512 bytes/sect x 117231408 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <TSSTcorpCD/DVDW TS-L632D, , HH15> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(piixide0:1:0): using PIO mode 4, DMA mode 2 (using DMA)
Kernelized RAIDframe activated
cmos: attached.
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
hpqlb0: registering on wskbd0
boot device: bce0
root on bce0

>How-To-Repeat:
Get an ubsa-compatible card and plug it into your cardbus slot. You will notice 
that ubsa no longer attaches.

>Fix:
The ubsa-attach problem was caused by making ubsa attach at usbifif. It was 
usbdevif before. From files.usb:
[...]
#attach ubsa at usbdevif
attach  ubsa at usbifif
[...]

The first problem can easily be fixed by using the correct MATCH and ATTACH 
macros for usbifif in ubsa.c:

--- CVS/Base/ubsa.c     2008-06-28 14:09:59.000000000 +0200
+++ ubsa.c      2008-07-20 17:15:31.000000000 +0200
@@ -150,7 +150,7 @@
 
 USB_MATCH(ubsa)
 {
-       USB_MATCH_START(ubsa, uaa);
+       USB_IFMATCH_START(ubsa, uaa);
 
        return (ubsa_lookup(uaa->vendor, uaa->product) != NULL ?
                UMATCH_VENDOR_PRODUCT : UMATCH_NONE);
@@ -158,7 +158,7 @@
 
 USB_ATTACH(ubsa)
 {
-       USB_ATTACH_START(ubsa, sc, uaa);
+       USB_IFATTACH_START(ubsa, sc, uaa);
        usbd_device_handle dev = uaa->device;
        usb_config_descriptor_t *cdesc;
        usb_interface_descriptor_t *id;


Now we are coming to the next problem:
---8<---
ohci0 at cardbus0 function 0: vendor 0x1045 product 0xc861 (rev. 0x10)
ohci0: OHCI version 1.0, legacy support
usb5 at ohci0: USB revision 1.0
uhub5 at usb5: vendor 0x1045 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
ubsa0 at uhub5 port 1 configuration 1 interface 0
ubsa0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
usbd_set_config_index: illegal index
ubsa0: failed to set configuration: INVAL
ubsa1 at uhub5 port 1 configuration 1 interface 1
ubsa1: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
usbd_set_config_index: illegal index
ubsa1: failed to set configuration: INVAL
ubsa2 at uhub5 port 1 configuration 1 interface 2
ubsa2: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
usbd_set_config_index: illegal index
ubsa2: failed to set configuration: INVAL
---8<---

ubsa is attached but it is using a wrong config index. Here I am not really 
what I am doing, because I have not much experience with USB internas. But the 
following patch fixes it:

--- CVS/Base/ubsavar.h  2008-06-28 14:09:59.000000000 +0200
+++ ubsavar.h   2008-07-11 20:55:12.000000000 +0200
@@ -55,7 +55,7 @@
 
 #define        UBSA_MODVER             1       /* module version */
 
-#define        UBSA_DEFAULT_CONFIG_INDEX       1
+#define        UBSA_DEFAULT_CONFIG_INDEX       0
 #define        UBSA_IFACE_INDEX_OFFSET 0
 
 #define        UBSA_INTR_INTERVAL      100     /* ms */
--- CVS/Base/usb_subr.c 2008-06-28 14:10:00.000000000 +0200
+++ usb_subr.c  2008-07-11 20:53:39.000000000 +0200
@@ -555,7 +555,7 @@
        DPRINTFN(5,("usbd_set_config_index: dev=%p index=%d\n", dev, index));
 
        if (index >= dev->ddesc.bNumConfigurations &&
-           index != USB_UNCONFIG_NO) {
+           index != USB_UNCONFIG_INDEX) {
                /* panic? */
                printf("usbd_set_config_index: illegal index\n");
                return (USBD_INVAL);


Now ubsa and ucom attach nicely, apart from the strange fact that I have got 
three ucom devices now (it was only one with earlier releases). And often the 
devices reconnect - no idea why:

--8<--
ohci0 at cardbus0 function 0: vendor 0x1045 product 0xc861 (rev. 0x10)
ohci0: OHCI version 1.0, legacy support
usb5 at ohci0: USB revision 1.0
uhub5 at usb5: vendor 0x1045 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
ubsa0 at uhub5 port 1 configuration 1 interface 0
ubsa0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom0 at ubsa0 portno 0
ubsa1 at uhub5 port 1 configuration 1 interface 1
ubsa1: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom1 at ubsa1 portno 0
ubsa2 at uhub5 port 1 configuration 1 interface 2
ubsa2: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom2 at ubsa2 portno 0
ubsa0: at uhub5 port 1 (addr 2) disconnected
ucom0: detached
ubsa0: detached
ubsa1: at uhub5 port 1 (addr 2) disconnected
ucom1: detached
ubsa1: detached
ubsa2: at uhub5 port 1 (addr 2) disconnected
ucom2: detached
ubsa2: detached
ubsa0 at uhub5 port 1 configuration 1 interface 0
ubsa0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom0 at ubsa0 portno 0
ubsa1 at uhub5 port 1 configuration 1 interface 1
ubsa1: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom1 at ubsa1 portno 0
ubsa2 at uhub5 port 1 configuration 1 interface 2
ubsa2: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom2 at ubsa2 portno 0
---8<---

Sometimes I can access the modem with the following entry in /etc/remote:
com0:dv=/dev/ttyU0:br#9600:pa=none:dc:

But often I'm running in this uvm_fault:
uvm_fault(0xc0acc100, 0xe0000000, 1) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 0 eip c06e53c4 cs 8 eflags 10292 cr2 e0000107 ilevel 6
kernel: supervisor trap page fault, code=0
Stopped in pid 357.1 (tip) at   netbsd:usbd_open_pipe_ival+0x14:  movzbl
0x4(%eax),%esi
backtrace:
nbsd_open_pipe_ival
nbsd_open_pipe_intr
ubsa_open
ucomopen
cdev_open
spec_open
VOP_OPEN
vn_open
sys_open
syscall

So my solution cannot be perfect. And someboy with more USB knowledge should 
have a look onto this problem.

I can be contacted at any time for testing purposes!



Home | Main Index | Thread Index | Old Index