From owner-freebsd-usb@FreeBSD.ORG Mon Aug 29 11:02:28 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2DFE16A41F for ; Mon, 29 Aug 2005 11:02:28 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6CFE43D73 for ; Mon, 29 Aug 2005 11:02:21 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7TB2LXc021695 for ; Mon, 29 Aug 2005 11:02:21 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7TB2KC7021689 for freebsd-usb@freebsd.org; Mon, 29 Aug 2005 11:02:20 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 29 Aug 2005 11:02:20 GMT Message-Id: <200508291102.j7TB2KC7021689@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 11:02:28 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2002/07/19] usb/40792 usb signals lead to data loss on device ugen o [2002/12/10] usb/46176 usb [panic] umass causes kernel panic if devi o [2002/12/19] i386/46371 usb USB controller cannot be initialized on I o [2003/09/26] bin/57255 usb usbd and multi-function devices f [2003/12/11] usb/60131 usb [usb] Page fault on disconnect of USB dev s [2003/12/15] usb/60276 usb [usb] Kernel panic when plugging in USB ( o [2004/01/20] usb/61627 usb [usb] [patch] New USB printer not support f [2004/01/30] usb/62088 usb [usb] Logitech Cordless/Optical Mouse not f [2004/03/01] usb/63621 usb [usb] USB MemoryStick Reader stalls/crash o [2004/07/13] usb/69006 usb [patch] Apple Cinema Display hangs USB po o [2004/08/30] usb/71155 usb [usb] misbehaving usb-printer hangs proce o [2004/10/30] usb/73307 usb [panic] Kernel panics on USB disconnect o [2004/12/30] usb/75648 usb [panic] panic while loading usb.ko on 4.1 o [2005/01/01] usb/75705 usb [panic] da0 attach / Optio S4 (with backt o [2005/01/04] usb/75797 usb 5.3-STABLE(2005 1/4) detect USB headset, o [2005/01/13] usb/76204 usb panic while using usb attached modem o [2005/01/18] usb/76395 usb USB printer does not work, usbdevs says " o [2005/01/21] usb/76554 usb Panram "yoyo" USB MP3 player causes panic o [2005/01/25] usb/76684 usb Toshiba PDR-M4 camera connected via USB h o [2005/02/06] usb/77184 usb kernel panic on USB device disconnect o [2005/02/09] usb/77294 usb ucom + ulpcom panic o [2005/02/16] usb/77604 usb Sluggish Logitch LX700 USB Mouse f [2005/02/20] usb/77799 usb [panic] on attach of a mp3 player to USB o [2005/02/23] usb/77940 usb [patch] [panic] insertion of usb keyboard o [2005/03/18] usb/78989 usb please add USB keyboard support to instal o [2005/03/22] usb/79140 usb WD Firewire/USB Combo hangs under load on o [2005/03/27] usb/79269 usb USB ohci da0 plug/unplug causes crashes a o [2005/03/27] usb/79287 usb UHCI hang after interrupt transfer o [2005/04/02] usb/79436 usb Panic: ohci_abort_xfer: not in process co o [2005/04/04] usb/79524 usb printing to Minolta PagePro 1[23]xxW via o [2005/04/07] usb/79656 usb [usb] RHSC interrupts lost o [2005/04/09] usb/79722 usb [usb] wrong alignments in ehci.h o [2005/04/17] usb/80040 usb [hang] Use of sound mixer causes system f o [2005/04/22] usb/80260 usb Travan USB tape drive fails to write o [2005/04/26] usb/80361 usb mounting of usb-stick fails o [2005/04/26] usb/80373 usb usb keyboard does not respond o [2005/05/04] usb/80628 usb recent USB MFCs cause panics o [2005/05/06] usb/80685 usb panic in usb_cold_explore() at begining o [2005/05/09] usb/80829 usb possible panic when loading USB-modules o [2005/05/10] usb/80862 usb USB locking issues o [2005/05/20] usb/81308 usb Polling a ugen(4) control endpoint causes o [2005/05/26] usb/81524 usb panic: usb_cold_explore: busses to explor f [2005/06/01] usb/81774 usb 2nd generation iPod mini cannot be mounte o [2005/06/13] usb/82198 usb Panic on attaching of ONKI N-338 USB MP3 o [2005/06/15] usb/82272 usb Can not recognize Casio camera EX-Z40 as o [2005/06/22] usb/82520 usb Reboot when USL101 connected o [2005/06/26] usb/82660 usb EHCI: I/O stuck in state 'physrd'/panic o [2005/07/16] usb/83563 usb Page Fault while detaching Mpman Usb devi o [2005/07/18] usb/83677 usb [usb] usb controller not detected o [2005/07/19] usb/83756 usb Microsoft Intellimouse Explorer 4.0A does o [2005/07/23] usb/83942 usb [patch] QUIRK: Langel USB flash mp3 playe o [2005/07/24] usb/83977 usb [panic] ucom1: open bulk out error (addr o [2005/07/29] usb/84295 usb Install FreeBSD with usb keyboard need st o [2005/07/30] usb/84336 usb [usb] [reboot] instant system reboot when o [2005/08/15] usb/84936 usb install - usb keyboard not recognized 55 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/09/30] conf/30929 usb [patch] use usbd to initialize USB ADSL m o [2001/12/09] kern/32652 usb [patch] A new ioctl to uscanner s [2001/12/09] ports/32653 usb Added patches to improve USB scanner supp o [2002/07/24] usb/40948 usb [usb] USB HP CDW8200 does not work o [2002/08/07] usb/41415 usb [usb] [patch] Some USB scanners cannot ta o [2003/02/16] bin/48342 usb [PATCH] usbd dynamic device list. o [2003/05/08] kern/51958 usb [usb] [patch] update for urio driver o [2003/05/10] kern/52026 usb [usb] feature request: umass driver suppo o [2003/06/08] usb/53025 usb [PATCH] ugen does not allow O_NONBLOCK fo o [2003/08/28] usb/56095 usb [patch] QUIRK: Apacer Pen Drive fails to o [2003/11/11] usb/59169 usb [patch] ulpt is missing read operation o [2003/12/15] usb/60248 usb [patch] Problem with USB printer HP Laser o [2004/01/12] bin/61234 usb [usb] [patch] usbhidaction doesn't suppor o [2004/03/06] usb/63837 usb [patch] USB: hid_is_collection() only loo o [2004/04/11] usb/65436 usb QUIRK: [patch] to add support for PNY Att o [2004/04/19] kern/65769 usb [usb] Call to tcflush(x, TCIFLUSH) stops f [2004/05/11] kern/66547 usb [usb] Palm Tungsten T USB does not initia o [2004/06/23] usb/68232 usb [patch] ugen(4) isochronous handling corr o [2004/06/27] usb/68412 usb [usb] [patch] QUIRK: Philips KEY013 USB M o [2004/08/16] usb/70523 usb [usb] [patch] umct sending/receiving wron o [2004/08/25] usb/70942 usb [usb] Genius Wireless USB mouse: moused d o [2004/09/06] usb/71416 usb [usb] Cryptoflex e-gate USB token (ugen0) o [2004/09/06] usb/71417 usb [usb] Cryptoflex e-gate USB token (ugen0) o [2004/09/07] usb/71455 usb [usb] Slow USB umass performance of 5.3 o [2004/09/11] kern/71605 usb [usb] [patch] umass doesn't recognize mul o [2004/10/05] usb/72344 usb [patch] [usb] QUIRK: Dane-Elec zMate 512 o [2004/10/06] i386/72380 usb [usb] USB does not work [dual Celeron Abi o [2004/10/15] usb/72732 usb [patch] Kyocera 7135 quirk. o [2004/10/15] usb/72733 usb Kyocera 7135 Palm OS connection problem. o [2004/10/23] usb/73056 usb [usb] Sun Microsystems Type 6 USB mouse n o [2004/11/21] usb/74211 usb USB flash drive causes CAM status 0x4 on o [2004/11/25] usb/74358 usb [umass] unplugging at boot time an umass o [2004/11/27] usb/74453 usb Q-lity CD-RW USB ECW-043 (ScanLogic SL11R o [2004/11/30] usb/74557 usb imation 500mb usb key can only be written o [2004/12/02] usb/74609 usb [patch] [usb] allowing cdma modems to wor o [2004/12/09] usb/74880 usb [patch] [usb] Samsung N400 cellphone/acm o [2004/12/12] usb/74989 usb (regression) Lost USB support between 5.2 o [2004/12/28] usb/75578 usb [patch] QUIRK: PNY USB flash key o [2005/01/04] usb/75800 usb ucom1: init failed STALLED error in time o [2005/01/07] usb/75928 usb Cytronix SmartMedia card (SMC) reader has o [2005/01/19] usb/76461 usb disklabel of umass(4)-CAM(4)-da(4) not us o [2005/01/27] usb/76732 usb Mouse problems with USB KVM Switch o [2005/03/03] usb/78371 usb Philips Wearable Audio Player (128) fails o [2005/03/07] usb/78543 usb [patch] Support for Trip-Lite USB 2 Seria o [2005/03/18] usb/78984 usb Creative MUVO umass failure o [2005/04/09] usb/79723 usb [usb] prepare for high speed isochronous o [2005/04/09] usb/79725 usb [patch] [usb] USB device speed is not dou o [2005/04/14] usb/79893 usb New usbdevs/umass quirks derived from Lin o [2005/04/16] usb/80010 usb Add support for the AEI USB to LAN adapte o [2005/04/27] usb/80383 usb [PATCH] Add quirk for uhid to ignore cert o [2005/04/27] usb/80420 usb atapicam stops iPod functionality o [2005/05/08] usb/80773 usb "usbd_get_string()" could have taken a le o [2005/05/08] usb/80774 usb have "usbd_find_desc" in line with the ot o [2005/05/08] usb/80776 usb UDAV device driver shouldn't use usb_add_ o [2005/05/08] usb/80777 usb usb_rem_task() should wait for callback t o [2005/05/10] usb/80854 usb suggestion for new iface-no-probe mechani o [2005/05/12] usb/80935 usb uvisor.c is not work with CLIE TH55. o [2005/05/15] usb/81073 usb [patch] fix umass NO_GETMAXLUN quirk o [2005/05/18] usb/81191 usb Support for Curitel HX-550C USB modem to o [2005/05/29] usb/81621 usb external hd hangs under load on ehci o [2005/05/30] usb/81656 usb umass problem with Minolta DiMage S414 Di o [2005/06/20] usb/82436 usb [patch] USL101 Host-to-Host bridge suppor o [2005/06/30] usb/82839 usb [patch] add support for Aceeca Mez1000 de o [2005/07/05] usb/83022 usb ALI USB 2.0 EHCI Controller is not detect o [2005/07/12] usb/83353 usb [patch] ums driver limits number of butto o [2005/07/15] usb/83504 usb SpeedTouch USB stop working on recent cur o [2005/07/21] usb/83863 usb Communication problem between opensc/open o [2005/08/06] usb/84608 usb Sony digital camera DSC-P100, rev 2.00/5. o [2005/08/18] usb/85067 usb Cannot attach ScanJet 4300C to usb device 69 problems total. From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 09:28:20 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@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-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB 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 From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 12:34:14 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CD4216A41F; Tue, 30 Aug 2005 12:34:14 +0000 (GMT) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 541A743D45; Tue, 30 Aug 2005 12:34:12 +0000 (GMT) (envelope-from eugen@kuzbass.ru) Received: from kuzbass.ru (kost [213.184.65.82]) by www.svzserv.kemerovo.su (8.13.3/8.13.3) with ESMTP id j7UCY7qr071282; Tue, 30 Aug 2005 20:34:08 +0800 (KRAST) (envelope-from eugen@kuzbass.ru) Message-ID: <4314523D.79926C81@kuzbass.ru> Date: Tue, 30 Aug 2005 20:34:05 +0800 From: Eugene Grosbein Organization: SVZServ X-Mailer: Mozilla 4.8 [en] (Win98; U) X-Accept-Language: ru,en MIME-Version: 1.0 To: "Eygene A. Ryabinkin" References: <20050830092818.GD881@rea.mbslab.kiae.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 12:34:14 -0000 "Eygene A. Ryabinkin" wrote: > > 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. What is filesystem has your USB drive? FreeBSD 4.x had very low performance with FAT filesystem, writing process spent lots of time in the wdrain state too. Eugene From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 12:50:37 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71AB916A41F; Tue, 30 Aug 2005 12:50:37 +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 0675343D46; Tue, 30 Aug 2005 12:50:36 +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 32AA7BB0A; Tue, 30 Aug 2005 16:50:32 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id F30DFBAD0; Tue, 30 Aug 2005 16:50:31 +0400 (MSD) Date: Tue, 30 Aug 2005 16:50:31 +0400 From: "Eygene A. Ryabinkin" To: Eugene Grosbein Message-ID: <20050830125031.GA775@rea.mbslab.kiae.ru> References: <20050830092818.GD881@rea.mbslab.kiae.ru> <4314523D.79926C81@kuzbass.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4314523D.79926C81@kuzbass.ru> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 12:50:37 -0000 > > What is filesystem has your USB drive? The one I was extensively testing has FAT, but I've checked the UFS2 -- just a bit better -- 1.8 Mb/second. But you're right -- no wdrains at all. > FreeBSD 4.x had very low performance with FAT filesystem, > writing process spent lots of time in the wdrain state too. Yes, it has. But here the same flash drive gives different results for ehci and uhci devices, and the total speed of echi is lower due to wdrains: 300 Kb/sec versus 500 Kb/sec. And I sometimes write my data to the Windows partition with FAT to my home HDD -- it has no wdrains. At least, I've not noticed them. For flash I can. -- rea From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 17:47:44 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2895A16A41F for ; Tue, 30 Aug 2005 17:47:44 +0000 (GMT) (envelope-from tomdean@speakeasy.org) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0DD843D48 for ; Tue, 30 Aug 2005 17:47:43 +0000 (GMT) (envelope-from tomdean@speakeasy.org) Received: (qmail 20002 invoked from network); 30 Aug 2005 17:47:43 -0000 Received: from dsl081-020-229.sea1.dsl.speakeasy.net (HELO asus.tddhome) ([64.81.20.229]) (envelope-sender ) by mail22.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 30 Aug 2005 17:47:43 -0000 Received: from asus.tddhome (localhost.tddhome [127.0.0.1]) by asus.tddhome (8.13.3/8.12.11) with ESMTP id j7UHpGuf000861; Tue, 30 Aug 2005 10:51:16 -0700 (PDT) (envelope-from tomdean@speakeasy.org) Received: (from tomdean@localhost) by asus.tddhome (8.13.3/8.12.11/Submit) id j7UHpCt8000858; Tue, 30 Aug 2005 10:51:12 -0700 (PDT) (envelope-from tomdean@speakeasy.org) Date: Tue, 30 Aug 2005 10:51:12 -0700 (PDT) Message-Id: <200508301751.j7UHpCt8000858@asus.tddhome> X-Authentication-Warning: asus.tddhome: tomdean set sender to tomdean@speakeasy.org using -f From: User Tomdean To: ticso@cicely.de In-reply-to: <20050826112422.GY37930@cicely12.cicely.de> (message from Bernd Walter on Fri, 26 Aug 2005 13:24:23 +0200) References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826093914.GV37930@cicely12.cicely.de> <20050826112422.GY37930@cicely12.cicely.de> Cc: freebsd-usb@freebsd.org Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 17:47:44 -0000 Sorry this is long, I have attached the code at the bottom. ucom_read.c is the FreeBSD code. UMP2_send.c is the AVR code. # kldload ucom # kldload uftdi power up UMP2 and AVR In dmesg, I see ucom0: FTDI USB HS Serial Converter, rev 1.10/2.00, addr 2 With a scope, on the USB_DATA+ line, I see groups of 3 uSec activity, every 1 mSec. Within the groups, I see 100 nSec pulses, or a 10 mBit rate. # ./ucom_read With a scope, on the USB_DATA+ line, I see activity every 1 mSec. But, the AVR has groups of activity every 2 mSEC! Just before the 52 uSec of activity caused by the AVR, I see a 3 uSec group of activity. So, the USB bus has its normal 3 uSec activity every 1 mSec overlayed by 52 uSec of AVR activity every 2 mSec. So, ucom_read only gets the USB bus every 2 msec. The AVR send loop takes 0.9 to 1.1 uSec. These happen in bursts of 74 uSec every 2 mSec. The AVR waits for the UMP2 TX ready signal most of the time. >From looking at the USB_DATA+ line and the UMP2 *TXE signal, the *TXE signal is not true until the buffer is empty. The doc states 'If this signal is log.1, the buffer is full'. 10 mSec --+---------+---------+---------+--------- USB --1---------123-------1---------123------ *TXE ---------------4-------------------4----- 1 - 3 uSec USB activity from FreeBSD 2 - 10 uSec gap 3 - 52 uSec USB activity from the UMP2 4 - 72 uSec activity on the *TXE line, high otherwise. The nominal return from the FreeBSD read is 62 bytes. The UMP2 has a FT8U245BM chip, which has a 384 byte transmit buffer. The output from ucom_read, Read 1000060 bytes in 32.242824 seconds in chuncks of 62 bytes This is a thruput of 31017 bytes/second. Does FreeBSD only request 64 bytes from the UMP2???? tomdean === ucom_read ========================================================= /* * asus-read.c - read ucom0, doing time measurements * * $Id$ */ #include #include /* termios settings */ #include /* open */ #include /* read */ #include /* read */ #include /* read */ #include /* time */ #define USB_BUF_SIZE 20000 #define BYTES_TO_READ 1000000 /* * Set up ucom's state */ void ucomsetup (int fd) { struct termios termios; tcgetattr (fd, &termios); /* input modes */ termios.c_iflag = (IGNBRK); /* local modes */ termios.c_lflag = 0; /* common modes */ termios.c_cflag = (CLOCAL|HUPCL|CREAD|CS8); /* no parity */ /* since the UMP2 is a USB to parallel device, speed is meaningless */ if (0) termios.c_ispeed = termios.c_ospeed = B9600; if (0) termios.c_ispeed = termios.c_ospeed = B38400; if (0) termios.c_ispeed = termios.c_ospeed = B115200; if (0) termios.c_ispeed = termios.c_ospeed = B230400; if (0) termios.c_ispeed = termios.c_ospeed = B921600; tcsetattr (fd, TCSANOW, &termios); return; } /* * main */ int main(int argc, char **argv) { int fd; /* file descriptor */ int numRead; size_t bytes; uint8_t *buf[USB_BUF_SIZE]; struct timeval start, stop; struct timezone tz; long sec, usec; double elapsed, mb_sec, nsec; if ((fd = open("/dev/ucom0", O_RDONLY)) < 0) { perror("Open /dev/ucom0"); return -1; } /* need to do this */ ucomsetup(fd); numRead = 0; /* * get the start time */ gettimeofday(&start, &tz); /* * read a large number of bytes and keep track of time */ while (numRead < BYTES_TO_READ) { bytes = read(fd, buf, USB_BUF_SIZE); if (0) printf("Read %d bytes\n", bytes); numRead += bytes; } /* * get the end time */ gettimeofday(&stop, &tz); /* * calculate the time, etc. */ sec = stop.tv_sec - start.tv_sec; if (sec < 0) sec++; usec = stop.tv_usec - start.tv_usec; if (usec < 0) { sec--; usec += 1000000L; } elapsed = (double)sec + ((double) usec)/1000000.0; printf("Read %d bytes in %f seconds in chuncks of %d bytes\n", numRead, elapsed, bytes); close(fd); return 0; } == UMP2_send ======================================================== /* * UMP2-send.c - provide loopback for the UMP2 module * * Connections * PORTA * <7> UMP2 RD# =0 to read data * <6> UMP2 WR =1 to write data * <5> UMP2 TXE# =0 TX is available to accept data * <4> UMP2 RXF# =0 RX has data available * <3> UMP2 PWE# =0 if device is configured via USB * <2> * <1> * <0> * PORTB LEDs * <7> Init OK * <6> * <5> * <4> * <3> Wait Tx ready * <2> Wait Rx data * <1> Writing data to UMP2 * <0> Reading data from UMP2 * PORTC * <7:0> UMP2 data * * $Id$ */ #include /* io definitions like PORTB, etc */ #include /* prototypes */ #include /* cli */ #include /* uint8_t, etc */ /* led 0 is the first led, or bit 0 */ /* PORTB is at 0x18 */ #define LED_PORT 0x18 #define LED_ON(n) asm("cbi %0,%1"::"i"(LED_PORT),"i"(n)) #define LED_OFF(n) asm("sbi %0,%1"::"i"(LED_PORT),"i"(n)); /* * UMP2 bit definitions */ #define UMP2_CTL PORTA #define UMP2_CTL_PIN PINA #define UMP2_RD 7 #define UMP2_WR 6 #define UMP2_TXE 5 #define UMP2_RXF 4 #define UMP2_PWE 3 #define UMP2_DATA PORTC #define SET_READ DDRC=0x00 #define SET_WRITE DDRC=0xff int main() { uint8_t c; uint8_t r; asm("cli"); DDRA = (1< X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A6AB16A41F for ; Tue, 30 Aug 2005 18:59:16 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.tele2.se [212.247.155.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id E903643D53 for ; Tue, 30 Aug 2005 18:59:15 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-216-88-128.daxnet.no ([193.216.88.128] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 13770207; Tue, 30 Aug 2005 20:59:13 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Tue, 30 Aug 2005 21:00:09 +0200 User-Agent: KMail/1.7 References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826112422.GY37930@cicely12.cicely.de> <200508301751.j7UHpCt8000858@asus.tddhome> In-Reply-To: <200508301751.j7UHpCt8000858@asus.tddhome> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508302100.12140.hselasky@c2i.net> Cc: ticso@cicely.de Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 18:59:16 -0000 On Tuesday 30 August 2005 19:51, User Tomdean wrote: > Sorry this is long, I have attached the code at the bottom. > ucom_read.c is the FreeBSD code. UMP2_send.c is the AVR code. > > # kldload ucom > # kldload uftdi > power up UMP2 and AVR > In dmesg, I see > ucom0: FTDI USB HS Serial Converter, rev 1.10/2.00, addr 2 > > With a scope, on the USB_DATA+ line, I see groups of 3 uSec activity, > every 1 mSec. Within the groups, I see 100 nSec pulses, or a 10 mBit > rate. > > # ./ucom_read > > With a scope, on the USB_DATA+ line, I see activity every 1 mSec. > But, the AVR has groups of activity every 2 mSEC! Just before the 52 > uSec of activity caused by the AVR, I see a 3 uSec group of activity. > So, the USB bus has its normal 3 uSec activity every 1 mSec overlayed > by 52 uSec of AVR activity every 2 mSec. So, ucom_read only gets the > USB bus every 2 msec. > > The AVR send loop takes 0.9 to 1.1 uSec. These happen in bursts of 74 > uSec every 2 mSec. The AVR waits for the UMP2 TX ready signal most of > the time. > > >From looking at the USB_DATA+ line and the UMP2 *TXE signal, the *TXE > > signal is not true until the buffer is empty. The doc states 'If this > signal is log.1, the buffer is full'. > > 10 mSec --+---------+---------+---------+--------- > USB --1---------123-------1---------123------ > *TXE ---------------4-------------------4----- > > > 1 - 3 uSec USB activity from FreeBSD > 2 - 10 uSec gap > 3 - 52 uSec USB activity from the UMP2 > 4 - 72 uSec activity on the *TXE line, high otherwise. > > The nominal return from the FreeBSD read is 62 bytes. The UMP2 has a > FT8U245BM chip, which has a 384 byte transmit buffer. > > The output from ucom_read, > > Read 1000060 bytes in 32.242824 seconds in chuncks of 62 bytes > > This is a thruput of 31017 bytes/second. > > Does FreeBSD only request 64 bytes from the UMP2???? cat /sys/dev/usb/uftdi.c | more ... #define UFTDIIBUFSIZE 64 ^^^ 64 bytes every 2 ms = 32000bytes/second Maybe you can increase this value, but I am not sure if the driver supports it. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 19:09:03 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 660C316A41F; Tue, 30 Aug 2005 19:09:03 +0000 (GMT) (envelope-from iedowse@iedowse.com) Received: from nowhere.iedowse.com (nowhere.iedowse.com [82.195.144.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 993B743D45; Tue, 30 Aug 2005 19:09:02 +0000 (GMT) (envelope-from iedowse@iedowse.com) Received: from localhost ([127.0.0.1] helo=iedowse.com) by nowhere.iedowse.com via local-iedowse id ; 30 Aug 2005 20:09:00 +0100 (IST) To: "Eygene A. Ryabinkin" In-Reply-To: Your message of "Tue, 30 Aug 2005 16:50:31 +0400." <20050830125031.GA775@rea.mbslab.kiae.ru> Date: Tue, 30 Aug 2005 20:08:57 +0100 From: Ian Dowse Message-ID: <200508302009.aa99975@nowhere.iedowse.com> Cc: hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 19:09:03 -0000 In message <20050830125031.GA775@rea.mbslab.kiae.ru>, "Eygene A. Ryabinkin" wri tes: >> >> What is filesystem has your USB drive? > The one I was extensively testing has FAT, but I've checked the UFS2 -- >just a bit better -- 1.8 Mb/second. But you're right -- no wdrains at all. >> FreeBSD 4.x had very low performance with FAT filesystem, >> writing process spent lots of time in the wdrain state too. > Yes, it has. But here the same flash drive gives different results for >ehci and uhci devices, and the total speed of echi is lower due to wdrains: >300 Kb/sec versus 500 Kb/sec. And I sometimes write my data to the Windows >partition with FAT to my home HDD -- it has no wdrains. At least, I've not >noticed them. For flash I can. The patch in from the email below may help with the wdrain state - can you see if it makes any difference? Ian Date: Sun, 26 Jun 2005 17:42:44 BST To: Stefan Walter cc: freebsd-stable@freebsd.org From: Ian Dowse Subject: Re: EHCI: mtools stuck in state 'physrd' or panic OpenBSD have a workaround for problems with VIA EHCI controllers that can cause the hanging symptoms you describe. Below is a patch that implements their change in FreeBSD's driver. Could you try it to see if it helps? Thanks, Ian Index: sys/dev/usb/ehci.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/ehci.c,v retrieving revision 1.14.2.9 diff -u -r1.14.2.9 ehci.c --- sys/dev/usb/ehci.c 31 Mar 2005 19:47:11 -0000 1.14.2.9 +++ sys/dev/usb/ehci.c 26 Jun 2005 16:21:11 -0000 @@ -155,6 +155,7 @@ Static void ehci_idone(struct ehci_xfer *); Static void ehci_timeout(void *); Static void ehci_timeout_task(void *); +Static void ehci_intrlist_timeout(void *); Static usbd_status ehci_allocm(struct usbd_bus *, usb_dma_t *, u_int32_t); Static void ehci_freem(struct usbd_bus *, usb_dma_t *); @@ -491,6 +492,7 @@ EOWRITE4(sc, EHCI_ASYNCLISTADDR, sqh->physaddr | EHCI_LINK_QH); usb_callout_init(sc->sc_tmo_pcd); + usb_callout_init(sc->sc_tmo_intrlist); lockinit(&sc->sc_doorbell_lock, PZERO, "ehcidb", 0, 0); @@ -694,6 +696,11 @@ ehci_check_intr(sc, ex); } + /* Schedule a callout to catch any dropped transactions. */ + if ((sc->sc_flags & EHCI_SCFLG_LOSTINTRBUG) && + !LIST_EMPTY(&sc->sc_intrhead)) + usb_callout(sc->sc_tmo_intrlist, hz, ehci_intrlist_timeout, sc); + #ifdef USB_USE_SOFTINTR if (sc->sc_softwake) { sc->sc_softwake = 0; @@ -942,6 +949,7 @@ EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); EOWRITE4(sc, EHCI_USBCMD, 0); EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); + usb_uncallout(sc->sc_tmo_intrlist, ehci_intrlist_timeout, sc); usb_uncallout(sc->sc_tmo_pcd, ehci_pcd_enable, sc); #if defined(__NetBSD__) || defined(__OpenBSD__) @@ -2701,6 +2708,30 @@ splx(s); } + +/* + * Some EHCI chips from VIA seem to trigger interrupts before writing back the + * qTD status, or miss signalling occasionally under heavy load. If the host + * machine is too fast, we we can miss transaction completion - when we scan + * the active list the transaction still seems to be active. This generally + * exhibits itself as a umass stall that never recovers. + * + * We work around this behaviour by setting up this callback after any softintr + * that completes with transactions still pending, giving us another chance to + * check for completion after the writeback has taken place. + */ +void +ehci_intrlist_timeout(void *arg) +{ + ehci_softc_t *sc = arg; + int s = splusb(); + + DPRINTFN(3, ("ehci_intrlist_timeout\n")); + usb_schedsoftintr(&sc->sc_bus); + + splx(s); +} + /************************/ Static usbd_status Index: sys/dev/usb/ehci_pci.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/ehci_pci.c,v retrieving revision 1.14.2.2 diff -u -r1.14.2.2 ehci_pci.c --- sys/dev/usb/ehci_pci.c 13 Jun 2005 09:00:19 -0000 1.14.2.2 +++ sys/dev/usb/ehci_pci.c 26 Jun 2005 16:21:11 -0000 @@ -303,6 +303,10 @@ return ENXIO; } + /* Enable workaround for dropped interrupts as required */ + if (pci_get_vendor(self) == PCI_EHCI_VENDORID_VIA) + sc->sc_flags |= EHCI_SCFLG_LOSTINTRBUG; + /* * Find companion controllers. According to the spec they always * have lower function numbers so they should be enumerated already. Index: sys/dev/usb/ehcivar.h =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/ehcivar.h,v retrieving revision 1.4.2.4 diff -u -r1.4.2.4 ehcivar.h --- sys/dev/usb/ehcivar.h 22 Mar 2005 00:56:54 -0000 1.4.2.4 +++ sys/dev/usb/ehcivar.h 26 Jun 2005 16:21:11 -0000 @@ -93,6 +93,7 @@ #define EHCI_COMPANION_MAX 8 #define EHCI_SCFLG_DONEINIT 0x0001 /* ehci_init() has been called. */ +#define EHCI_SCFLG_LOSTINTRBUG 0x0002 /* workaround for VIA chipsets */ typedef struct ehci_softc { struct usbd_bus sc_bus; /* base device */ @@ -149,6 +150,7 @@ struct lock sc_doorbell_lock; usb_callout_t sc_tmo_pcd; + usb_callout_t sc_tmo_intrlist; device_ptr_t sc_child; /* /dev/usb# device */ From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 20:43:16 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8A7F16A427 for ; Tue, 30 Aug 2005 20:43:16 +0000 (GMT) (envelope-from tomdean@speakeasy.org) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5339843D48 for ; Tue, 30 Aug 2005 20:43:16 +0000 (GMT) (envelope-from tomdean@speakeasy.org) Received: (qmail 1657 invoked from network); 30 Aug 2005 20:43:16 -0000 Received: from dsl081-020-229.sea1.dsl.speakeasy.net (HELO asus.tddhome) ([64.81.20.229]) (envelope-sender ) by mail26.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 30 Aug 2005 20:43:16 -0000 Received: from asus.tddhome (localhost.tddhome [127.0.0.1]) by asus.tddhome (8.13.3/8.12.11) with ESMTP id j7UKknou000631; Tue, 30 Aug 2005 13:46:49 -0700 (PDT) (envelope-from tomdean@speakeasy.org) Received: (from tomdean@localhost) by asus.tddhome (8.13.3/8.12.11/Submit) id j7UKklqR000628; Tue, 30 Aug 2005 13:46:47 -0700 (PDT) (envelope-from tomdean@speakeasy.org) Date: Tue, 30 Aug 2005 13:46:47 -0700 (PDT) Message-Id: <200508302046.j7UKklqR000628@asus.tddhome> X-Authentication-Warning: asus.tddhome: tomdean set sender to tomdean@speakeasy.org using -f From: User Tomdean To: hselasky@c2i.net In-reply-to: <200508302100.12140.hselasky@c2i.net> (message from Hans Petter Selasky on Tue, 30 Aug 2005 21:00:09 +0200) References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826112422.GY37930@cicely12.cicely.de> <200508301751.j7UHpCt8000858@asus.tddhome> <200508302100.12140.hselasky@c2i.net> Cc: ticso@cicely.de, freebsd-usb@freebsd.org Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 20:43:16 -0000 *** sys/dev/usb/uftdi.c.orig Tue Aug 30 13:34:56 2005 --- sys/dev/usb/uftdi.c Tue Aug 30 13:36:46 2005 *************** *** 104,110 **** * These are the maximum number of bytes transferred per frame. * The output buffer size cannot be increased due to the size encoding. */ ! #define UFTDIIBUFSIZE 64 #define UFTDIOBUFSIZE 64 struct uftdi_softc { --- 104,110 ---- * These are the maximum number of bytes transferred per frame. * The output buffer size cannot be increased due to the size encoding. */ ! #define UFTDIIBUFSIZE 384 #define UFTDIOBUFSIZE 64 struct uftdi_softc { # ./ucom_read Read 1000076 bytes in 5.233209 seconds in chunks of 382 bytes or, around 5.25 uSec per byte. This is well within my requirements. Now, data verification... Thanks, tomdean From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 21:10:13 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8504E16A41F for ; Tue, 30 Aug 2005 21:10:13 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id E110343D48 for ; Tue, 30 Aug 2005 21:10:12 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j7ULA4BS015189 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 30 Aug 2005 23:10:07 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j7UL9wKi097159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Aug 2005 23:09:59 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j7UL9wv8095477; Tue, 30 Aug 2005 23:09:58 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j7UL9waY095476; Tue, 30 Aug 2005 23:09:58 +0200 (CEST) (envelope-from ticso) Date: Tue, 30 Aug 2005 23:09:57 +0200 From: Bernd Walter To: Hans Petter Selasky Message-ID: <20050830210957.GS37930@cicely12.cicely.de> References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826112422.GY37930@cicely12.cicely.de> <200508301751.j7UHpCt8000858@asus.tddhome> <200508302100.12140.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200508302100.12140.hselasky@c2i.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de Cc: ticso@cicely.de, freebsd-usb@freebsd.org Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 21:10:13 -0000 On Tue, Aug 30, 2005 at 09:00:09PM +0200, Hans Petter Selasky wrote: > On Tuesday 30 August 2005 19:51, User Tomdean wrote: > > Sorry this is long, I have attached the code at the bottom. > > ucom_read.c is the FreeBSD code. UMP2_send.c is the AVR code. > > > > # kldload ucom > > # kldload uftdi > > power up UMP2 and AVR > > In dmesg, I see > > ucom0: FTDI USB HS Serial Converter, rev 1.10/2.00, addr 2 > > > > With a scope, on the USB_DATA+ line, I see groups of 3 uSec activity, > > every 1 mSec. Within the groups, I see 100 nSec pulses, or a 10 mBit > > rate. > > > > # ./ucom_read > > > > With a scope, on the USB_DATA+ line, I see activity every 1 mSec. > > But, the AVR has groups of activity every 2 mSEC! Just before the 52 > > uSec of activity caused by the AVR, I see a 3 uSec group of activity. > > So, the USB bus has its normal 3 uSec activity every 1 mSec overlayed > > by 52 uSec of AVR activity every 2 mSec. So, ucom_read only gets the > > USB bus every 2 msec. You at least see a start of frame every ms - the rest are packets. A new transmission can be inserted in the next frame and while return of the previous transmission you loose too much time to insert the next transmission within the next frame, so we miss one. The buffer below is just big enoug for a whole USB packets, but we could transmit multiple packets per USB-frame if the tty-Buffer already has enough data. There are some drawback when doing large transmissions, so we shouldn't do bigger transmissions than really required - ideally this would be configureable as well as the receive wait timeout that the FTDI devices have. > > > > The AVR send loop takes 0.9 to 1.1 uSec. These happen in bursts of 74 > > uSec every 2 mSec. The AVR waits for the UMP2 TX ready signal most of > > the time. > > > > >From looking at the USB_DATA+ line and the UMP2 *TXE signal, the *TXE > > > > signal is not true until the buffer is empty. The doc states 'If this > > signal is log.1, the buffer is full'. > > > > 10 mSec --+---------+---------+---------+--------- > > USB --1---------123-------1---------123------ > > *TXE ---------------4-------------------4----- > > > > > > 1 - 3 uSec USB activity from FreeBSD > > 2 - 10 uSec gap > > 3 - 52 uSec USB activity from the UMP2 > > 4 - 72 uSec activity on the *TXE line, high otherwise. > > > > The nominal return from the FreeBSD read is 62 bytes. The UMP2 has a > > FT8U245BM chip, which has a 384 byte transmit buffer. The buffer-size is a different story, because it can be emptied by the consumer while still receiving further packets. Even a buffer size of 124 bytes would be enough for a fast consumer. > > The output from ucom_read, > > > > Read 1000060 bytes in 32.242824 seconds in chuncks of 62 bytes > > > > This is a thruput of 31017 bytes/second. > > > > Does FreeBSD only request 64 bytes from the UMP2???? > > cat /sys/dev/usb/uftdi.c | more > > ... > > #define UFTDIIBUFSIZE 64 > ^^^ 64 bytes every 2 ms = 32000bytes/second > > Maybe you can increase this value, but I am not sure if the driver supports > it. I have patches to increase buffer sizes, but there is nothing you can do about the 2ms delay - that's how USB works - you have to sync with the next USB frame, which is every 1ms. Have to read the original mail to see which is the bootleneck, but the seen bandwidth points very much to this. Return to the buffer sizes - it increases the number of bytes one can send within each frame, just increasing the value is not enough as there are special bytes embedded. My patch was just receiving, but the other direction is pretty much the same - will have to reread an old thread, because Jörg Wunsch had corrected some maths and I have to check if the patch on my disk is the corrected one or the original. The patch was originally done to speed up an AVR-USB-programmer :) -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Tue Aug 30 21:13:16 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDBE116A41F; Tue, 30 Aug 2005 21:13:16 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4035343D45; Tue, 30 Aug 2005 21:13:15 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 780FD1771C; Tue, 30 Aug 2005 18:13:11 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 77763-08; Tue, 30 Aug 2005 18:13:02 -0300 (BRT) Received: from [135.153.2.243] (200-150-191-54.corp.ajato.com.br [200.150.191.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id F067F1771B; Tue, 30 Aug 2005 18:12:59 -0300 (BRT) Message-ID: <4314CBCE.7010405@jonny.eng.br> Date: Tue, 30 Aug 2005 18:12:46 -0300 From: =?UTF-8?B?Sm/Do28gQ2FybG9zIE1lbmRlcyBMdcOtcw==?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Eygene A. Ryabinkin" References: <20050830092818.GD881@rea.mbslab.kiae.ru> In-Reply-To: <20050830092818.GD881@rea.mbslab.kiae.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 21:13:17 -0000 Eygene A. Ryabinkin wrote: > 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: ... > 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 I had exactly this problem with Kingston Data Traveler II+, and apparently completely solved it by adding a kludge to disallow Cache Syncronization. Try it yourself. From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 00:36:21 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7875416A41F for ; Wed, 31 Aug 2005 00:36:21 +0000 (GMT) (envelope-from bbeday@yahoo.com) Received: from web30704.mail.mud.yahoo.com (web30704.mail.mud.yahoo.com [68.142.200.137]) by mx1.FreeBSD.org (Postfix) with SMTP id 0E00E43D48 for ; Wed, 31 Aug 2005 00:36:20 +0000 (GMT) (envelope-from bbeday@yahoo.com) Received: (qmail 64439 invoked by uid 60001); 31 Aug 2005 00:36:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5vA6I2xNgSYqaQyEjWY9MFZu1Np3SqK1x18Xe1Fk5KrUFx3h3w3Syb8itBU/yz37GSaY9Z6/HfCklHqq/wtuv8gTeV2666P24o0W29H9KtCzBIXM77fqrTCz79k4x7QeR4bYvFG47U44X19viX3BC/xW6IVGFqTF90NmUGMAZfw= ; Message-ID: <20050831003620.64437.qmail@web30704.mail.mud.yahoo.com> Received: from [198.169.140.30] by web30704.mail.mud.yahoo.com via HTTP; Tue, 30 Aug 2005 17:36:20 PDT Date: Tue, 30 Aug 2005 17:36:20 -0700 (PDT) From: brad beday To: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: umass/ugen question X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 00:36:21 -0000 Hi I'm new to usb but I was wondering if it is possible to have a device(a samsung mp3 player - mounting a dos filesystem doesn't work, time out errors) use the ugen driver rather than the umass one? I'm kind of a hobbiest junior programmer with to much time on my hands and was wondering if I could attach the ugen driver to the device rather then umass. Could I then mount and cp files to it, or write an application that could write a file to /dev/ugen which would tranfere the file to the player? Is there any documentation out there that could help? Thanks. ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 00:42:29 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9005016A41F for ; Wed, 31 Aug 2005 00:42:29 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24A3543D48 for ; Wed, 31 Aug 2005 00:42:28 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-66-30-115-133.hsd1.ma.comcast.net ([66.30.115.133]) by comcast.net (sccrmhc11) with ESMTP id <2005083100420601100t4p0be>; Wed, 31 Aug 2005 00:42:06 +0000 Received: from c-66-30-115-133.hsd1.ma.comcast.net (localhost.127.in-addr.arpa [127.0.0.1]) by c-66-30-115-133.hsd1.ma.comcast.net (8.13.4/8.13.1) with ESMTP id j7V0g7NO039070; Tue, 30 Aug 2005 20:42:07 -0400 (EDT) (envelope-from rodrigc@c-66-30-115-133.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-66-30-115-133.hsd1.ma.comcast.net (8.13.4/8.13.1/Submit) id j7V0g7od039069; Tue, 30 Aug 2005 20:42:07 -0400 (EDT) (envelope-from rodrigc) Date: Tue, 30 Aug 2005 20:42:07 -0400 From: Craig Rodrigues To: brad beday Message-ID: <20050831004207.GA39042@crodrigues.org> References: <20050831003620.64437.qmail@web30704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050831003620.64437.qmail@web30704.mail.mud.yahoo.com> User-Agent: Mutt/1.5.9i Cc: freebsd-usb@freebsd.org Subject: Re: umass/ugen question X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 00:42:29 -0000 On Tue, Aug 30, 2005 at 05:36:20PM -0700, brad beday wrote: > Hi > I'm new to usb but I was wondering if it is possible > to have a device(a samsung mp3 player - mounting a dos > filesystem doesn't work, time out errors) use the ugen > driver rather than the umass one? I'm kind of a It highly depends on your mp3 player. If your mp3 player implements umass, it is much easier to connect to it and treat it as a disk. I have a Creative Nomad Zen Mp3 player which does not implement umass. There is a library called libnjb ( http://libnjb.sourceforge.net ) which uses ugen on FreeBSD to copy files to the mp3 player. So it can be done, but it highly depends on the mp3 player you have. -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 02:28:36 2005 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 718F416A41F; Wed, 31 Aug 2005 02:28:36 +0000 (GMT) (envelope-from rodrigc@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 303D843D45; Wed, 31 Aug 2005 02:28:36 +0000 (GMT) (envelope-from rodrigc@FreeBSD.org) Received: from freefall.freebsd.org (rodrigc@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7V2SaPZ041459; Wed, 31 Aug 2005 02:28:36 GMT (envelope-from rodrigc@freefall.freebsd.org) Received: (from rodrigc@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7V2Sawr041455; Wed, 31 Aug 2005 02:28:36 GMT (envelope-from rodrigc) Date: Wed, 31 Aug 2005 02:28:36 GMT From: Craig Rodrigues Message-Id: <200508310228.j7V2Sawr041455@freefall.freebsd.org> To: rodrigc@FreeBSD.org, jmg@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: Subject: Re: kern/62309: panic: ugen driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 02:28:36 -0000 Synopsis: panic: ugen driver Responsible-Changed-From-To: jmg->freebsd-usb Responsible-Changed-By: rodrigc Responsible-Changed-When: Wed Aug 31 02:28:15 GMT 2005 Responsible-Changed-Why: Over to FreeBSD USB list http://www.freebsd.org/cgi/query-pr.cgi?pr=62309 From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 05:50:28 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E672D16A41F; Wed, 31 Aug 2005 05:50:28 +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 817D743D49; Wed, 31 Aug 2005 05:50:28 +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 78CA0BB0A; Wed, 31 Aug 2005 09:50:26 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id 4DA6CBB02; Wed, 31 Aug 2005 09:50:26 +0400 (MSD) Date: Wed, 31 Aug 2005 09:50:26 +0400 From: "Eygene A. Ryabinkin" To: Jo??o Carlos Mendes Lu??s Message-ID: <20050831055026.GE1645@rea.mbslab.kiae.ru> References: <20050830092818.GD881@rea.mbslab.kiae.ru> <4314CBCE.7010405@jonny.eng.br> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4314CBCE.7010405@jonny.eng.br> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 05:50:29 -0000 > I had exactly this problem with Kingston Data Traveler II+, and > apparently completely solved it by adding a kludge to disallow Cache > Syncronization. Try it yourself. And the kludge is? -- rea From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 06:29:47 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 209F016A41F; Wed, 31 Aug 2005 06:29:47 +0000 (GMT) (envelope-from rea@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 4270B43D49; Wed, 31 Aug 2005 06:29:46 +0000 (GMT) (envelope-from rea@rea.mbslab.kiae.ru) Received: from rea.mbslab.kiae.ru (localhost [127.0.0.1]) by rea.mbslab.kiae.ru (Postfix) with ESMTP id D4212BC58; Wed, 31 Aug 2005 10:29:44 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id 711C8BABE; Wed, 31 Aug 2005 10:29:43 +0400 (MSD) Date: Wed, 31 Aug 2005 10:29:42 +0400 From: "Eygene A. Ryabinkin" To: Ian Dowse Message-ID: <20050831062942.GA801@rea.mbslab.kiae.ru> References: <20050830125031.GA775@rea.mbslab.kiae.ru> <200508302009.aa99975@nowhere.iedowse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200508302009.aa99975@nowhere.iedowse.com> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 06:29:47 -0000 As Ian Dowse wrote to me at Tue, Aug 30, 2005 at 08:08:57PM +0100: > The patch in from the email below may help with the wdrain state - > can you see if it makes any difference? > No, it does not make any. Mainly because my USB 2.0 controller is NEC-based (not VIA), so LOSTINTRBUG flag is not set. Anyway, thanks for your help! -- rea From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 10:16:17 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E39B916A41F for ; Wed, 31 Aug 2005 10:16:17 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3116743D4C for ; Wed, 31 Aug 2005 10:16:17 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j7VAGBBS029198 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 31 Aug 2005 12:16:14 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j7VAFUKi001903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 31 Aug 2005 12:15:30 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j7VAFTJI099623; Wed, 31 Aug 2005 12:15:29 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j7VAFRnh099622; Wed, 31 Aug 2005 12:15:27 +0200 (CEST) (envelope-from ticso) Date: Wed, 31 Aug 2005 12:15:27 +0200 From: Bernd Walter To: User Tomdean Message-ID: <20050831101526.GX37930@cicely12.cicely.de> References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826112422.GY37930@cicely12.cicely.de> <200508301751.j7UHpCt8000858@asus.tddhome> <200508302100.12140.hselasky@c2i.net> <200508302046.j7UKklqR000628@asus.tddhome> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508302046.j7UKklqR000628@asus.tddhome> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de Cc: ticso@cicely.de, freebsd-usb@freebsd.org Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 10:16:18 -0000 On Tue, Aug 30, 2005 at 01:46:47PM -0700, User Tomdean wrote: > * The output buffer size cannot be increased due to the size encoding. You get wrong data by doing this without further code changes. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 14:38:29 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7FD116A41F for ; Wed, 31 Aug 2005 14:38:29 +0000 (GMT) (envelope-from tomdean@speakeasy.org) Received: from mail24.sea5.speakeasy.net (mail24.sea5.speakeasy.net [69.17.117.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 646CA43D45 for ; Wed, 31 Aug 2005 14:38:29 +0000 (GMT) (envelope-from tomdean@speakeasy.org) Received: (qmail 15107 invoked from network); 31 Aug 2005 14:38:28 -0000 Received: from dsl081-020-229.sea1.dsl.speakeasy.net (HELO asus.tddhome) ([64.81.20.229]) (envelope-sender ) by mail24.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 31 Aug 2005 14:38:28 -0000 Received: from asus.tddhome (localhost.tddhome [127.0.0.1]) by asus.tddhome (8.13.3/8.12.11) with ESMTP id j7VEg3fD006610; Wed, 31 Aug 2005 07:42:03 -0700 (PDT) (envelope-from tomdean@speakeasy.org) Received: (from tomdean@localhost) by asus.tddhome (8.13.3/8.12.11/Submit) id j7VEg2Nu006607; Wed, 31 Aug 2005 07:42:02 -0700 (PDT) (envelope-from tomdean@speakeasy.org) Date: Wed, 31 Aug 2005 07:42:02 -0700 (PDT) Message-Id: <200508311442.j7VEg2Nu006607@asus.tddhome> X-Authentication-Warning: asus.tddhome: tomdean set sender to tomdean@speakeasy.org using -f From: User Tomdean To: ticso@cicely.de In-reply-to: <20050831101526.GX37930@cicely12.cicely.de> (message from Bernd Walter on Wed, 31 Aug 2005 12:15:27 +0200) References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826112422.GY37930@cicely12.cicely.de> <200508301751.j7UHpCt8000858@asus.tddhome> <200508302100.12140.hselasky@c2i.net> <200508302046.j7UKklqR000628@asus.tddhome> <20050831101526.GX37930@cicely12.cicely.de> Cc: freebsd-usb@freebsd.org Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 14:38:29 -0000 I changed the input buffer size. The read reported 382 bytes. The buffer is 6*(4*16)==384 bytes long. On the scope I see 6 distinct groupings in the USB data stream. Looks like ucom/uftdi, or something up the chain, is using 64 bytes anyway. Every 64 bytes, there seem to be 2 bytes not from the data stream. Uftdi.c subtracts 2 from count, giving 382 bytes. tomdean /* * These are the maximum number of bytes transferred per frame. * The output buffer size cannot be increased due to the size encoding. ^^^^^^ */ #define UFTDIIBUFSIZE 384 #define UFTDIOBUFSIZE 64 I sent all 'a' == 0x61. Using gdb, (gdb) p/x buf $5 = {0x61616161 , 0x60316161, 0x61616161 , 0x60316161, 0x61616161 , 0x60316161, 0x61616161 , 0x60316161, 0x61616161 , 0x60316161, 0x61616161 , 0x6161, ^^^^ 382 bytes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0x0 , 0x28052842, 0x0, 0x0, 0x0, 0x280695d8, 0xe8, 0x2813bda4, 0xbfbfe11c, 0x28052d83, 0xe8, 0x0, 0x2813c000, 0x14000, 0x28070100, 0x280695d8, 0x2813bda4, 0x28052d61, 0x28070100, 0x0, 0xe8, 0x28052d42, 0x280695d8, 0xbfbfe170, 0xbfbfe15c, 0x280527c1, 0xe8, 0x14000, 0x3, 0x1012, 0xffffffff, 0x280695d8, 0xbfbfe1cc, 0x28052428, 0x280695d8, 0x0, 0xbfbfe1cc, 0x28069bd4, 0x28069bf4, 0x2806f020, 0x0, 0x0, 0x25c, 0x3, 0x28137000, 0xc6000, 0x0, 0xda000, 0x28076000, 0x0, 0x0, 0x0, 0x28069c14, 0x2804e81a, 0x11, 0x0, 0x280701a0, 0x280695d8, 0x280509a9, 0x280695d8, 0xbfbfe44c, 0x2804f785, 0x28070100, 0x0, 0xbfbfe3d4, 0x2804f599, 0x0, 0x0, 0x0, 0x6, 0x0 , 0x28059cca, 0xc5, 0x0, 0x0, 0x8000, 0x3, 0x1002, 0xffffffff, 0x0, 0x0, 0x0, 0x0, 0x280541ce, 0xc5, 0x280695d8, 0xbfbfe2dc, 0x28052c98, 0x0, 0x8000, 0x3, 0x1002, 0xffffffff, 0x0, 0x0, 0x2805296a, 0x0, 0x0, 0x1000, 0x28050e72, 0x28089994, 0x28089994, 0xbfbfe30c, 0x28050df6, 0x2, 0x280857b4, 0xbfe30c, 0x280695d8, 0x28072020, 0x0, 0xbfbfe32c, 0x28050da1, 0x28089994, 0x9a6322b, 0x28070100, 0x0...} From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 15:04:20 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7447516A41F for ; Wed, 31 Aug 2005 15:04:20 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D42F43D48 for ; Wed, 31 Aug 2005 15:04:19 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j7VF4EBS034928 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 31 Aug 2005 17:04:16 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j7VF3wKi003715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 31 Aug 2005 17:03:59 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j7VF3wO7001595; Wed, 31 Aug 2005 17:03:58 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j7VF3wkc001594; Wed, 31 Aug 2005 17:03:58 +0200 (CEST) (envelope-from ticso) Date: Wed, 31 Aug 2005 17:03:58 +0200 From: Bernd Walter To: User Tomdean Message-ID: <20050831150357.GD37930@cicely12.cicely.de> References: <200508202157.j7KLv1GF005017@asus.tddhome> <20050826112422.GY37930@cicely12.cicely.de> <200508301751.j7UHpCt8000858@asus.tddhome> <200508302100.12140.hselasky@c2i.net> <200508302046.j7UKklqR000628@asus.tddhome> <20050831101526.GX37930@cicely12.cicely.de> <200508311442.j7VEg2Nu006607@asus.tddhome> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508311442.j7VEg2Nu006607@asus.tddhome> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de Cc: ticso@cicely.de, freebsd-usb@freebsd.org Subject: Re: Ucom/Uftdi Thru-put X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 15:04:20 -0000 On Wed, Aug 31, 2005 at 07:42:02AM -0700, User Tomdean wrote: > I changed the input buffer size. The read reported 382 bytes. The > buffer is 6*(4*16)==384 bytes long. On the scope I see 6 distinct > groupings in the USB data stream. Looks like ucom/uftdi, or something > up the chain, is using 64 bytes anyway. Every 64 bytes, there seem to > be 2 bytes not from the data stream. Uftdi.c subtracts 2 from count, > giving 382 bytes. Yes - that's exactly what I'm saying: the buffer can't just be increased without further changes. Btw.: it is the FTDI chip itself adding the bytes. I already said that I have tested patches to do this correctly, just need to pic them up. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 18:51:28 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1630716A41F; Wed, 31 Aug 2005 18:51:28 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BCF343D53; Wed, 31 Aug 2005 18:51:24 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from [213.141.131.116] (account rojer@rbc.ru HELO [192.168.10.3]) by hermes.hw.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 91512399; Wed, 31 Aug 2005 22:51:22 +0400 Message-ID: <4315FC27.3080703@rojer.pp.ru> Date: Wed, 31 Aug 2005 22:51:19 +0400 From: Rojer User-Agent: Thunderbird 1.0+ (X11/20050816) MIME-Version: 1.0 To: Ian Dowse References: <200508302009.aa99975@nowhere.iedowse.com> In-Reply-To: <200508302009.aa99975@nowhere.iedowse.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 18:51:28 -0000 Ian Dowse wrote: > > The patch in from the email below may help with the wdrain state - > can you see if it makes any difference? > this solved the problem i had with umass devices on VIA controller. works fine, thanks a lot! the problem i hade is described in the followup to usb/81621 (http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/81621) the original submitter seems to have VIA controller too. -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 19:00:36 2005 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E128016A41F for ; Wed, 31 Aug 2005 19:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98EA343D45 for ; Wed, 31 Aug 2005 19:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7VJ0akm084309 for ; Wed, 31 Aug 2005 19:00:36 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7VJ0ZwI084308; Wed, 31 Aug 2005 19:00:35 GMT (envelope-from gnats) Date: Wed, 31 Aug 2005 19:00:35 GMT Message-Id: <200508311900.j7VJ0ZwI084308@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Rojer Cc: Subject: Re: usb/81621: external hd hangs under load on ehci X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rojer List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 19:00:37 -0000 The following reply was made to PR usb/81621; it has been noted by GNATS. From: Rojer To: bug-followup@FreeBSD.org, gerrit@pmp.uni-hannover.de Cc: Subject: Re: usb/81621: external hd hangs under load on ehci Date: Wed, 31 Aug 2005 22:55:43 +0400 the patch postde here might help with the problem: http://lists.freebsd.org/mailman/htdig/freebsd-hackers/2005-August/013415.html -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 19:21:43 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09C2916A41F; Wed, 31 Aug 2005 19:21:43 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E7ED43D48; Wed, 31 Aug 2005 19:21:38 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.3/8.13.3) with ESMTP id j7VJZBtD008437; Wed, 31 Aug 2005 13:35:12 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <43160334.5000100@samsco.org> Date: Wed, 31 Aug 2005 13:21:24 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ian Dowse References: <200508302009.aa99975@nowhere.iedowse.com> In-Reply-To: <200508302009.aa99975@nowhere.iedowse.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 19:21:43 -0000 Ian Dowse wrote: > In message <20050830125031.GA775@rea.mbslab.kiae.ru>, "Eygene A. Ryabinkin" wri > tes: > >>>What is filesystem has your USB drive? >> >>The one I was extensively testing has FAT, but I've checked the UFS2 -- >>just a bit better -- 1.8 Mb/second. But you're right -- no wdrains at all. >> >>>FreeBSD 4.x had very low performance with FAT filesystem, >>>writing process spent lots of time in the wdrain state too. >> >>Yes, it has. But here the same flash drive gives different results for >>ehci and uhci devices, and the total speed of echi is lower due to wdrains: >>300 Kb/sec versus 500 Kb/sec. And I sometimes write my data to the Windows >>partition with FAT to my home HDD -- it has no wdrains. At least, I've not >>noticed them. For flash I can. > > > The patch in from the email below may help with the wdrain state - > can you see if it makes any difference? Is the problem that the interrupt gets fired but not all of the status information has made it's way back to host memory when the driver gets there? Would it make a difference to instead read back the EHCI_USBSTS register after writing to it in ehci_intr1? That way all transactions down to the controller would be guaranteed to be flushed before you continue on. I wonder if this is a remnant of the famous problems with VIA chipsets doing bad things under medium-to-high PCI contention. I don't see any obvious workarounds for this in the Linux EHCI code, so I wonder if it's a case of them not encountering it, or doing something different that avoids the problem. Scott From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 19:47:28 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D518416A41F; Wed, 31 Aug 2005 19:47:28 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63F0643D48; Wed, 31 Aug 2005 19:47:28 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.3/8.13.3) with ESMTP id j7VK137k008601; Wed, 31 Aug 2005 14:01:03 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <43160943.6030400@samsco.org> Date: Wed, 31 Aug 2005 13:47:15 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ian Dowse References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> In-Reply-To: <43160334.5000100@samsco.org> Content-Type: multipart/mixed; boundary="------------080401070801020504080600" X-Spam-Status: No, score=-2.2 required=3.8 tests=ALL_TRUSTED,URIBL_SBL autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 19:47:29 -0000 This is a multi-part message in MIME format. --------------080401070801020504080600 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Scott Long wrote: > Ian Dowse wrote: > >> In message <20050830125031.GA775@rea.mbslab.kiae.ru>, "Eygene A. >> Ryabinkin" wri >> tes: >> >>>> What is filesystem has your USB drive? >>> >>> >>> The one I was extensively testing has FAT, but I've checked the UFS2 -- >>> just a bit better -- 1.8 Mb/second. But you're right -- no wdrains at >>> all. >>> >>>> FreeBSD 4.x had very low performance with FAT filesystem, >>>> writing process spent lots of time in the wdrain state too. >>> >>> >>> Yes, it has. But here the same flash drive gives different results for >>> ehci and uhci devices, and the total speed of echi is lower due to >>> wdrains: >>> 300 Kb/sec versus 500 Kb/sec. And I sometimes write my data to the >>> Windows >>> partition with FAT to my home HDD -- it has no wdrains. At least, >>> I've not >>> noticed them. For flash I can. >> >> >> >> The patch in from the email below may help with the wdrain state - >> can you see if it makes any difference? > > > Is the problem that the interrupt gets fired but not all of the status > information has made it's way back to host memory when the driver gets > there? Would it make a difference to instead read back the EHCI_USBSTS > register after writing to it in ehci_intr1? That way all transactions > down to the controller would be guaranteed to be flushed before you > continue on. I wonder if this is a remnant of the famous problems with > VIA chipsets doing bad things under medium-to-high PCI contention. I > don't see any obvious workarounds for this in the Linux EHCI code, so > I wonder if it's a case of them not encountering it, or doing something > different that avoids the problem. > > Scott Actually, I just peeked inside the Linux EHCI code and it does a dummy read immediately after writing to the status register: /* clear (just) interrupts */ writel (status, &ehci->regs->status); readl (&ehci->regs->command); /* unblock posted write */ I wonder if that's the whole trick here. Would someone be willing to try the attached patch instead of the one that Ian posted? Scott --------------080401070801020504080600 Content-Type: text/plain; name="ehci-flush.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ehci-flush.diff" Index: ehci.c =================================================================== RCS file: /usr/ncvs/src/sys/dev/usb/ehci.c,v retrieving revision 1.36 diff -u -r1.36 ehci.c --- ehci.c 29 May 2005 04:42:27 -0000 1.36 +++ ehci.c 31 Aug 2005 19:44:14 -0000 @@ -578,6 +578,7 @@ return (0); EOWRITE4(sc, EHCI_USBSTS, intrs); /* Acknowledge */ + EOREAD4(sc, EHCI_USBCMD); /* Flush posted writes on PCI */ sc->sc_bus.intr_context++; sc->sc_bus.no_intrs++; if (eintrs & EHCI_STS_IAA) { --------------080401070801020504080600-- From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 20:38:10 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5120416A41F; Wed, 31 Aug 2005 20:38:10 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D0F843D48; Wed, 31 Aug 2005 20:38:08 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-216-86-119.daxnet.no ([193.216.86.119] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 13934797; Wed, 31 Aug 2005 22:38:06 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Wed, 31 Aug 2005 22:39:02 +0200 User-Agent: KMail/1.7 References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> In-Reply-To: <43160943.6030400@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508312239.04897.hselasky@c2i.net> Cc: Scott Long , Ian Dowse , hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 20:38:10 -0000 On Wednesday 31 August 2005 21:47, Scott Long wrote: > Scott Long wrote: > > Ian Dowse wrote: > >> In message <20050830125031.GA775@rea.mbslab.kiae.ru>, "Eygene A. > >> Ryabinkin" wri > >> > >> tes: > >>>> What is filesystem has your USB drive? > >>> > >>> The one I was extensively testing has FAT, but I've checked the UFS2 -- > >>> just a bit better -- 1.8 Mb/second. But you're right -- no wdrains at > >>> all. > >>> > >>>> FreeBSD 4.x had very low performance with FAT filesystem, > >>>> writing process spent lots of time in the wdrain state too. > >>> > >>> Yes, it has. But here the same flash drive gives different results for > >>> ehci and uhci devices, and the total speed of echi is lower due to > >>> wdrains: > >>> 300 Kb/sec versus 500 Kb/sec. And I sometimes write my data to the > >>> Windows > >>> partition with FAT to my home HDD -- it has no wdrains. At least, > >>> I've not > >>> noticed them. For flash I can. > >> > >> The patch in from the email below may help with the wdrain state - > >> can you see if it makes any difference? > > > > Is the problem that the interrupt gets fired but not all of the status > > information has made it's way back to host memory when the driver gets > > there? Would it make a difference to instead read back the EHCI_USBSTS > > register after writing to it in ehci_intr1? That way all transactions > > down to the controller would be guaranteed to be flushed before you > > continue on. I wonder if this is a remnant of the famous problems with > > VIA chipsets doing bad things under medium-to-high PCI contention. I > > don't see any obvious workarounds for this in the Linux EHCI code, so > > I wonder if it's a case of them not encountering it, or doing something > > different that avoids the problem. > > > > Scott > > Actually, I just peeked inside the Linux EHCI code and it does a dummy > read immediately after writing to the status register: > > /* clear (just) interrupts */ > writel (status, &ehci->regs->status); > readl (&ehci->regs->command); /* unblock posted write */ > > I wonder if that's the whole trick here. Would someone be willing to > try the attached patch instead of the one that Ian posted? > > Scott This is not documented in the EHCI chip specification. There exists the doorbell to ensure that the EHCI controller is finished with data structures. Also I have noticed that the existing EHCI driver does not always dequeue structures from the controller before accessing them. If Scott's patch doesn't work, could you have tried to install the following (compiles on FreeBSD 5/6/7): Download the three files below into a new directory and type "make install" (to uninstall type "make deinstall") http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 Then recompile all USB modules and/or kernel, depending on your configuration. Here is a quick USB-module compile script: #!/bin/sh cd /sys/modules/aue && make depend all install clean cd /sys/modules/axe && make depend all install clean cd /sys/modules/cdce && make depend all install clean cd /sys/modules/cue && make depend all install clean cd /sys/modules/if_ndis && make depend all install clean cd /sys/modules/kue && make depend all install clean cd /sys/modules/ndis && make depend all install clean cd /sys/modules/netgraph/bluetooth/ubtbcmfw && make depend all install clean cd /sys/modules/netgraph/bluetooth/ubt && make depend all install clean cd /sys/modules/rue && make depend all install clean cd /sys/modules/sound/driver/uaudio && make depend all install clean cd /sys/modules/ubsa && make depend all install clean cd /sys/modules/ubser && make depend all install clean cd /sys/modules/ucom && make depend all install clean cd /sys/modules/ucycom && make depend all install clean cd /sys/modules/udav && make depend all install clean cd /sys/modules/udbp && make depend all install clean cd /sys/modules/ufm && make depend all install clean cd /sys/modules/uftdi && make depend all install clean cd /sys/modules/ugen && make depend all install clean cd /sys/modules/uhid && make depend all install clean cd /sys/modules/ukbd && make depend all install clean cd /sys/modules/ulpt && make depend all install clean cd /sys/modules/umass && make depend all install clean cd /sys/modules/umct && make depend all install clean cd /sys/modules/umodem && make depend all install clean cd /sys/modules/ums && make depend all install clean cd /sys/modules/uplcom && make depend all install clean cd /sys/modules/ural && make depend all install clean cd /sys/modules/urio && make depend all install clean cd /sys/modules/usb && make depend all install clean cd /sys/modules/uscanner && make depend all install clean cd /sys/modules/uvisor && make depend all install clean cd /sys/modules/uvscom && make depend all install clean --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 21:17:16 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3154F16A41F; Wed, 31 Aug 2005 21:17:16 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 023CF43D46; Wed, 31 Aug 2005 21:17:13 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from [213.141.131.116] (account rojer@rbc.ru HELO [192.168.10.3]) by hermes.hw.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 91524523; Thu, 01 Sep 2005 01:17:11 +0400 Message-ID: <43161E54.5050705@rojer.pp.ru> Date: Thu, 01 Sep 2005 01:17:08 +0400 From: Rojer User-Agent: Thunderbird 1.0+ (X11/20050816) MIME-Version: 1.0 To: Scott Long References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> In-Reply-To: <43160943.6030400@samsco.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Ian Dowse , hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 21:17:16 -0000 Scott Long wrote: > > I wonder if that's the whole trick here. Would someone be willing to > try the attached patch instead of the one that Ian posted? > just tried the patch... no, it doesn't help. stalls still happen when reading large files from the device. -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 21:21:23 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAF4F16A41F; Wed, 31 Aug 2005 21:21:23 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1E9243D46; Wed, 31 Aug 2005 21:21:22 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from [213.141.131.116] (account rojer@rbc.ru HELO [192.168.10.3]) by hermes.hw.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 91524791; Thu, 01 Sep 2005 01:21:21 +0400 Message-ID: <43161F4E.8000101@rojer.pp.ru> Date: Thu, 01 Sep 2005 01:21:18 +0400 From: Rojer User-Agent: Thunderbird 1.0+ (X11/20050816) MIME-Version: 1.0 To: hselasky@c2i.net References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> <200508312239.04897.hselasky@c2i.net> In-Reply-To: <200508312239.04897.hselasky@c2i.net> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Scott Long , freebsd-hackers@freebsd.org, Ian Dowse , hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 21:21:24 -0000 Hans Petter Selasky wrote: > If Scott's patch doesn't work, could you have tried to install the following > (compiles on FreeBSD 5/6/7): > > Download the three files below into a new directory and type > "make install" (to uninstall type "make deinstall") > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 > > Then recompile all USB modules and/or kernel, depending on your configuration. doesn't apply to freshly cvsupped RELENG_6: [skip] x sys/dev/usb2/usb_quirks.h x sys/dev/usb2/usb_subr.h (bzcat new_usb_1_5_4.diff.bz2 | patch -N -l -d /usr/src) || echo -n Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/i386/include/bus_at386.h.ref Wed Oct 20 21:32:58 2004 |--- sys/i386/include/bus_at386.h Sat Nov 11 11:11:00 2000 -------------------------- File to patch: ^C -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 21:21:41 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EBD116A41F; Wed, 31 Aug 2005 21:21:41 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBBAB43D49; Wed, 31 Aug 2005 21:21:38 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.3/8.13.3) with ESMTP id j7VLZDes009172; Wed, 31 Aug 2005 15:35:13 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <43161F60.8010408@samsco.org> Date: Wed, 31 Aug 2005 15:21:36 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hselasky@c2i.net References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> <200508312239.04897.hselasky@c2i.net> In-Reply-To: <200508312239.04897.hselasky@c2i.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=3.8 tests=ALL_TRUSTED,URIBL_SBL autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: Ian Dowse , freebsd-hackers@freebsd.org, hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 21:21:41 -0000 Hans Petter Selasky wrote: > On Wednesday 31 August 2005 21:47, Scott Long wrote: > >>Scott Long wrote: >> >>>Ian Dowse wrote: >>> >>>>In message <20050830125031.GA775@rea.mbslab.kiae.ru>, "Eygene A. >>>>Ryabinkin" wri >>>> >>>>tes: >>>> >>>>>>What is filesystem has your USB drive? >>>>> >>>>>The one I was extensively testing has FAT, but I've checked the UFS2 -- >>>>>just a bit better -- 1.8 Mb/second. But you're right -- no wdrains at >>>>>all. >>>>> >>>>> >>>>>>FreeBSD 4.x had very low performance with FAT filesystem, >>>>>>writing process spent lots of time in the wdrain state too. >>>>> >>>>>Yes, it has. But here the same flash drive gives different results for >>>>>ehci and uhci devices, and the total speed of echi is lower due to >>>>>wdrains: >>>>>300 Kb/sec versus 500 Kb/sec. And I sometimes write my data to the >>>>>Windows >>>>>partition with FAT to my home HDD -- it has no wdrains. At least, >>>>>I've not >>>>>noticed them. For flash I can. >>>> >>>>The patch in from the email below may help with the wdrain state - >>>>can you see if it makes any difference? >>> >>>Is the problem that the interrupt gets fired but not all of the status >>>information has made it's way back to host memory when the driver gets >>>there? Would it make a difference to instead read back the EHCI_USBSTS >>>register after writing to it in ehci_intr1? That way all transactions >>>down to the controller would be guaranteed to be flushed before you >>>continue on. I wonder if this is a remnant of the famous problems with >>>VIA chipsets doing bad things under medium-to-high PCI contention. I >>>don't see any obvious workarounds for this in the Linux EHCI code, so >>>I wonder if it's a case of them not encountering it, or doing something >>>different that avoids the problem. >>> >>>Scott >> >>Actually, I just peeked inside the Linux EHCI code and it does a dummy >>read immediately after writing to the status register: >> >> /* clear (just) interrupts */ >> writel (status, &ehci->regs->status); >> readl (&ehci->regs->command); /* unblock posted write */ >> >>I wonder if that's the whole trick here. Would someone be willing to >>try the attached patch instead of the one that Ian posted? >> >>Scott > > > This is not documented in the EHCI chip specification. Flushing posted writes is something that all programmers of PCI devices should understand, so it usually isn't documented in device manuals. > There exists the > doorbell to ensure that the EHCI controller is finished with data structures. > Also I have noticed that the existing EHCI driver does not always dequeue > structures from the controller before accessing them. > Can you point to an example here? > If Scott's patch doesn't work, could you have tried to install the following > (compiles on FreeBSD 5/6/7): > Yeah, looks like my guess was wrong. Scott From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 22:37:06 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E93E216A41F; Wed, 31 Aug 2005 22:37:06 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11D8443D45; Wed, 31 Aug 2005 22:37:05 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-216-87-18.daxnet.no ([193.216.87.18] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 449687991; Thu, 01 Sep 2005 00:37:04 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 1 Sep 2005 00:38:00 +0200 User-Agent: KMail/1.7 References: <200508302009.aa99975@nowhere.iedowse.com> <200508312239.04897.hselasky@c2i.net> <43161F4E.8000101@rojer.pp.ru> In-Reply-To: <43161F4E.8000101@rojer.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509010038.02519.hselasky@c2i.net> Cc: Scott Long , Ian Dowse , Eugene Grosbein , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" , Rojer Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 22:37:07 -0000 On Wednesday 31 August 2005 23:21, Rojer wrote: > Hans Petter Selasky wrote: > > If Scott's patch doesn't work, could you have tried to install the > > following (compiles on FreeBSD 5/6/7): > > > > Download the three files below into a new directory and type > > "make install" (to uninstall type "make deinstall") > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 > > > > Then recompile all USB modules and/or kernel, depending on your > > configuration. > > doesn't apply to freshly cvsupped RELENG_6: Just ignore those failing patches. The driver will compile regardless of that. > > [skip] > x sys/dev/usb2/usb_quirks.h > x sys/dev/usb2/usb_subr.h > (bzcat new_usb_1_5_4.diff.bz2 | patch -N -l -d /usr/src) || echo -n > Hmm... Looks like a new-style context diff to me... > The text leading up to this was: > -------------------------- > > |*** sys/i386/include/bus_at386.h.ref Wed Oct 20 21:32:58 2004 > |--- sys/i386/include/bus_at386.h Sat Nov 11 11:11:00 2000 > > -------------------------- > File to patch: ^C --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 31 22:53:11 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A184A16A41F; Wed, 31 Aug 2005 22:53:11 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swipnet.se [212.247.155.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id E459143D45; Wed, 31 Aug 2005 22:53:10 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-132-64.daxnet.no ([193.217.132.64] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 13974270; Thu, 01 Sep 2005 00:53:09 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 1 Sep 2005 00:54:01 +0200 User-Agent: KMail/1.7 References: <200508302009.aa99975@nowhere.iedowse.com> <200508312239.04897.hselasky@c2i.net> <43161F60.8010408@samsco.org> In-Reply-To: <43161F60.8010408@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509010054.02793.hselasky@c2i.net> Cc: Scott Long , Eugene Grosbein , Ian Dowse , freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 22:53:11 -0000 On Wednesday 31 August 2005 23:21, Scott Long wrote: > >> > >>Actually, I just peeked inside the Linux EHCI code and it does a dummy > >>read immediately after writing to the status register: > >> > >> /* clear (just) interrupts */ > >> writel (status, &ehci->regs->status); > >> readl (&ehci->regs->command); /* unblock posted write */ > >> > >>I wonder if that's the whole trick here. Would someone be willing to > >>try the attached patch instead of the one that Ian posted? > >> > >>Scott > > > > This is not documented in the EHCI chip specification. > > Flushing posted writes is something that all programmers of PCI devices > should understand, so it usually isn't documented in device manuals. > > > There exists the > > doorbell to ensure that the EHCI controller is finished with data > > structures. Also I have noticed that the existing EHCI driver does not > > always dequeue structures from the controller before accessing them. > > Can you point to an example here? In the official USB system, when an endpoint is opened, a QH structure is allocated and inserted into the USB controller's schedule. After that the EHCI driver will just write new values to that structure, while it is still scheduled. In my opinion you should unqueue this structure and wait for doorbell, before touching it. > > > If Scott's patch doesn't work, could you have tried to install the > > following (compiles on FreeBSD 5/6/7): > > Yeah, looks like my guess was wrong. > > Scott --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 03:17:25 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C18B16A41F; Thu, 1 Sep 2005 03:17:25 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFEE443D49; Thu, 1 Sep 2005 03:17:24 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 98BFB17005; Thu, 1 Sep 2005 00:17:22 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24257-09; Thu, 1 Sep 2005 00:17:11 -0300 (BRT) Received: from [135.153.2.71] (201.20.201.118.corp.ajato.com.br [201.20.201.118]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id 1D02917004; Thu, 1 Sep 2005 00:16:55 -0300 (BRT) Message-ID: <4316729A.9010702@jonny.eng.br> Date: Thu, 01 Sep 2005 00:16:42 -0300 From: =?UTF-8?B?Sm/Do28gQ2FybG9zIE1lbmRlcyBMdcOtcw==?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Eygene A. Ryabinkin" References: <20050830092818.GD881@rea.mbslab.kiae.ru> <4314CBCE.7010405@jonny.eng.br> <20050831055026.GE1645@rea.mbslab.kiae.ru> In-Reply-To: <20050831055026.GE1645@rea.mbslab.kiae.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 03:17:25 -0000 Eygene A. Ryabinkin wrote: >> I had exactly this problem with Kingston Data Traveler II+, and >>apparently completely solved it by adding a kludge to disallow Cache >>Syncronization. Try it yourself. > > And the kludge is? It's on my home machine, and I'm travelling now. But it's easy. Look at /sys/cam/scsi/scsi_da.c, look for the da_quirk_table array, and add the flag DA_Q_NO_SYNC_CACHE to your pen drive specs. There are lots of quirks for pen drives there, just copy one of then and edit the string identifiers. From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 06:53:47 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DBF516A420 for ; Thu, 1 Sep 2005 06:53:47 +0000 (GMT) (envelope-from gni@gecko.de) Received: from kirk.baltic.net (kirk.baltic.net [193.189.247.10]) by mx1.FreeBSD.org (Postfix) with SMTP id 3713043D49 for ; Thu, 1 Sep 2005 06:53:41 +0000 (GMT) (envelope-from gni@gecko.de) Received: (qmail 9121 invoked from network); 1 Sep 2005 06:50:00 -0000 Received: from waldorf.gecko.de (HELO kermit.int.gecko.de) (193.189.247.200) by kirk.baltic.net with SMTP; 1 Sep 2005 06:50:00 -0000 Received: from lorien.int.gecko.de (lorien [192.168.120.159]) by kermit.int.gecko.de (8.12.10+Sun/8.12.10) with ESMTP id j816rd6B007558; Thu, 1 Sep 2005 08:53:39 +0200 (CEST) Received: from lorien.int.gecko.de (localhost [127.0.0.1]) by lorien.int.gecko.de (8.12.9/8.12.9) with ESMTP id j816t6Cu023198; Thu, 1 Sep 2005 08:55:06 +0200 (MEST) (envelope-from munk@lorien.int.gecko.de) Received: (from munk@localhost) by lorien.int.gecko.de (8.12.9/8.12.9/Submit) id j816t5EW023197; Thu, 1 Sep 2005 08:55:05 +0200 (MEST) Date: Thu, 1 Sep 2005 08:55:05 +0200 From: Gunther Nikl To: "Eygene A. Ryabinkin" Message-ID: <20050901065505.GA23180@lorien.int.gecko.de> References: <20050830092818.GD881@rea.mbslab.kiae.ru> <4314523D.79926C81@kuzbass.ru> <20050830125031.GA775@rea.mbslab.kiae.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050830125031.GA775@rea.mbslab.kiae.ru> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 06:53:47 -0000 On Tue, Aug 30, 2005 at 04:50:31PM +0400, Eygene A. Ryabinkin wrote: > > FreeBSD 4.x had very low performance with FAT filesystem, > > writing process spent lots of time in the wdrain state too. > Yes, it has. Did you try mtools? I get much better performance with mtools compared to msdosfs. Gunther From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 08:44:31 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02DB516A41F; Thu, 1 Sep 2005 08:44:31 +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 81B3543D46; Thu, 1 Sep 2005 08:44:30 +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 17CC5BD6D; Thu, 1 Sep 2005 12:44:22 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id DE3E5BD6C; Thu, 1 Sep 2005 12:44:21 +0400 (MSD) Date: Thu, 1 Sep 2005 12:44:21 +0400 From: "Eygene A. Ryabinkin" To: Scott Long Message-ID: <20050901084421.GA840@rea.mbslab.kiae.ru> References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <43160943.6030400@samsco.org> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: Ian Dowse , hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 08:44:31 -0000 > Actually, I just peeked inside the Linux EHCI code and it does a dummy > read immediately after writing to the status register: > > /* clear (just) interrupts */ > writel (status, &ehci->regs->status); > readl (&ehci->regs->command); /* unblock posted write */ > > I wonder if that's the whole trick here. Would someone be willing to > try the attached patch instead of the one that Ian posted? Yes, that solved my problem. But the patch (for 5.x) uses different line numbers: ----- --- /sys/dev/usb/ehci.c.orig Thu Sep 1 10:59:51 2005 +++ /sys/dev/usb/ehci.c Thu Sep 1 10:48:59 2005 @@ -580,6 +580,7 @@ return (0); EOWRITE4(sc, EHCI_USBSTS, intrs); /* Acknowledge */ + EOREAD4(sc, EHCI_USBCMD); /* Flush posted writes on PCI */ sc->sc_bus.intr_context++; sc->sc_bus.no_intrs++; if (eintrs & EHCI_STS_IAA) { ----- Apart from this the patch works: the writing process still spends much time in the wdrain state, but no stalls occurs. Just a remark: my USB 2.0 controller chip is made by NEC, not VIA. For a FAT curiosity: FAT 32 gives 700K/sec and FAT 16 -- 3 Mb/sec. -- rea From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 09:37:35 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A51B16A41F; Thu, 1 Sep 2005 09:37:35 +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 AADA143D46; Thu, 1 Sep 2005 09:37:34 +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 7CD7EBAD0; Thu, 1 Sep 2005 13:37:33 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id 47403BA3E; Thu, 1 Sep 2005 13:37:33 +0400 (MSD) Date: Thu, 1 Sep 2005 13:37:33 +0400 From: "Eygene A. Ryabinkin" To: Hans Petter Selasky Message-ID: <20050901093733.GA915@rea.mbslab.kiae.ru> References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> <200508312239.04897.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200508312239.04897.hselasky@c2i.net> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: Scott Long , freebsd-hackers@freebsd.org, Ian Dowse , hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 09:37:35 -0000 > If Scott's patch doesn't work, could you have tried to install the following > (compiles on FreeBSD 5/6/7): Yes, it also works and does even better work: FAT 32 and FAT 16 permormance are just the same and there is no additional load as been with the Scott's patch. So I definitely would vote for this fix. > > Download the three files below into a new directory and type > "make install" (to uninstall type "make deinstall") > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 Can this fix be transformed into the patch? It will be very helpful to the committers to have in the form of patch. Are there any reasons to make it in the way you did? Thank you for your work! -- rea From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 12:08:33 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81C9916A41F; Thu, 1 Sep 2005 12:08:33 +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 0F35B43D46; Thu, 1 Sep 2005 12:08:33 +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 09C4BBE7D; Thu, 1 Sep 2005 16:08:27 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id CF50ABE7A; Thu, 1 Sep 2005 16:08:26 +0400 (MSD) Date: Thu, 1 Sep 2005 16:08:26 +0400 From: "Eygene A. Ryabinkin" To: Hans Petter Selasky Message-ID: <20050901120826.GB915@rea.mbslab.kiae.ru> References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> <200508312239.04897.hselasky@c2i.net> <20050901093733.GA915@rea.mbslab.kiae.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20050901093733.GA915@rea.mbslab.kiae.ru> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: Scott Long , freebsd-hackers@freebsd.org, Ian Dowse , hackers@freebsd.org, Eugene Grosbein , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 12:08:33 -0000 > Yes, it also works and does even better work: FAT 32 and FAT 16 permormance > are just the same and there is no additional load as been with the Scott's > patch. > So I definitely would vote for this fix. Oops, it seems that this patch also does not work as expected: after some time of playing with flash card and working with the system it started to stall as unpatched system, but it freezes the system -- even IP stack was frozen (I am using DEVICE_POLLING), so I were to remove the flash from the port -- system was unfrozen and continued to work. So something is still bad with the USB. I'll try to do some long testing with USB 1.1 -- maybe it will show the same behaviour after some more time. -- rea From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 13:31:54 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9B9D16A41F; Thu, 1 Sep 2005 13:31:54 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41A3B43D45; Thu, 1 Sep 2005 13:31:54 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j81DVnBS066805 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 1 Sep 2005 15:31:51 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j81DVgqK015176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Sep 2005 15:31:42 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j81DVfhM004084; Thu, 1 Sep 2005 15:31:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j81DVajl004083; Thu, 1 Sep 2005 15:31:36 +0200 (CEST) (envelope-from ticso) Date: Thu, 1 Sep 2005 15:31:36 +0200 From: Bernd Walter To: "Eygene A. Ryabinkin" Message-ID: <20050901133136.GL3267@cicely12.cicely.de> References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> <20050901084421.GA840@rea.mbslab.kiae.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050901084421.GA840@rea.mbslab.kiae.ru> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: Scott Long , hackers@freebsd.org, Eugene Grosbein , Ian Dowse , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 13:31:55 -0000 On Thu, Sep 01, 2005 at 12:44:21PM +0400, Eygene A. Ryabinkin wrote: > > Actually, I just peeked inside the Linux EHCI code and it does a dummy > > read immediately after writing to the status register: > > > > /* clear (just) interrupts */ > > writel (status, &ehci->regs->status); > > readl (&ehci->regs->command); /* unblock posted write */ > > > > I wonder if that's the whole trick here. Would someone be willing to > > try the attached patch instead of the one that Ian posted? > Yes, that solved my problem. But the patch (for 5.x) uses different line > numbers: > ----- > --- /sys/dev/usb/ehci.c.orig Thu Sep 1 10:59:51 2005 > +++ /sys/dev/usb/ehci.c Thu Sep 1 10:48:59 2005 > @@ -580,6 +580,7 @@ > return (0); > > EOWRITE4(sc, EHCI_USBSTS, intrs); /* Acknowledge */ > + EOREAD4(sc, EHCI_USBCMD); /* Flush posted writes on PCI */ > sc->sc_bus.intr_context++; > sc->sc_bus.no_intrs++; > if (eintrs & EHCI_STS_IAA) { > ----- > Apart from this the patch works: the writing process still spends much time > in the wdrain state, but no stalls occurs. > > Just a remark: my USB 2.0 controller chip is made by NEC, not VIA. > > For a FAT curiosity: FAT 32 gives 700K/sec and FAT 16 -- 3 Mb/sec. FAT32 vs. FAT16 shouldn't be a difference, but the smaller cluster sizes that you usually get with FAT32 decrease the average transfer size. Basicly you can get around 500-1000 transactions per second over USB, unless interleaving multiple transactions is done. Since msdosfs does no aggregation you can end up with e.g. 512 Byte transactions. 700kB/s points to an FS with 2k cluster size. Currently I'm unshure if umass allows interleaving transactions, but your numbers makes me believe that it does not. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 14:01:12 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF0BE16A41F; Thu, 1 Sep 2005 14:01:11 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37B8D43D45; Thu, 1 Sep 2005 14:01:10 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-135-60.daxnet.no ([193.217.135.60] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 253215240; Thu, 01 Sep 2005 16:01:08 +0200 From: Hans Petter Selasky To: "Eygene A. Ryabinkin" Date: Thu, 1 Sep 2005 16:02:00 +0200 User-Agent: KMail/1.7 References: <200508302009.aa99975@nowhere.iedowse.com> <200508312239.04897.hselasky@c2i.net> <20050901093733.GA915@rea.mbslab.kiae.ru> In-Reply-To: <20050901093733.GA915@rea.mbslab.kiae.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509011602.03079.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org, Scott Long , Eugene Grosbein , Ian Dowse , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 14:01:12 -0000 On Thursday 01 September 2005 11:37, Eygene A. Ryabinkin wrote: > > If Scott's patch doesn't work, could you have tried to install the > > following (compiles on FreeBSD 5/6/7): > > Yes, it also works and does even better work: FAT 32 and FAT 16 > permormance are just the same and there is no additional load as been with > the Scott's patch. > So I definitely would vote for this fix. > > > Download the three files below into a new directory and type > > "make install" (to uninstall type "make deinstall") > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 > > Can this fix be transformed into the patch? It will be very helpful to the > committers to have in the form of patch. Are there any reasons to make it > in the way you did? I did things like I did it, so I would be saved the work of upgrading my patch every time the source code changes. I am currently working on getting this ported to NetBSD, so maybe the official USB system of FreeBSD can be upgraded without splitting with NetBSD. At the present moment there are too many changes made, so a single patch will not be so good. > Thank you for your work! On Thursday 01 September 2005 14:08, you wrote: > > Yes, it also works and does even better work: FAT 32 and FAT 16 > > permormance are just the same and there is no additional load as been > > with the Scott's patch. Interesting. > > So I definitely would vote for this fix. > > Oops, it seems that this patch also does not work as expected: after some > time of playing with flash card and working with the system it started to > stall as unpatched system, but it freezes the system -- even IP stack was > frozen (I am using DEVICE_POLLING), so I were to remove the flash from the > port -- system was unfrozen and continued to work. So something is still > bad with the USB. I'll try to do some long testing with USB 1.1 -- maybe it > will show the same behaviour after some more time. Do you mean my patch? Maybe you can turn on debugging when the system starts freezing: sysctl hw.usb.debug=15 sysctl hw.usb.umass.debug=-1 sysctl hw.usb.ehci.debug=15 # note: produces alot of output ! Set these variables to zero to turn off debugging. If the system resumes to normal operation when you pull the device plug, it is most likely a timeout in "umass" that takes too long. In the file "/sys/dev/usb/umass.c": Add: sc->timeout = 1000; Before: /* Read the Command Status Wrapper via bulk-in endpoint. */ if (umass_setup_transfer(sc, sc->bulkin_pipe, &sc->csw, UMASS_BBB_CSW_SIZE, 0, next_xfer)) { umass_bbb_reset(sc, STATUS_WIRE_FAILED); return; } See if you get any timeout messages while stressing the system. --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Sep 2 01:53:13 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E087916A41F; Fri, 2 Sep 2005 01:53:13 +0000 (GMT) (envelope-from fujita@soum.co.jp) Received: from gate.soum.co.jp (gate.soum.co.jp [202.221.40.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2E9E43D53; Fri, 2 Sep 2005 01:53:12 +0000 (GMT) (envelope-from fujita@soum.co.jp) Received: from mail.soum.co.jp (hoth.soum.co.jp [IPv6:2001:240:c4:1:203:baff:fea1:6471]) by gate.soum.co.jp (8.13.3/8.13.3) with ESMTP id j821rCl8094456; Fri, 2 Sep 2005 10:53:12 +0900 (JST) (envelope-from fujita@soum.co.jp) Received: from localhost (luke.soum.co.jp [IPv6:2001:240:c4:1:203:baff:fe80:54a5]) by mail.soum.co.jp (8.13.4/8.13.4) with ESMTP id j821rBAA029832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 2 Sep 2005 10:53:11 +0900 (JST) Date: Fri, 02 Sep 2005 10:53:11 +0900 (JST) Message-Id: <20050902.105311.24457489.fujita@soum.co.jp> To: freebsd-amd64@freebsd.org From: FUJITA Kazutoshi X-Face: "; PnIN=f2{%Xj2PnI+zHd.39&Cn1)}br_7:N|2[CbS87Du6#6?|UeqX'&OfyZG-mX#'5T>k/~8X(F,2Mb_pNd8]3Cb1u[kSZjF}J+#`L5(g); List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2005 01:53:14 -0000 hi, my axe never works on my amd64 box with 7.0-current. insert axe to the usb port, following message is out. uhub1: device problem (SHORT_XFER), disabling port 1 of course, the axe works well on my i386 laptop(ThinkPad T43) with 7.0-current. axe0: vendor 0x0411 product 0x003d, rev 2.00/0.01, addr 2 miibus1: on axe0 rlphy0: on miibus1 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto axe0: Ethernet address: 00:07:40:53:7c:2a axe0: if_start running deferred for Giant axe0: link state changed to DOWN any suggestions ? Regards, From owner-freebsd-usb@FreeBSD.ORG Fri Sep 2 09:20:00 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36E7516A41F; Fri, 2 Sep 2005 09:20:00 +0000 (GMT) (envelope-from rea@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 BC3FF43D45; Fri, 2 Sep 2005 09:19:59 +0000 (GMT) (envelope-from rea@rea.mbslab.kiae.ru) Received: from rea.mbslab.kiae.ru (localhost [127.0.0.1]) by rea.mbslab.kiae.ru (Postfix) with ESMTP id C57FCB8F0; Fri, 2 Sep 2005 13:19:57 +0400 (MSD) Received: by rea.mbslab.kiae.ru (Postfix, from userid 1000) id 31D9FBD6D; Thu, 1 Sep 2005 21:04:03 +0400 (MSD) Date: Thu, 1 Sep 2005 21:04:02 +0400 From: "Eygene A. Ryabinkin" To: Hans Petter Selasky Message-ID: <20050901170402.GA754@rea.mbslab.kiae.ru> References: <200508302009.aa99975@nowhere.iedowse.com> <200508312239.04897.hselasky@c2i.net> <20050901093733.GA915@rea.mbslab.kiae.ru> <200509011602.03079.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200509011602.03079.hselasky@c2i.net> User-Agent: Mutt/1.5.9i X-AV-Checked: Yes! Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2005 09:20:00 -0000 > > Oops, it seems that this patch also does not work as expected: after some > > time of playing with flash card and working with the system it started to > > stall as unpatched system, but it freezes the system -- even IP stack was > > frozen (I am using DEVICE_POLLING), so I were to remove the flash from the > > port -- system was unfrozen and continued to work. So something is still > > bad with the USB. I'll try to do some long testing with USB 1.1 -- maybe it > > will show the same behaviour after some more time. > > Do you mean my patch? Yes. And I've noticed the second, worst, thing: my cd-burner refused to burn anything using atapi-cam. I've not tested the native atapi (via burncd), because it is broken (at least with many new drives). After recompiling the clean 5.x kernel the problem gone. I don't have much time today to make experiments, but I'll try to check this issue once again. -- rea From owner-freebsd-usb@FreeBSD.ORG Sat Sep 3 05:10:18 2005 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D7CE16A41F for ; Sat, 3 Sep 2005 05:10:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B5EC43D45 for ; Sat, 3 Sep 2005 05:10:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j835AHOJ068737 for ; Sat, 3 Sep 2005 05:10:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j835AHV9068736; Sat, 3 Sep 2005 05:10:17 GMT (envelope-from gnats) Date: Sat, 3 Sep 2005 05:10:17 GMT Message-Id: <200509030510.j835AHV9068736@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Nehal Mistry Cc: Subject: Re: usb/80373: usb keyboard does not respond X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nehal Mistry List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 05:10:18 -0000 The following reply was made to PR usb/80373; it has been noted by GNATS. From: Nehal Mistry To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/80373: usb keyboard does not respond Date: Fri, 02 Sep 2005 22:02:56 -0700 this bug can be closed, it is a problem with one of my usb ports (i was also getting problems in windows 2000) moving the keyboard connector to another USB port fixed the problem. Nehal From owner-freebsd-usb@FreeBSD.ORG Sat Sep 3 14:14:02 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 653C316A41F for ; Sat, 3 Sep 2005 14:14:02 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id E857C43D46 for ; Sat, 3 Sep 2005 14:14:01 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: by wproxy.gmail.com with SMTP id i4so693807wra for ; Sat, 03 Sep 2005 07:14:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=jl5xyKro7HVQyknRx6Dp1B0f1U9ncX7vCGanXzdBsMjdIeLgwGOnMCBR3aIAs3+pDWPlEV1NlnU/+BhOutjYtHsNTLbQOaDgGOWj9swGe03Wec3aexklflIXqeNzsRs41YIs8/rb7v3qc/R0d/QSk8kjdE9Gb8Ox6bGlI64sh7c= Received: by 10.54.3.57 with SMTP id 57mr3017953wrc; Sat, 03 Sep 2005 07:14:01 -0700 (PDT) Received: from AAmiens-152-1-12-11.w83-192.abo.wanadoo.fr ( [83.192.197.11]) by mx.gmail.com with ESMTP id d16sm2168029wra.2005.09.03.07.14.00; Sat, 03 Sep 2005 07:14:01 -0700 (PDT) From: Sebastien To: freebsd-usb@freebsd.org Date: Sat, 3 Sep 2005 16:14:51 +0200 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509031614.51362.sebastien.bourdeauducq@gmail.com> Subject: Mutexes in USB callbacks ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 14:14:02 -0000 Hello, Is it finally possible or not to acquire a mutex in an USB callback function, under FreeBSD 5-STABLE ? I have controversial information about this :( Thanks, Sebastien From owner-freebsd-usb@FreeBSD.ORG Sat Sep 3 14:18:53 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21EF516A41F for ; Sat, 3 Sep 2005 14:18:53 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B57443D45 for ; Sat, 3 Sep 2005 14:18:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j83EHVgT052958; Sat, 3 Sep 2005 08:17:31 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 03 Sep 2005 08:18:02 -0600 (MDT) Message-Id: <20050903.081802.78021370.imp@bsdimp.com> To: sebastien.bourdeauducq@gmail.com From: "M. Warner Losh" In-Reply-To: <200509031614.51362.sebastien.bourdeauducq@gmail.com> References: <200509031614.51362.sebastien.bourdeauducq@gmail.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 03 Sep 2005 08:17:31 -0600 (MDT) Cc: freebsd-usb@freebsd.org Subject: Re: Mutexes in USB callbacks ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 14:18:53 -0000 In message: <200509031614.51362.sebastien.bourdeauducq@gmail.com> Sebastien writes: : Hello, : Is it finally possible or not to acquire a mutex in an USB callback function, : under FreeBSD 5-STABLE ? : I have controversial information about this :( Since the callback functions are called from an interrupt handler which is an ithread protected by Giant, there should be no problems doing this. Warner From owner-freebsd-usb@FreeBSD.ORG Sat Sep 3 14:21:41 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8924A16A41F for ; Sat, 3 Sep 2005 14:21:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id F102F43D48 for ; Sat, 3 Sep 2005 14:21:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j83EJULg052978; Sat, 3 Sep 2005 08:19:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 03 Sep 2005 08:20:01 -0600 (MDT) Message-Id: <20050903.082001.50696105.imp@bsdimp.com> To: sebastien.bourdeauducq@gmail.com From: "M. Warner Losh" In-Reply-To: <20050903.081802.78021370.imp@bsdimp.com> References: <200509031614.51362.sebastien.bourdeauducq@gmail.com> <20050903.081802.78021370.imp@bsdimp.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 03 Sep 2005 08:19:30 -0600 (MDT) Cc: freebsd-usb@freebsd.org Subject: Re: Mutexes in USB callbacks ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 14:21:41 -0000 In message: <20050903.081802.78021370.imp@bsdimp.com> M. Warner Losh writes: : In message: <200509031614.51362.sebastien.bourdeauducq@gmail.com> : Sebastien writes: : : Hello, : : Is it finally possible or not to acquire a mutex in an USB callback function, : : under FreeBSD 5-STABLE ? : : I have controversial information about this :( : : Since the callback functions are called from an interrupt handler : which is an ithread protected by Giant, there should be no problems : doing this. However, since it is an ithread, and usb is a commonly shared device, any sleeping you do there will delay other device's interrupt hanlders from running. Warner From owner-freebsd-usb@FreeBSD.ORG Sat Sep 3 20:08:20 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72E5F16A41F for ; Sat, 3 Sep 2005 20:08:20 +0000 (GMT) (envelope-from jpandrusky@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8FA043D45 for ; Sat, 3 Sep 2005 20:08:19 +0000 (GMT) (envelope-from jpandrusky@gmail.com) Received: by xproxy.gmail.com with SMTP id i27so462852wxd for ; Sat, 03 Sep 2005 13:08:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=psIureYDoLKnar/HBPqgUKLHNO1SyPbNk56X9QVzJBqmhWR+POyoJt0cByn9bQcAssIVTbr7m0ok5VAzThurUsXrhPoGOXQ2AQwYHlPeuwh0KvRHcislwSTbXj89xEiXhtW/QtQuStOdbEtJG0CTdCMd4yiIMaLt7h4LMAPSbOg= Received: by 10.70.46.12 with SMTP id t12mr42214wxt; Sat, 03 Sep 2005 13:01:42 -0700 (PDT) Received: by 10.70.23.1 with HTTP; Sat, 3 Sep 2005 13:01:42 -0700 (PDT) Message-ID: Date: Sat, 3 Sep 2005 14:01:42 -0600 From: John-Paul Andrusky To: hselasky@c2i.net In-Reply-To: <200508261423.46583.hselasky@c2i.net> Mime-Version: 1.0 References: <200508240257.03931.hselasky@c2i.net> <200508261423.46583.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: Problems with uhid device. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 20:08:20 -0000 Hi,=20 Sorry for the long silence. I tried both of the alternatives bellow with=20 no success with either (does exactly the same thing). I've tried to=20 isolate the dmesg with hw.usb.uhci.debug=3D15 (please see bellow). As for= =20 the version of FreeBSD (I guess I should have mentioned it before), I'm=20 running STABLE.=20 DMESG for (1): Sep 3 07:21:23 sol kernel: uhci_device_intr_open: best=3D9 interval=3D10 Sep 3 07:21:23 sol kernel: uhci_device_ctrl_start: type=3D0x02, request=3D0x01, wValue=3D0x0000, wIndex=3D0x0082 len=3D0, addr=3D124, endpt= =3D0 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D0 len=3D8 speed=3D1 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: nexttog=3D1; data before transfer: Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc60) at 149d1c64 =3D link=3D0x149d1c84 status=3D0x1c8003ff token=3D0x00e07c2d buffer=3D0x149d1c5= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 149d1c84 1c8003ff,errcnt=3D3,actlen=3D0 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxlen=3D8 Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc80) at 149d1c84 =3D link=3D0x00000001 status=3D0x1d8003ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 1 1d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,maxlen=3D0 Sep 3 07:21:23 sol kernel: _uhci_append_qh: 0xc1eddce0 to 0xd94d0000 Sep 3 07:21:23 sol kernel: uhci_non_isoc_done: xfer=3D0xc1edda80 pipe=3D0xc1a4c004 transfer done Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc60) at 149d1c64 =3D link=3D0x149d1c84 status=3D0x1c000007 token=3D0x00e07c2d buffer=3D0x149d1c5= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 149d1c84 1c000007,errcnt=3D3,actlen=3D8 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxl= en=3D8 Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc80) at 149d1c84 =3D link=3D0x00000001 status=3D0x1d0007ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 1 1d0007ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,= maxlen=3D0 Sep 3 07:21:23 sol kernel: uhci_non_isoc_done: actlen=3D8 Sep 3 07:21:23 sol kernel: uhci_device_done: xfer=3D0xc1edda80, pipe=3D0xc1a4c004 length=3D8 error=3D0 Sep 3 07:21:23 sol kernel: _uhci_remove_qh: 0xc1eddce0 from 0xc1eddce0 Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 active Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 is still active Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 active Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 is still active Sep 3 07:21:23 sol kernel: uhci_device_intr_start: xfer=3D0xc1edd800 len=3D6 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D2 len=3D6 speed=3D1 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: nexttog=3D0; data before transfer: Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1edd9e0) at 149d19e4 =3D link=3D0x149d1a04 status=3D0x3c8003ff token=3D0x00817c69 buffer=3D0x149d19d= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 149d1a04 3c8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D2,D=3D0,maxlen=3D5 Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1edda00) at 149d1a04 =3D link=3D0x00000001 status=3D0x3d8003ff token=3D0x00097c69 buffer=3D0x149d19d= 5 Sep 3 07:21:23 sol kernel: uhci_dump_td: 1 3d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D2,D=3D1,maxlen=3D1 Sep 3 07:21:23 sol kernel: _uhci_append_qh: 0xc1edda60 to 0xd94ce120 Sep 3 07:21:24 sol kernel: uhci_non_isoc_done: xfer=3D0xc1edd800 pipe=3D0xc1a4c17c transfer done Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1edd9e0) at 149d19e4 =3D link=3D0x149d1a04 status=3D0x1c000004 token=3D0x00817c69 buffer=3D0x149d19d= 0 Sep 3 07:21:24 sol kernel: uhci_dump_td: 149d1a04 1c000004,errcnt=3D3,actlen=3D5 pid=3D69,addr=3D124,endpt=3D2,D=3D0,maxl= en=3D5 Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1edda00) at 149d1a04 =3D link=3D0x00000001 status=3D0x1d500000 token=3D0x00097c69 buffer=3D0x149d19d= 5 Sep 3 07:21:24 sol kernel: uhci_dump_td: 1 1d500000,errcnt=3D3,actlen=3D1 pid=3D69,addr=3D124,endpt=3D2,D=3D1,maxlen=3D1 Sep 3 07:21:24 sol kernel: uhci_non_isoc_done: actlen=3D6 Sep 3 07:21:24 sol kernel: uhci_device_done: xfer=3D0xc1edd800, pipe=3D0xc1a4c17c length=3D6 error=3D18 Sep 3 07:21:24 sol kernel: _uhci_remove_qh: 0xc1edda60 from 0xc1edda60 Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 active Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 is still active Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 active Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 is still active Sep 3 07:21:24 sol kernel: uhci_device_ctrl_start: type=3D0x02, request=3D0x01, wValue=3D0x0000, wIndex=3D0x0082 len=3D0, addr=3D124, endpt= =3D0 Sep 3 07:21:24 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D0 len=3D8 speed=3D1 Sep 3 07:21:24 sol kernel: uhci_setup_standard_chain: nexttog=3D1; data before transfer: Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1eddc60) at 149d1c64 =3D link=3D0x149d1c84 status=3D0x1c8003ff token=3D0x00e07c2d buffer=3D0x149d1c5= 0 Sep 3 07:21:24 sol kernel: uhci_dump_td: 149d1c84 1c8003ff,errcnt=3D3,actlen=3D0 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxlen=3D8 Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1eddc80) at 149d1c84 =3D link=3D0x00000001 status=3D0x1d8003ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:21:24 sol kernel: uhci_dump_td: 1 1d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,maxlen=3D0 Sep 3 07:21:24 sol kernel: _uhci_append_qh: 0xc1eddce0 to 0xd94d0000 Sep 3 07:21:24 sol kernel: uhci_device_done: xfer=3D0xc1edda80, pipe=3D0xc1a4c004 length=3D8 error=3D5 Sep 3 07:21:24 sol kernel: _uhci_remove_qh: 0xc1eddce0 from 0xc1eddce0 Sep 3 07:21:24 sol kernel: uhci_device_done: xfer=3D0xc1edd800, pipe=3D0xc1a4c17c length=3D6 error=3D5 Sep 3 07:21:24 sol kernel: _uhci_remove_qh: 0xc1edda60 from 0xd94ce120 Sep 3 07:58:38 sol login: ROOT LOGIN (root) ON ttyv2 Sep 3 07:58:51 sol kernel: uhci_device_intr_open: best=3D9 interval=3D10 Sep 3 07:58:51 sol kernel: uhci_device_ctrl_start: type=3D0x02, request=3D0x01, wValue=3D0x0000, wIndex=3D0x0082 len=3D0, addr=3D124, endpt= =3D0 Sep 3 07:58:51 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D0 len=3D8 speed=3D1 Sep 3 07:58:51 sol kernel: uhci_setup_standard_chain: nexttog=3D1; data before transfer: Sep 3 07:58:51 sol kernel: uhci_dump_td: TD(0xc1cf7c60) at 1802bc64 =3D link=3D0x1802bc84 status=3D0x1c8003ff token=3D0x00e07c2d buffer=3D0x1802bc5= 0 Sep 3 07:58:51 sol kernel: uhci_dump_td: 1802bc84 1c8003ff,errcnt=3D3,actlen=3D0 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxlen=3D8 Sep 3 07:58:51 sol kernel: uhci_dump_td: TD(0xc1cf7c80) at 1802bc84 =3D link=3D0x00000001 status=3D0x1d8003ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:58:51 sol kernel: uhci_dump_td: 1 1d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,maxlen=3D0 Sep 3 07:58:51 sol kernel: _uhci_append_qh: 0xc1cf7ce0 to 0xd94d0000 Sep 3 07:58:51 sol kernel: uhci_non_isoc_done: xfer=3D0xc1cf7a80 pipe=3D0xc1a87004 transfer done Sep 3 07:58:51 sol kernel: uhci_dump_td: TD(0xc1cf7c60) at 1802bc64 =3D link=3D0x1802bc84 status=3D0x1c000007 token=3D0x00e07c2d buffer=3D0x1802bc5= 0 Sep 3 07:58:51 sol kernel: uhci_dump_td: 1802bc84 1c000007,errcnt=3D3,actlen=3D8 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxl= en=3D8 Sep 3 07:58:51 sol kernel: uhci_dump_td: TD(0xc1cf7c80) at 1802bc84 =3D link=3D0x00000001 status=3D0x1d0007ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:58:51 sol kernel: uhci_dump_td: 1 1d0007ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,= maxlen=3D0 Sep 3 07:58:51 sol kernel: uhci_non_isoc_done: actlen=3D8 Sep 3 07:58:51 sol kernel: uhci_device_done: xfer=3D0xc1cf7a80, pipe=3D0xc1a87004 length=3D8 error=3D0 Sep 3 07:58:51 sol kernel: _uhci_remove_qh: 0xc1cf7ce0 from 0xc1cf7ce0 Sep 3 07:58:51 sol kernel: uhci_check_transfer: xfer=3D0xc1bdd000 active Sep 3 07:58:51 sol kernel: uhci_check_transfer: xfer=3D0xc1bdd000 is still active Sep 3 07:58:51 sol kernel: uhci_check_transfer: xfer=3D0xc1d8e800 active Sep 3 07:58:51 sol kernel: uhci_check_transfer: xfer=3D0xc1d8e800 is still active Sep 3 07:58:51 sol kernel: uhci_device_intr_start: xfer=3D0xc1cf7800 len=3D6 Sep 3 07:58:51 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D2 len=3D6 speed=3D1 Sep 3 07:58:51 sol kernel: uhci_setup_standard_chain: nexttog=3D0; data before transfer: Sep 3 07:58:51 sol kernel: uhci_dump_td: TD(0xc1cf79e0) at 1802b9e4 =3D link=3D0x1802ba04 status=3D0x3c8003ff token=3D0x00817c69 buffer=3D0x1802b9d= 0 Sep 3 07:58:51 sol kernel: uhci_dump_td: 1802ba04 3c8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D2,D=3D0,maxlen=3D5 Sep 3 07:58:51 sol kernel: uhci_dump_td: TD(0xc1cf7a00) at 1802ba04 =3D link=3D0x00000001 status=3D0x3d8003ff token=3D0x00097c69 buffer=3D0x1802b9d= 5 Sep 3 07:58:51 sol kernel: uhci_dump_td: 1 3d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D2,D=3D1,maxlen=3D1 Sep 3 07:58:51 sol kernel: _uhci_append_qh: 0xc1cf7a60 to 0xd94ce120 Sep 3 07:58:52 sol kernel: uhci_non_isoc_done: xfer=3D0xc1cf7800 pipe=3D0xc1a8717c transfer done Sep 3 07:58:52 sol kernel: uhci_dump_td: TD(0xc1cf79e0) at 1802b9e4 =3D link=3D0x1802ba04 status=3D0x1c000004 token=3D0x00817c69 buffer=3D0x1802b9d= 0 Sep 3 07:58:52 sol kernel: uhci_dump_td: 1802ba04 1c000004,errcnt=3D3,actlen=3D5 pid=3D69,addr=3D124,endpt=3D2,D=3D0,maxl= en=3D5 Sep 3 07:58:52 sol kernel: uhci_dump_td: TD(0xc1cf7a00) at 1802ba04 =3D link=3D0x00000001 status=3D0x1d500000 token=3D0x00097c69 buffer=3D0x1802b9d= 5 Sep 3 07:58:52 sol kernel: uhci_dump_td: 1 1d500000,errcnt=3D3,actlen=3D1 pid=3D69,addr=3D124,endpt=3D2,D=3D1,maxlen=3D1 Sep 3 07:58:52 sol kernel: uhci_non_isoc_done: actlen=3D6 Sep 3 07:58:52 sol kernel: uhci_device_done: xfer=3D0xc1cf7800, pipe=3D0xc1a8717c length=3D6 error=3D18 Sep 3 07:58:52 sol kernel: _uhci_remove_qh: 0xc1cf7a60 from 0xc1cf7a60 Sep 3 07:58:52 sol kernel: uhci_check_transfer: xfer=3D0xc1bdd000 active Sep 3 07:58:52 sol kernel: uhci_check_transfer: xfer=3D0xc1bdd000 is still active Sep 3 07:58:52 sol kernel: uhci_check_transfer: xfer=3D0xc1d8e800 active Sep 3 07:58:52 sol kernel: uhci_check_transfer: xfer=3D0xc1d8e800 is still active Sep 3 07:58:52 sol kernel: uhci_device_ctrl_start: type=3D0x02, request=3D0x01, wValue=3D0x0000, wIndex=3D0x0082 len=3D0, addr=3D124, endpt= =3D0 Sep 3 07:58:52 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D0 len=3D8 speed=3D1 Sep 3 07:58:52 sol kernel: uhci_setup_standard_chain: nexttog=3D1; data before transfer: Sep 3 07:58:52 sol kernel: uhci_dump_td: TD(0xc1cf7c60) at 1802bc64 =3D link=3D0x1802bc84 status=3D0x1c8003ff token=3D0x00e07c2d buffer=3D0x1802bc5= 0 Sep 3 07:58:52 sol kernel: uhci_dump_td: 1802bc84 1c8003ff,errcnt=3D3,actlen=3D0 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxlen=3D8 Sep 3 07:58:52 sol kernel: uhci_dump_td: TD(0xc1cf7c80) at 1802bc84 =3D link=3D0x00000001 status=3D0x1d8003ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:58:52 sol kernel: uhci_dump_td: 1 1d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,maxlen=3D0 Sep 3 07:58:52 sol kernel: _uhci_append_qh: 0xc1cf7ce0 to 0xd94d0000 Sep 3 07:58:53 sol kernel: uhci_device_done: xfer=3D0xc1cf7a80, pipe=3D0xc1a87004 length=3D8 error=3D5 Sep 3 07:58:53 sol kernel: _uhci_remove_qh: 0xc1cf7ce0 from 0xc1cf7ce0 Sep 3 07:58:53 sol kernel: uhci_device_done: xfer=3D0xc1cf7800, pipe=3D0xc1a8717c length=3D6 error=3D5 Sep 3 07:58:53 sol kernel: _uhci_remove_qh: 0xc1cf7a60 from 0xd94ce120 DMESG for (2): Sep 3 07:21:23 sol kernel: uhci_device_intr_open: best=3D9 interval=3D10 Sep 3 07:21:23 sol kernel: uhci_device_ctrl_start: type=3D0x02, request=3D0x01, wValue=3D0x0000, wIndex=3D0x0082 len=3D0, addr=3D124, endpt= =3D0 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D0 len=3D8 speed=3D1 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: nexttog=3D1; data before transfer: Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc60) at 149d1c64 =3D link=3D0x149d1c84 status=3D0x1c8003ff token=3D0x00e07c2d buffer=3D0x149d1c5= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 149d1c84 1c8003ff,errcnt=3D3,actlen=3D0 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxlen=3D8 Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc80) at 149d1c84 =3D link=3D0x00000001 status=3D0x1d8003ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 1 1d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,maxlen=3D0 Sep 3 07:21:23 sol kernel: _uhci_append_qh: 0xc1eddce0 to 0xd94d0000 Sep 3 07:21:23 sol kernel: uhci_non_isoc_done: xfer=3D0xc1edda80 pipe=3D0xc1a4c004 transfer done Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc60) at 149d1c64 =3D link=3D0x149d1c84 status=3D0x1c000007 token=3D0x00e07c2d buffer=3D0x149d1c5= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 149d1c84 1c000007,errcnt=3D3,actlen=3D8 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxl= en=3D8 Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1eddc80) at 149d1c84 =3D link=3D0x00000001 status=3D0x1d0007ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 1 1d0007ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,= maxlen=3D0 Sep 3 07:21:23 sol kernel: uhci_non_isoc_done: actlen=3D8 Sep 3 07:21:23 sol kernel: uhci_device_done: xfer=3D0xc1edda80, pipe=3D0xc1a4c004 length=3D8 error=3D0 Sep 3 07:21:23 sol kernel: _uhci_remove_qh: 0xc1eddce0 from 0xc1eddce0 Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 active Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 is still active Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 active Sep 3 07:21:23 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 is still active Sep 3 07:21:23 sol kernel: uhci_device_intr_start: xfer=3D0xc1edd800 len=3D6 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D2 len=3D6 speed=3D1 Sep 3 07:21:23 sol kernel: uhci_setup_standard_chain: nexttog=3D0; data before transfer: Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1edd9e0) at 149d19e4 =3D link=3D0x149d1a04 status=3D0x3c8003ff token=3D0x00817c69 buffer=3D0x149d19d= 0 Sep 3 07:21:23 sol kernel: uhci_dump_td: 149d1a04 3c8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D2,D=3D0,maxlen=3D5 Sep 3 07:21:23 sol kernel: uhci_dump_td: TD(0xc1edda00) at 149d1a04 =3D link=3D0x00000001 status=3D0x3d8003ff token=3D0x00097c69 buffer=3D0x149d19d= 5 Sep 3 07:21:23 sol kernel: uhci_dump_td: 1 3d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D2,D=3D1,maxlen=3D1 Sep 3 07:21:23 sol kernel: _uhci_append_qh: 0xc1edda60 to 0xd94ce120 Sep 3 07:21:24 sol kernel: uhci_non_isoc_done: xfer=3D0xc1edd800 pipe=3D0xc1a4c17c transfer done Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1edd9e0) at 149d19e4 =3D link=3D0x149d1a04 status=3D0x1c000004 token=3D0x00817c69 buffer=3D0x149d19d= 0 Sep 3 07:21:24 sol kernel: uhci_dump_td: 149d1a04 1c000004,errcnt=3D3,actlen=3D5 pid=3D69,addr=3D124,endpt=3D2,D=3D0,maxl= en=3D5 Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1edda00) at 149d1a04 =3D link=3D0x00000001 status=3D0x1d500000 token=3D0x00097c69 buffer=3D0x149d19d= 5 Sep 3 07:21:24 sol kernel: uhci_dump_td: 1 1d500000,errcnt=3D3,actlen=3D1 pid=3D69,addr=3D124,endpt=3D2,D=3D1,maxlen=3D1 Sep 3 07:21:24 sol kernel: uhci_non_isoc_done: actlen=3D6 Sep 3 07:21:24 sol kernel: uhci_device_done: xfer=3D0xc1edd800, pipe=3D0xc1a4c17c length=3D6 error=3D18 Sep 3 07:21:24 sol kernel: _uhci_remove_qh: 0xc1edda60 from 0xc1edda60 Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 active Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1d8c800 is still active Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 active Sep 3 07:21:24 sol kernel: uhci_check_transfer: xfer=3D0xc1eae000 is still active Sep 3 07:21:24 sol kernel: uhci_device_ctrl_start: type=3D0x02, request=3D0x01, wValue=3D0x0000, wIndex=3D0x0082 len=3D0, addr=3D124, endpt= =3D0 Sep 3 07:21:24 sol kernel: uhci_setup_standard_chain: addr=3D124 endpt=3D0 len=3D8 speed=3D1 Sep 3 07:21:24 sol kernel: uhci_setup_standard_chain: nexttog=3D1; data before transfer: Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1eddc60) at 149d1c64 =3D link=3D0x149d1c84 status=3D0x1c8003ff token=3D0x00e07c2d buffer=3D0x149d1c5= 0 Sep 3 07:21:24 sol kernel: uhci_dump_td: 149d1c84 1c8003ff,errcnt=3D3,actlen=3D0 pid=3D2d,addr=3D124,endpt=3D0,D=3D0,maxlen=3D8 Sep 3 07:21:24 sol kernel: uhci_dump_td: TD(0xc1eddc80) at 149d1c84 =3D link=3D0x00000001 status=3D0x1d8003ff token=3D0xffe87c69 buffer=3D0x0000000= 0 Sep 3 07:21:24 sol kernel: uhci_dump_td: 1 1d8003ff,errcnt=3D3,actlen=3D0 pid=3D69,addr=3D124,endpt=3D0,D=3D1,maxlen=3D0 Sep 3 07:21:24 sol kernel: _uhci_append_qh: 0xc1eddce0 to 0xd94d0000 Sep 3 07:21:24 sol kernel: uhci_device_done: xfer=3D0xc1edda80, pipe=3D0xc1a4c004 length=3D8 error=3D5 Sep 3 07:21:24 sol kernel: _uhci_remove_qh: 0xc1eddce0 from 0xc1eddce0 Sep 3 07:21:24 sol kernel: uhci_device_done: xfer=3D0xc1edd800, pipe=3D0xc1a4c17c length=3D6 error=3D5 Sep 3 07:21:24 sol kernel: _uhci_remove_qh: 0xc1edda60 from 0xd94ce120 1) this release is a little old, and I will update it next month: >=20 > Download the three files below into a new directory and type > "make install" (to uninstall type "make deinstall") > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 >=20 > 2) this package was updated not long ago, but it will also install an ISD= N > system, but that will not cause any trouble. >=20 > Download the three files below into a new directory and type "make=20 > install". > To uninstall type "make deinstall". >=20 > http://home.c2i.net/hselasky/isdn4bsd/privat/temporary/155/Makefile >=20 > http://home.c2i.net/hselasky/isdn4bsd/privat/temporary/new_ihfc_1_5_5.tar= .bz2 >=20 > http://home.c2i.net/hselasky/isdn4bsd/privat/temporary/new_ihfc_1_5_5.dif= f.bz2 >=20 > I am assuming that you are using FreeBSD 5/6/7. Turn on UHCI debugging an= d > post the messages again, if it does not work. >=20 > --HPS >=20 --=20 Cheers, John-Paul Andrusky