Date: Fri, 03 Oct 2003 19:44:54 +1000 From: Stephen McKay <smckay@internode.on.net> To: freebsd-stable@freebsd.org Cc: Stephen McKay <smckay@internode.on.net> Subject: 4.9-rc + usb + asus a7n8x == bad news Message-ID: <200310030944.h939isJW010930@dungeon.home>
next in thread | raw e-mail | index | archive | help
Hi! Just before we start, this is not the "USB hang on boot" problem. OK? This post got rather long, so I'll summaries it all in a sentence here: With FreeBSD 4.9-rc on an ASUS A7N8X with a cheapo memory stick, simply plugging it in and taking it out a couple of times is a guaranteed panic. I use only one USB device, a cheapo USB memory stick, which I recently bought on a whim. When things work, it identifies as: umass0: IMGSYS-3 Security X-Disk V1.02 , rev 1.10/2.01, addr 3 da0 at umass-sim0 bus 0 target 0 lun 0 da0: <GENERIC USB FLASH DISK 0201> Removable Direct Access SCSI-0 device da0: 650KB/s transfers da0: 15MB (32000 512 byte sectors: 64H 32S/T 15C) I tried it on a 4.7 machine and although it probes and attaches OK, it can't be read (returns EIO) and the console prints "da0: reading primary partition table: error reading fsbn 0". For no particular reason, I unplugged it and plugged it in again a few times relatively quickly. I was rewarded with a kernel panic. So, USB on 4.7 is not robust even if I could ever get it to work. 4.9-rc isn't any improvement, as you can read below. For my subsequent tests, I used an Asus A7N8X Deluxe based machine that I have installed first 4.9-prerelease, now 4.9-rc on. It probes like this (I'll go the ultra-verbose route in case any of the extra fluff matters): Copyright (c) 1992-2003 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.9-RC #1: Fri Oct 3 12:17:38 EST 2003 mckay@water.home:/usr/obj/usr/4.9-rc/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz CPU: AMD Athlon(tm) XP 2600+ (2079.56-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x681 Stepping = 1 Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE> AMD Features=0xc0400000<AMIE,DSP,3DNow!> real memory = 1073676288 (1048512K bytes) avail memory = 1039683584 (1015316K bytes) Preloaded elf kernel "kernel" at 0xc053e000. Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 11 entries at 0xc00fdeb0 npx0: <math processor> on motherboard npx0: INT 16 interface pcib0: <Host to PCI bridge> on motherboard pci0: <PCI bus> on pcib0 pci0: <unknown card> (vendor=0x10de, dev=0x01eb) at 0.1 pci0: <unknown card> (vendor=0x10de, dev=0x01ee) at 0.2 pci0: <unknown card> (vendor=0x10de, dev=0x01ed) at 0.3 pci0: <unknown card> (vendor=0x10de, dev=0x01ec) at 0.4 pci0: <unknown card> (vendor=0x10de, dev=0x01ef) at 0.5 isab0: <PCI to ISA bridge (vendor=10de device=0060)> at device 1.0 on pci0 isa0: <ISA bus> on isab0 pci0: <unknown card> (vendor=0x10de, dev=0x0064) at 1.1 ohci0: <OHCI (generic) USB controller> mem 0xeb080000-0xeb080fff irq 11 at device 2.0 on pci0 usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: <OHCI (generic) USB controller> on ohci0 usb0: USB revision 1.0 uhub0: (0x10de) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 3 ports with 3 removable, self powered ohci1: <OHCI (generic) USB controller> mem 0xeb083000-0xeb083fff irq 11 at device 2.1 on pci0 usb1: OHCI version 1.0, legacy support usb1: SMM does not respond, resetting usb1: <OHCI (generic) USB controller> on ohci1 usb1: USB revision 1.0 uhub1: (0x10de) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 3 ports with 3 removable, self powered pci0: <USB controller> at 2.2 irq 5 pci0: <unknown card> (vendor=0x10de, dev=0x0066) at 4.0 irq 5 pci0: <unknown card> (vendor=0x10de, dev=0x006b) at 5.0 irq 5 pci0: <unknown card> (vendor=0x10de, dev=0x006a) at 6.0 irq 11 pcib1: <PCI to PCI bridge (vendor=10de device=006c)> at device 8.0 on pci0 pci1: <PCI bus> on pcib1 atapci0: <Promise TX2 ATA100 controller> port 0xb000-0xb00f,0xac00-0xac03,0xa800-0xa807,0xa400-0xa403,0xa000-0xa007 mem 0xe8000000-0xe800ffff irq 11 at device 7.0 on pci1 ata2: at 0xa000 on atapci0 ata3: at 0xa800 on atapci0 pci1: <NVidia Riva Ultra Vanta TNT2 graphics accelerator> at 10.0 irq 5 atapci1: <Generic PCI ATA controller> port 0xf000-0xf00f at device 9.0 on pci0 ata0: at 0x1f0 irq 14 on atapci1 ata1: at 0x170 irq 15 on atapci1 pcib2: <PCI to PCI bridge (vendor=10de device=006d)> at device 12.0 on pci0 pci2: <PCI bus> on pcib2 xl0: <3Com 3c920B-EMB Integrated Fast Etherlink XL> port 0xc000-0xc07f mem 0xea000000-0xea00007f irq 11 at device 1.0 on pci2 xl0: Ethernet address: 00:26:54:0e:71:f1 miibus0: <MII bus> on xl0 ukphy0: <Generic IEEE 802.3u media interface> on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fwohci0: vendor=10de, dev=6e fwohci0: <1394 Open Host Controller Interface> mem 0xeb087000-0xeb08703f,0xeb086000-0xeb0867ff irq 11 at device 13.0 on pci0 fwohci0: OHCI version 1.10 (ROM=0) fwohci0: No. of Isochronous channel is 4. fwohci0: EUI64 00:e0:18:00:00:22:9b:d0 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: <IEEE1394(FireWire) bus> on fwohci0 if_fwe0: <Ethernet over FireWire> on firewire0 if_fwe0: Fake Ethernet address: 02:e0:18:22:9b:d0 sbp0: <SBP2/SCSI over firewire> on firewire0 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) pcib3: <PCI to PCI bridge (vendor=10de device=01e8)> at device 30.0 on pci0 pci3: <PCI bus> on pcib3 orm0: <Option ROMs> at iomem 0xc0000-0xca7ff,0xcc000-0xcffff,0xd0000-0xd17ff,0xd2000-0xda7ff on isa0 pmtimer0 on isa0 fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0 atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: model Generic PS/2 mouse, device ID 0 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold lpt0: <Printer> on ppbus0 lpt0: Interrupt-driven port ppi0: <Parallel I/O> on ppbus0 plip0: <PLIP network interface> on ppbus0 ata2-slave: ATA identify retries exceeded ar0: 76319MB <ATA RAID1 array> [9729/255/63] status: READY subdisks: 0 READY ad4: 76319MB <WDC WD800JB-00ETA0> [155061/16/63] at ata2-master UDMA100 1 READY ad6: 76319MB <WDC WD800JB-00ETA0> [155061/16/63] at ata3-master UDMA100 acd0: CDROM <GCR-8523B> at ata1-slave PIO4 Mounting root from ufs:/dev/ar0s1a There are several odd things here. First, FreeBSD finds two USB controllers which 3 ports each. The BIOS views this as three USB controllers presumably of 2 ports each, two of them OHCI 1.0/1.1, one of them EHCI 2.0. The EHCI one isn't seen. There's a long and tedious pause after this line: ata0: at 0x1f0 irq 14 on atapci1 There are no disks attached to this controller. They are on the Promise RAID card. There are a lot of "pci0: <unknown card>" entries. One of these would be the unsupported network port (there's a 2nd supported network port) but I have no idea what the rest of them could be as there are no extra cards in this machine. Anyway, back to USB stuff: I tried the USB memory stick and on the first try, it worked: umass0: IMGSYS-3 Security X-Disk V1.02 , rev 1.10/2.01, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: <GENERIC USB FLASH DISK 0201> Removable Direct Access SCSI-0 device da0: 650KB/s transfers da0: 15MB (32000 512 byte sectors: 64H 32S/T 15C) I did some transfers (works nicely at 1MB/s), then unplugged: umass0: at uhub0 port 2 (addr 2) disconnected (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry umass0: detached The next try wasn't so good: umass0: BBB reset failed, TIMEOUT umass0: BBB bulk-in clear stall failed, TIMEOUT umass0: BBB bulk-out clear stall failed, TIMEOUT (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: BBB reset failed, TIMEOUT umass0: BBB bulk-in clear stall failed, TIMEOUT umass0: BBB bulk-out clear stall failed, TIMEOUT umass0: BBB reset failed, TIMEOUT umass0: BBB bulk-in clear stall failed, TIMEOUT Then the machine paniced, but wedged so badly it wouldn't dump core. I tried several other times, and often simply plugging in the device results in a panic and wedge without a core dump. I can't even scroll the screen back to get a better look at what killed it. I rebuilt the kernel with DDB and now when it panics, I can at least type things. Typing "trace" gives me: Fatal trap 12: page fault while in kernel mode, etc, etc, etc. So even DDB has let me down. Apart from this USB panic the machine is fast and stable. Buildworld takes 23 minutes and always works. So generally speaking the hardware is sound. Where do I go from here? Stephen.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310030944.h939isJW010930>