usb related panic on amd64

Arun Sharma arun at sharma-home.net
Sun Aug 5 05:01:11 UTC 2007


This is on a Dell C521 booting from an IDE disk in an external USB 2.0
enclosure. 6.2-RELEASE works fine, but I get a panic with 7.0-CURRENT.

general protection fault at:
usb_start_transfer+0x1a5

However, if I turn on USB_DEBUG, things work ok. My guess is that
there is a timing related issue somewhere in this code.

Attached is the dmesg when the machine booted successfully.

umass0:0:0:-1: Attached to scbus0
ehci_freex: !isdone
>>> I get a panic here without USB_DEBUG <<
ehci_activate_qh: unexpected next ptr

I don't know if ehci_activate_qh message is indicative of the problem.

Another data point: the BIOS doesn't reliably detect the external USB
drive every time. However, if I reset the box, it manages to detect it
correctly the second time.

I also ran into a couple of other ddb issues while trying to gather
information that might help resolve the issue. The machine doesn't
have a atkbd and doesn't have a serial port. So ddb+ukbd is the
easiest option for me. Although it might be possible to add a serial
port to the machine via an expansion slot - it'd be nice to have the
ukbd work with the debugger.

 -Arun
-------------- next part --------------
Copyright (c) 1992-2007 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-CURRENT #3: Sat Aug  4 23:52:40 UTC 2007
    root at freebsd.mirabella.net:/usr/obj/usr/cvsup/src/sys/GENERIC
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (2004.20-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x40fb2  Stepping = 2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x1f<LAHF,CMP,SVM,ExtAPIC,CR8>
  Cores per package: 2
usable memory = 992346112 (946 MB)
avail memory  = 956018688 (911 MB)
ACPI APIC Table: <DELL   bMk    >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 2
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd0 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <DELL bMk    > on motherboard
acpi0: [ITHREAD]
acpi_hpet0: <High Precision Event Timer> iomem 0xfeff0000-0xfeff03ff on acpi0
Timecounter "HPET" frequency 25000000 Hz quality 900
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 3bde0000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
cpu0: <ACPI CPU> on acpi0
powernow0: <PowerNow! K8> on cpu0
cpu1: <ACPI CPU> on acpi0
powernow1: <PowerNow! K8> on cpu1
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.0 (no driver attached)
pci0: <memory, RAM> at device 0.1 (no driver attached)
pci0: <memory, RAM> at device 0.2 (no driver attached)
pci0: <memory, RAM> at device 0.3 (no driver attached)
pci0: <memory, RAM> at device 0.4 (no driver attached)
pci0: <memory, RAM> at device 0.5 (no driver attached)
pci0: <memory, RAM> at device 0.6 (no driver attached)
pci0: <memory, RAM> at device 0.7 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 3.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 4.0 on pci0
pci3: <ACPI PCI bus> on pcib3
vgapci0: <VGA-compatible display> mem 0xfc000000-0xfcffffff,0xe0000000-0xefffffff,0xfb000000-0xfbffffff irq 16 at device 5.0 on pci0
pci0: <memory, RAM> at device 9.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 10.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 10.1 (no driver attached)
pci0: <memory, RAM> at device 10.2 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xfe02f000-0xfe02ffff irq 21 at device 11.0 on pci0
ohci0: [GIANT-LOCKED]
ohci0: [ITHREAD]
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
usbd_get_string: getting lang failed, using 0
uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 8 ports with 8 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfe02e000-0xfe02e0ff irq 22 at device 11.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 8 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 8 ports with 8 removable, self powered
umass0: <TEAC CA-200, class 0/0, rev 2.00/4.00, addr 2> on uhub1
umass0: SCSI over Bulk-Only; quirks = 0x0000
umass0:0:0:-1: Attached to scbus0
ehci_freex: !isdone
ehci_activate_qh: unexpected next ptr
QH(0xffffffff9e99be00) at 0x01299e00:
  sqtd=0xffffffff9e99cd00 inactivesqtd=0xffffffff9e99cc80
  link=0x01299e82<QH>
  endp=0x80406003
    addr=0x03 inact=0 endpt=0 eps=2 dtc=1 hrecl=0
    mpl=0x40 ctl=0 nrl=8
  endphub=0x42011c00
    smask=0x00 cmask=0x1c huba=0x01 port=4 mult=1
  curqtd=0x0129dd80<>
Overlay qTD:
  next=0x0129dc80<> altnext=0x0129dd00<>
  status=0x80020d80: toggle=1 bytes=0x2 ioc=0 c_page=0x0
    cerr=3 pid=1 stat=0x80<ACTIVE>
  buffer[0]=0x00c20a60
  buffer[1]=0x00000000
  buffer[2]=0x00000005
  buffer[3]=0x00000000
  buffer[4]=0x00000000
QTD(0xffffffff9e99cd00) at 0x0129dd00:
  next=0x0129df00<> altnext=0x0129dc80<>
  status=0x00080e00: toggle=0 bytes=0x8 ioc=0 c_page=0x0
    cerr=3 pid=2 stat=0x0
  buffer[0]=0x01279e80
  buffer[1]=0x00000000
  buffer[2]=0x00000000
  buffer[3]=0x00000000
  buffer[4]=0x00000000
QTD(0xffffffff9e99cf00) at 0x0129df00:
  next=0x0129dd80<> altnext=0x0129dc80<>
  status=0x80090d80: toggle=1 bytes=0x9 ioc=0 c_page=0x0
    cerr=3 pid=1 stat=0x80<ACTIVE>
  buffer[0]=0x00c20cb0
  buffer[1]=0x00000000
  buffer[2]=0x00000000
  buffer[3]=0x00000000
  buffer[4]=0x00000000
QTD(0xffffffff9e99cd80) at 0x0129dd80:
  next=0x0129dc80<> altnext=0x0129dc80<>
  status=0x80008c80: toggle=1 bytes=0x0 ioc=1 c_page=0x0
    cerr=3 pid=0 stat=0x80<ACTIVE>
  buffer[0]=0x00000000
  buffer[1]=0x00000000
  buffer[2]=0x00000000
  buffer[3]=0x00000000
  buffer[4]=0x00000000
QTD(0xffffffff9e99cc80) at 0x0129dc80:
  next=0x00000001<T> altnext=0x00000001<T>
  status=0x00000000: toggle=0 bytes=0x0 ioc=0 c_page=0x0
    cerr=0 pid=0 stat=0x0
  buffer[0]=0x00000000
  buffer[1]=0x00000000
  buffer[2]=0x00000000
  buffer[3]=0x00000000
  buffer[4]=0x00000000
umass1: <SDML USB 2.0 to IDE Bridge, class 0/0, rev 2.00/2.00, addr 3> on uhub1
umass1: SCSI over Bulk-Only; quirks = 0x0000
umass1:1:1:-1: Attached to scbus1
usb1: handing over low speed device on port 7 to usb0
uhub1: port 7, device disappeared after reset
atapci0: <nVidia nForce MCP51 SATA300 controller> port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xe000-0xe00f mem 0xfe02d000-0xfe02dfff irq 23 at device 14.0 on pci0
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
atapci1: <nVidia nForce MCP51 SATA300 controller> port 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xcc00-0xcc0f mem 0xfe02c000-0xfe02cfff irq 20 at device 15.0 on pci0
atapci1: [ITHREAD]
ata4: <ATA channel 0> on atapci1
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci1
ata5: [ITHREAD]
pcib4: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci4: <ACPI PCI bus> on pcib4
bfe0: <Broadcom BCM4401-B0 Fast Ethernet> mem 0xfdbfe000-0xfdbfffff irq 19 at device 7.0 on pci4
miibus0: <MII bus> on bfe0
bmtphy0: <BCM4401 10/100baseTX PHY> PHY 1 on miibus0
bmtphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bfe0: using obsoleted if_watchdog interface
bfe0: Ethernet address: 00:1a:a0:1f:12:6e
bfe0: [ITHREAD]
pci0: <multimedia> at device 16.1 (no driver attached)
ppc0: cannot reserve I/O port range
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250 or not responding
sio0: [FILTER]
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ukbd0: <vendor 0x1241 product 0x1203, class 0/0, rev 2.00/2.30, addr 2> on uhub0
kbd1 at ukbd0
uhid0: <vendor 0x1241 product 0x1203, class 0/0, rev 2.00/2.30, addr 2> on uhub0
Timecounters tick every 1.000 msec
ad4: 76293MB <Seagate ST3808110AS 3.ADJ> at ata2-master SATA300
acd0: DVDROM <TSSTcorpDVD-ROM TS-H353B/D200> at ata3-master SATA150
GEOM_LABEL: Label for provider ad4s1 is ext2fs//boot.
GEOM_LABEL: Label for provider ad4s2 is ext2fs//.
GEOM_LABEL: Label for provider ad4s4 is ext2fs//home.
SMP: AP CPU #1 Launched!
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
da4 at umass-sim1 bus 1 target 0 lun 0
da4: < WDC WD800JB-00CR 17.0> Fixed Direct Access SCSI-0 device 
da4: 40.000MB/s transfers
da4: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <TEAC USB   HS-CF Card 4.00> Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da1 at umass-sim0 bus 0 target 0 lun 1
da1: <TEAC USB   HS-xD/SM 4.00> Removable Direct Access SCSI-0 device 
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da2 at umass-sim0 bus 0 target 0 lun 2
da2: <TEAC USB   HS-MS Card 4.00> Removable Direct Access SCSI-0 device 
da2: 40.000MB/s transfers
da2: Attempt to query device size failed: NOT READY, Medium not present
da3 at umass-sim0 bus 0 target 0 lun 3
da3: <TEAC USB   HS-SD Card 4.00> Removable Direct Access SCSI-0 device 
da3: 40.000MB/s transfers
da3: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/da4s1a


More information about the freebsd-amd64 mailing list