usb/112461: ehci USB 2.0 doesn't work on nforce4

Hans Petter Selasky hselasky at c2i.net
Sun May 13 20:36:12 UTC 2007


On Tuesday 08 May 2007 08:19, Igor Popov wrote:
> В сообщении от Monday 07 May 2007 16:12:50 Hans Petter Selasky написал(а):
> > On Monday 07 May 2007 08:09, Igor Popov wrote:
> > > 	Good morning.
> > >
> > > > On Sunday 06 May 2007 13:51, Igor Popov wrote:
> > > > > >Number:         112461
> > > > > >Category:       usb
> > > > > >Synopsis:       ehci USB 2.0 doesn't work on nforce4
> > > > > >Confidential:   no
> > > > > >Severity:       non-critical
> > > > > >Priority:       medium
> > > > > >Responsible:    freebsd-usb
> > > > > >State:          open
> > > > > >Quarter:
> > > > > >Keywords:
> > > > > >Date-Required:
> > > > > >Class:          sw-bug
> > > > > >Submitter-Id:   current-users
> > > > > >Arrival-Date:   Sun May 06 12:00:11 GMT 2007
> > > > > >Closed-Date:
> > > > > >Last-Modified:
> > > > > >Originator:     Igor Popov
> > > > > >Release:        6.0, 6.1, 6.2
> > > > > >Organization:
> > > > > >Environment:
> > > > >
> > > > > FreeBSD unix.my.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Sat Jan 27
> > > > > 13:01:18 EET 2007
> > > > > toor at unix.my.net:/usr/obj/usr/src/sys/SUPERKERNEL i386
> > > > >
> > > > > >Description:
> > > > >
> > > > > I have motherboard(Asus A8N-E) that built on nforce4 chipset, it
> > > > > has usb 2.0 ports, but under FreeBSD with usb 2.0 flashdrive max
> > > > > speed near 1.2Mb/s on file copying (my custom kernel has ehci
> > > > > driver), that is usb1.[01] speed. But under both linux an windows
> > > > > with the same flashdrive speed is near 10Mb/s.
> > > > >
> > > > > 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 6.2-RELEASE #0: Sat Jan 27 13:01:18 EET 2007
> > > > >     toor at unix.my.net:/usr/obj/usr/src/sys/SUPERKERNEL
> > > > > ACPI APIC Table: <Nvidia AWRDACPI>
> > > > > Timecounter "i8254" frequency 1193182 Hz quality 0
> > > > > CPU: AMD Athlon(tm) 64 Processor 3000+ (1809.28-MHz 686-class CPU)
> > > > >   Origin = "AuthenticAMD"  Id = 0x20ff2  Stepping = 2
> > > > >
> > > > > Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR
> > > > >,P GE ,M CA ,CM OV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
> > > > >   Features2=0x1<SSE3>
> > > > >   AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow+,3DNow>
> > > > >   AMD Features2=0x1<LAHF>
> > > > > real memory  = 536805376 (511 MB)
> > > > > avail memory = 507523072 (484 MB)
> > > > > ioapic0 <Version 1.1> irqs 0-23 on motherboard
> > > > > wlan: mac acl policy registered
> > > > > ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413,
> > > > > RF5413) acpi0: <Nvidia AWRDACPI> on motherboard
> > > > > acpi_bus_number: can't get _ADR
> > > > > acpi_bus_number: can't get _ADR
> > > > > acpi0: Power Button (fixed)
> > > > > acpi_bus_number: can't get _ADR
> > > > > acpi_bus_number: can't get _ADR
> > > > > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
> > > > > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on
> > > > > acpi0 cpu0: <ACPI CPU> on acpi0
> > > > > acpi_button0: <Power Button> on acpi0
> > > > > pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> > > > > pci0: <ACPI PCI bus> on pcib0
> > > > > pci0: <memory> at device 0.0 (no driver attached)
> > > > > isab0: <PCI-ISA bridge> at device 1.0 on pci0
> > > > > isa0: <ISA bus> on isab0
> > > > > nfsmb0: <nForce2/3/4 MCP SMBus Controller> port
> > > > > 0xe400-0xe41f,0x4c00-0x4c3f,0x4c 40-0x4c7f irq 20 at device 1.1 on
> > > > > pci0 smbus0: <System Management Bus> on nfsmb0
> > > > > smb0: <SMBus generic I/O> on smbus0
> > > > > nfsmb1: <nForce2/3/4 MCP SMBus Controller> on nfsmb0
> > > > > smbus1: <System Management Bus> on nfsmb1
> > > > > smb1: <SMBus generic I/O> on smbus1
> > > > > ohci0: <OHCI (generic) USB controller> mem 0xd3104000-0xd3104fff
> > > > > irq 21 at devic e 2.0 on pci0
> > > > > ohci0: [GIANT-LOCKED]
> > > > > usb0: OHCI version 1.0, legacy support
> > > > > usb0: <OHCI (generic) USB controller> on ohci0
> > > > > usb0: USB revision 1.0
> > > > > uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> > > > > uhub0: 10 ports with 10 removable, self powered
> > > > > ehci0: <NVIDIA nForce4 USB 2.0 controller> mem
> > > > > 0xfeb00000-0xfeb000ff irq 22 at d evice 2.1 on pci0
> > > > > ehci0: [GIANT-LOCKED]
> > > > > usb1: EHCI version 1.0
> > > > > usb1: companion controller, 4 ports each: usb0
> > > > > usb1: <NVIDIA nForce4 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
> > > > > uhub1: 10 ports with 10 removable, self powered
> > > > > pcm0: <nVidia nForce4> port 0xdc00-0xdcff,0xe000-0xe0ff mem
> > > > > 0xd3103000-0xd3103ff f irq 23 at device 4.0 on pci0
> > > > > pcm0: <Avance Logic ALC850 AC97 Codec>
> > > > > atapci0: <nVidia nForce CK804 UDMA133 controller> port
> > > > > 0x1f0-0x1f7,0x3f6,0x170-0 x177,0x376,0xf000-0xf00f at device 6.0 on
> > > > > pci0 ata0: <ATA channel 0> on atapci0
> > > > > ata1: <ATA channel 1> on atapci0
> > > > > atapci1: <nVidia nForce CK804 SATA300 controller> port
> > > > > 0x9f0-0x9f7,0xbf0-0xbf3,0 x970-0x977,0xb70-0xb73,0xd800-0xd80f mem
> > > > > 0xd3102000-0xd3102fff irq 21 at device 7.0 on pci0
> > > > > ata2: <ATA channel 0> on atapci1
> > > > > ata3: <ATA channel 1> on atapci1
> > > > > atapci2: <nVidia nForce CK804 SATA300 controller> port
> > > > > 0x9e0-0x9e7,0xbe0-0xbe3,0 x960-0x967,0xb60-0xb63,0xc400-0xc40f mem
> > > > > 0xd3101000-0xd3101fff irq 22 at device 8.0 on pci0
> > > > > ata4: <ATA channel 0> on atapci2
> > > > > ata5: <ATA channel 1> on atapci2
> > > > > pcib1: <ACPI PCI-PCI bridge> at device 9.0 on pci0
> > > > > pci5: <ACPI PCI bus> on pcib1
> > > > > ath0: <Atheros 5212> mem 0xd3000000-0xd300ffff irq 16 at device 6.0
> > > > > on pci5 ath0: Ethernet address: 00:15:e9:a4:58:9b
> > > > > ath0: mac 7.9 phy 4.5 radio 5.6
> > > > > nfe0: <NVIDIA nForce4 CK804 MCP9 Networking Adapter> port
> > > > > 0xb000-0xb007 mem 0xd3 100000-0xd3100fff irq 23 at device 10.0 on
> > > > > pci0
> > > > > miibus0: <MII bus> on nfe0
> > > > > e1000phy0: <Marvell 88E1111 Gigabit PHY> on miibus0
> > > > > e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> > > > > 1000baseTX-FDX, auto nfe0: Ethernet address: 00:17:31:13:8d:3f
> > > > > nfe0: [FAST]
> > > > > pcib2: <ACPI PCI-PCI bridge> at device 11.0 on pci0
> > > > > pci4: <ACPI PCI bus> on pcib2
> > > > > pcib3: <ACPI PCI-PCI bridge> at device 12.0 on pci0
> > > > > pci3: <ACPI PCI bus> on pcib3
> > > > > pcib4: <ACPI PCI-PCI bridge> at device 13.0 on pci0
> > > > > pci2: <ACPI PCI bus> on pcib4
> > > > > pcib5: <ACPI PCI-PCI bridge> at device 14.0 on pci0
> > > > > pci1: <ACPI PCI bus> on pcib5
> > > > > nvidia0: <GeForce 7900 GT/GTO> port 0xa000-0xa07f mem
> > > > > 0xd0000000-0xd0ffffff,0xc0 000000-0xcfffffff,0xd1000000-0xd1ffffff
> > > > > irq 18 at device 0.0 on pci1 nvidia0: [GIANT-LOCKED]
> > > > > acpi_tz0: <Thermal Zone> on acpi0
> > > > > fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2
> > > > > on acpi0 fdc0: [FAST]
> > > > > fd0: <1440-KB 3.5" drive> on fdc0 drive 0
> > > > > sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags
> > > > > 0x10 on acpi0 sio0: type 16550A
> > > > > ppc0: <Standard parallel printer port> port 0x378-0x37f irq 7 on
> > > > > acpi0 ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
> > > > > ppbus0: <Parallel port bus> on ppc0
> > > > > lpt0: <Printer> on ppbus0
> > > > > lpt0: Interrupt-driven port
> > > > > ppi0: <Parallel I/O> on ppbus0
> > > > > atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on
> > > > > acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0
> > > > > atkbd0: [GIANT-LOCKED]
> > > > > psm0: <PS/2 Mouse> irq 12 on atkbdc0
> > > > > psm0: [GIANT-LOCKED]
> > > > > psm0: model IntelliMouse, device ID 3
> > > > > pmtimer0 on isa0
> > > > > sc0: <System console> at flags 0x100 on isa0
> > > > > sc0: VGA <16 virtual consoles, flags=0x300>
> > > > > 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 Timecounter "TSC" frequency 1809282513 Hz quality 800
> > > > > Timecounters tick every 1.000 msec
> > > > > ad0: 238475MB <HDS722525VLAT80 V36OA6MA> at ata0-master UDMA100
> > > > > acd0: DVDR <ASUS DRW-1608P/1.59> at ata1-master UDMA66
> > > > > ad1: 190782MB <Seagate ST3200822AS 3.01> at ata5-master SATA150
> > > > > Trying to mount root from ufs:/dev/ad0s2a
> > > > > ath0: link state changed to UP
> > > > > nfe0: link state changed to UP
> > > > > umass0: vendor 0x0457 USB Mass Storage Device, rev 2.00/1.00, addr
> > > > > 2 da0 at umass-sim0 bus 0 target 0 lun 0
> > > > > da0: <USB 2.0 Flash Disk 0.00> Removable Direct Access SCSI-2
> > > > > device da0: 40.000MB/s transfers
> > > > > da0: 3920MB (8028160 512 byte sectors: 255H 63S/T 499C)
> > > >
> > > > This is maybe a SCSI problem.
> > > >
> > > > If you install the new USB stack [the SVN version], see:
> > > >
> > > > http://www.turbocat.net/~hselasky/usb4bsd
> > > >
> > > > Then try to copy some files and turn on debugging:
> > > >
> > > > sysctl hw.usb.umass.debug=-1
> > > >
> > > > You might get a lot of messages. Look for errors.
> > >
> > > No, it is standard kernel from RELENG_6_2 branch, usb stack is not
> > > modified.
> >
> > You have to compile a new USB kernel with "options USB_DEBUG". My new USB
> > stack has that flag set by default.
>
> Recompiled kernel with makeoptions DEBUG=-DUSB_DEBUG
> # sysctl hw.usb
> hw.usb.ehci.debug: 1
> hw.usb.ohci.debug: 1
> hw.usb.ugen.debug: 1
> hw.usb.uhci.debug: 1
> hw.usb.uhci.loop: 0
> hw.usb.uhid.debug: 0
> hw.usb.uhub.debug: 0
> hw.usb.ukbd.debug: 0
> hw.usb.ulpt.debug: 0
> hw.usb.umass.debug: 1
> hw.usb.ums.debug: 0
> hw.usb.debug: 1
>
> ehci_pcd: change=0x02
> ehci after reset, status=0x00001005
> ehci port 1 reset, status = 0x00001005
> usbd_new_device bus=0xc3b51000 port=1 depth=1 speed=3
> usbd_new_device: adding unit addr=2, rev=200, class=0, subclass=0,
> protocol=0, maxpacket=64, len=18, speed=3
> usbd_new_device: new dev (addr 2), dev=0xc4c35900, parent=0xc3b3f900
> usbd_probe_and_attach: trying device specific drivers
> usbd_probe_and_attach: no device specific driver found
> usbd_probe_and_attach: looping over 1 configurations
> usbd_set_config_index: (addr 1) cno=2 attr=0x80, selfpowered=0, power=98
> usbd_set_config_index: set config 1
> umass0: vendor 0x0457 USB Mass Storage Device, rev 2.00/1.00, addr 2
> umass0: SCSI over Bulk-Only; quirks = 0x0000
> umass0:0:0:-1: Attached to scbus0
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <USB 2.0 Flash Disk 0.00> Removable Direct Access SCSI-2 device
> da0: 40.000MB/s transfers
> da0: 3920MB (8028160 512 byte sectors: 255H 63S/T 499C)
> umass0: BBB reset failed, IOERROR
> ehci_device_clear_toggle: epipe=0xc4c35180 status=0x80008d00
> usbd_dump_pipe: pipe=0xc4c35180
> usbd_dump_iface: iface=0xc40bb020
> device=0xc4c35900 idesc=0xc433fe09 index=0 altindex=0 priv=0
> usbd_dump_device: dev=0xc4c35900
> bus=0xc3b51000 default_pipe=0xc4c35800
> address=2 config=1 depth=1 speed=3 self_powered=0 power=98 langid=1033
> usbd_dump_endpoint: endp=0xc3d12dcc
> edesc=0xc433fe19 refcnt=1
> bEndpointAddress=0x82
> (usbd_dump_pipe:)
> refcnt=1 running=0 aborting=0
> intrxfer=0, repeat=0, interval=-1
> umass0: BBB bulk-in clear stall failed, IOERROR
> ehci_device_clear_toggle: epipe=0xc4c35000 status=0x801f8049
> usbd_dump_pipe: pipe=0xc4c35000
> usbd_dump_iface: iface=0xc40bb020
> device=0xc4c35900 idesc=0xc433fe09 index=0 altindex=0 priv=0
> usbd_dump_device: dev=0xc4c35900
> bus=0xc3b51000 default_pipe=0xc4c35800
> address=2 config=1 depth=1 speed=3 self_powered=0 power=98 langid=1033
> usbd_dump_endpoint: endp=0xc3d12dc0
> edesc=0xc433fe12 refcnt=1
> bEndpointAddress=0x01
> (usbd_dump_pipe:)
> refcnt=1 running=0 aborting=0
> intrxfer=0, repeat=0, interval=-1
> umass0: BBB bulk-out clear stall failed, IOERROR
> umass0: BBB reset failed, IOERROR
> ehci_device_clear_toggle: epipe=0xc4c35180 status=0x8d00
> usbd_dump_pipe: pipe=0xc4c35180
> usbd_dump_iface: iface=0xc40bb020
> device=0xc4c35900 idesc=0xc433fe09 index=0 altindex=0 priv=0
> usbd_dump_device: dev=0xc4c35900
> bus=0xc3b51000 default_pipe=0xc4c35800
> address=2 config=1 depth=1 speed=3 self_powered=0 power=98 langid=1033
> usbd_dump_endpoint: endp=0xc3d12dcc
> edesc=0xc433fe19 refcnt=1
> bEndpointAddress=0x82
> (usbd_dump_pipe:)
> refcnt=1 running=0 aborting=0
>
> IOERROR on mount, so I have to turn of debug, unplug and plug usbdrive,
> mount it and turn on debug. On file copying there were no kernel messages.

It looks like your UMASS device does not like to be started with a BBB reset 
command. Is it possible for you to try out the new USB stack?

--HPS


More information about the freebsd-usb mailing list