From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 30 09:28:20 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF8DD16A41F; Tue, 30 Aug 2005 09:28:20 +0000 (GMT) (envelope-from freebsd@rea.mbslab.kiae.ru) Received: from rea.mbslab.kiae.ru (rea.mbslab.kiae.ru [144.206.177.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 415EC43D48; Tue, 30 Aug 2005 09:28:20 +0000 (GMT) (envelope-from freebsd@rea.mbslab.kiae.ru) Received: from rea.mbslab.kiae.ru (localhost [127.0.0.1]) by rea.mbslab.kiae.ru (Postfix) with ESMTP id 80236BC58; Tue, 30 Aug 2005 13:28:18 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id 575B9BABE; Tue, 30 Aug 2005 13:28:18 +0400 (MSD) Date: Tue, 30 Aug 2005 13:28:18 +0400 From: "Eygene A. Ryabinkin" To: freebsd-usb@freebsd.org Message-ID: <20050830092818.GD881@rea.mbslab.kiae.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: hackers@freebsd.org Subject: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 09:28:21 -0000 Good day. I am observing very low umass performance: when I am trying to move a large file from/to my USB 2.0 flash that is plugged into the USB 2.0 port: transfer starts fine at 3.5 Mb/sec, but after some 20 Mbytes it hangs and the process (dd) stay in the wdrain state. The activity LED on the flash shows no activity. Operations do continue, but very slow and the most time of the copying process spends in the wdrain state. All attempts to invoke `sync` or to see the file state via `ls` are hanging until `dd` leaves the wdrain state. It does not matter what flash is used: I tried Apacer and the Kingmax ones -- the result is the same. If I plug the flash into the USB 1.1 port and trying to move some data -- it works fine, no hangs. Speed is 500 Kb/sec. Seems like others do have this problem: http://lists.freebsd.org/pipermail/freebsd-usb/2005-May/001052.html USB 2.0 controller is Promise PCI (NEC chipset), USB 1.1 chipset is onboard VIA. My dmesg output is: ----- Copyright (c) 1992-2005 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 5.4-STABLE #2: Tue Aug 30 11:34:26 MSD 2005 XXXXXXXX:/usr/src/sys/i386/compile/GENERIC ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (1004.52-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x383fbff real memory = 2147467264 (2047 MB) avail memory = 2096017408 (1998 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 3 cpu1 (AP): APIC ID: 0 ioapic0 irqs 0-23 on motherboard acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0 cpu0: on acpi0 cpu1: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xfe000000-0xfe7fffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 drm0: port 0xd800-0xd8ff mem 0xdf000000-0xdf00ffff,0xf0000000-0xf7ffffff irq 16 at device 0.0 on pci1 info: [drm] AGP at 0xfe000000 8MB info: [drm] Initialized radeon 1.11.0 20020828 on minor 0 pci1: at device 0.1 (no driver attached) isab0: at device 4.0 on pci0 isa0: on isab0 atapci0: port 0xb800-0xb80f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 4.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 uhci0: port 0xb400-0xb41f irq 5 at device 4.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xb000-0xb01f irq 5 at device 4.3 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered pcm0: port 0xa800-0xa83f irq 19 at device 9.0 on pci0 pcm0: pci0: at device 9.2 (no driver attached) pci0: at device 10.0 (no driver attached) pci0: at device 10.1 (no driver attached) ehci0: mem 0xdc000000-0xdc0000ff irq 16 at device 10.2 on pci0 usb2: EHCI version 1.0 usb2: wrong number of companions (2 != 0) usb2: on ehci0 usb2: USB revision 2.0 uhub2: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub2: 5 ports with 5 removable, self powered umass0: vendor 0x1005 USB FLASH DRIVE, rev 2.00/0.84, addr 2 em0: port 0xa000-0xa03f mem 0xdb000000-0xdb01ffff,0xdb800000-0xdb81ffff irq 17 at device 11.0 on pci0 em0: Ethernet address: 00:07:e9:09:5a:82 em0: Speed:N/A Duplex:N/A atapci1: port 0x9000-0x907f,0x9400-0x940f,0x9800-0x983f mem 0xda000000-0xda01ffff,0xda800000-0xda800fff irq 19 at device 13.0 on pci0 atapci1: failed: rid 0x20 is memory, requested 4 ata2: channel #0 on atapci1 ata3: channel #1 on atapci1 ata4: channel #2 on atapci1 fdc0: port 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0 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 sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 psm0: irq 12 on atkbdc0 psm0: model IntelliMouse, device ID 3 npx0: on motherboard npx0: INT 16 interface orm0: at iomem 0xcc000-0xcd7ff,0xc0000-0xcafff on isa0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 fb0 at vga0 ulpt0: Xerox Corporation Xerox Phaser 3130, rev 2.00/1.00, addr 2, iclass 7/1 ulpt0: using bi-directional mode Timecounters tick every 1.000 msec ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to deny, logging limited to 1000 packets/entry by default ad0: 76319MB [155061/16/63] at ata0-master UDMA100 acd0: DVDR at ata0-slave PIO4 ad2: 114498MB [232632/16/63] at ata1-master UDMA100 ad4: 114498MB [232632/16/63] at ata2-master SATA150 SMP: AP CPU #1 Launched! da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 247MB (506880 512 byte sectors: 64H 32S/T 247C) cd0 at ata0 bus 0 target 1 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 16.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Mounting root from ufs:/dev/ad0s1a em0: Link is up 100 Mbps Full Duplex info: [drm] Loading R200 Microcode ----- -- rea