From owner-freebsd-usb@FreeBSD.ORG Sun Mar 11 23:01:06 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75591106564A; Sun, 11 Mar 2012 23:01:06 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id E685B8FC08; Sun, 11 Mar 2012 23:01:05 +0000 (UTC) Received: by yhgm50 with SMTP id m50so2366372yhg.13 for ; Sun, 11 Mar 2012 16:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=g9X9Wp2CdZLKMWbU2wA9shmSYb0RR6aHuOJhtiCr0OU=; b=0QmAgxXeeShLIZ54pbkG3VvQ8zQoagFgAFpvhjOWx7UGIxrkZBkBtR7N/nXnzoqV8B 3outNvo92HfByRHbaVm3WPIUtwjFW/GstWsJntX4IvSjl/jXhW6MbUUReZHLtdBqt/15 /ai93tm9aX/PryQJeiZnX30NsnWZC+eudfpKyOClC2Q8smhyBYSqWPBr+kZurLfuN1NB Sry7KtaquQ3U/JHm0aK7DcvyzH+p6Mdi55uAwUuuhpTA7GC37q0e7FBEpkRUAqomsp7Z CdNRRz61qi86SDHN9sYIkL38+RhYfaRt3ns18G6mnpD6WureAincFiLThFf9iZjhoR5S TD1w== MIME-Version: 1.0 Received: by 10.60.24.9 with SMTP id q9mr4256028oef.4.1331506865404; Sun, 11 Mar 2012 16:01:05 -0700 (PDT) Received: by 10.60.17.10 with HTTP; Sun, 11 Mar 2012 16:01:04 -0700 (PDT) Date: Sun, 11 Mar 2012 18:01:04 -0500 Message-ID: From: Brandon Gooch To: freebsd-usb@freebsd.org Content-Type: multipart/mixed; boundary=e89a8ff1c4e2ba7cf804baff9918 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Alexander Motin , Hans Petter Selasky , Nathan Whitehorn Subject: Ongoing battle with umass(4) and xhci(4) 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: Sun, 11 Mar 2012 23:01:06 -0000 --e89a8ff1c4e2ba7cf804baff9918 Content-Type: text/plain; charset=ISO-8859-1 So, I have been (off-and-on) trying to debug issues with my XHCI ports, USB flash drives, eternal USB disk enclosures, and external USB (w/ eSATA) hard drive bays. Seems that some devices just work better than others, but even the devices that do work only do so after considerable time waiting for attachment. Here's an example of this, observed only moments ago: (This e-mail message was originally written March 10 at around 1:30 AM CST) Mar 10 01:24:55 m6500 kernel: ugen1.2: at usbus1 Mar 10 01:24:55 m6500 kernel: umass0: on usbus1 Mar 10 01:24:55 m6500 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0100 Mar 10 01:24:55 m6500 kernel: umass0:6:0:-1: Attached to scbus6 Mar 10 01:25:59 m6500 kernel: (probe0:umass-sim0:0:0:0): Down reving Protocol Version from 2 to 0? Mar 10 01:25:59 m6500 kernel: pass3 at umass-sim0 bus 0 scbus6 target 0 lun 0 Mar 10 01:25:59 m6500 kernel: pass3: < > Fixed Direct Access SCSI-0 device Mar 10 01:25:59 m6500 kernel: pass3: Serial Number EA054327FFFF Mar 10 01:25:59 m6500 kernel: pass3: 40.000MB/s transfers Mar 10 01:25:59 m6500 kernel: GEOM: new disk da0 Mar 10 01:25:59 m6500 kernel: da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 Mar 10 01:25:59 m6500 kernel: da0: < > Fixed Direct Access SCSI-0 device Mar 10 01:25:59 m6500 kernel: da0: Serial Number EA054327FFFF Mar 10 01:25:59 m6500 kernel: da0: 40.000MB/s transfers Mar 10 01:25:59 m6500 kernel: da0: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) I've also attached two extracted pieces from /var/log/messages demonstrating two different devices behaving very differently (no surprise there) but very badly. Searching through the mailing list has yielded results of showing individuals having issues with devices attaching on XHCI (and even EHCI), with similar output from the kernel (CAM/SCSI-related stuff). As an example, see [1] below. Interestingly, the XHCI ports have no issues with mice, keyboards, or USB serial adapters -- my Android phone unfortunately falls into the umass(4) category -- so it seems that the ports themselves are sound. And I should add that recent Linux distros (and of course Windows 7) handle every single device that I've had issues with in FreeBSD. Is there something fishy happening between the USB stack and CAM? hmmm... -Brandon [1] http://lists.freebsd.org/pipermail/freebsd-usb/2012-February/011064.html --e89a8ff1c4e2ba7cf804baff9918-- From owner-freebsd-usb@FreeBSD.ORG Mon Mar 12 08:44:46 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4097F1065672; Mon, 12 Mar 2012 08:44:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.c2i.net [212.247.154.130]) by mx1.freebsd.org (Postfix) with ESMTP id 5ABB68FC0C; Mon, 12 Mar 2012 08:44:45 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 247306345; Mon, 12 Mar 2012 09:17:00 +0100 From: Hans Petter Selasky To: Brandon Gooch Date: Mon, 12 Mar 2012 09:15:18 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201203120915.18908.hselasky@c2i.net> Cc: Alexander Motin , Nathan Whitehorn , "freebsd-usb@freebsd.org" Subject: Re: Ongoing battle with umass(4) and xhci(4) 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, 12 Mar 2012 08:44:46 -0000 > > Is there something fishy happening between the USB stack and CAM? hmmm... > No, It is not the CAM layer this time, though there are some bugs there too. In the beginning of the log I see that in the successful case we receive a stall event: -xhci_check_transfer: slot=1 epno=3 remainder=13 status=6 -xhci_check_transfer: TD is last -xhci_cmd_stop_ep: -xhci_check_command: Received command event -xhci_configure_reset_endpoint: Could not stop endpoint 3 -xhci_cmd_reset_ep: -xhci_check_command: Received command event -xhci_cmd_set_tr_dequeue_ptr: -xhci_check_command: Received command event -xhci_cmd_evaluate_ctx: -xhci_check_command: Received command event -xhci_cmd_configure_ep: -xhci_check_command: Received command event -xhci_configure_reset_endpoint: Could not configure endpoint 3 -xhci_ep_clear_stall: -xhci_device_generic_enter: -xhci_setup_generic_chain_sub: NTRB=1 -xhci_setup_generic_chain_sub: LINK=0x82883180 -xhci_setup_generic_chain_sub: NTRB=1 -xhci_setup_generic_chain_sub: LINK=0x82883000 -xhci_setup_generic_chain: first=0xffffff8460883300 last=0xffffff8460883180 -xhci_device_generic_start: -xhci_transfer_insert: qh_pos = 1 -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 -xhci_check_transfer: Following next TD -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 -xhci_check_transfer: TD is last This is not received in the failing case. Maybe this indicates a lost interrupt or something like that? In /sys/dev/usb/controller/xhci.c static void xhci_interrupt_poll(struct xhci_softc *sc) Add a printf: if (i == XHCI_MAX_EVENTS) { i = 0; j ^= 1; /* check for timeout */ if (!--t) { + printf("XHCI: Timeout\n"); break; } } See if what happens. Also change the xhci.c code to call xhci_interrupt_poll() two times instead of one. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Mar 12 11:07:24 2012 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DF701065672 for ; Mon, 12 Mar 2012 11:07:24 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4B9F08FC15 for ; Mon, 12 Mar 2012 11:07:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2CB7ObK072507 for ; Mon, 12 Mar 2012 11:07:24 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2CB7NkV072505 for freebsd-usb@FreeBSD.org; Mon, 12 Mar 2012 11:07:23 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Mar 2012 11:07:23 GMT Message-Id: <201203121107.q2CB7NkV072505@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org 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, 12 Mar 2012 11:07:24 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/165815 usb add k3772z 3g modem support o usb/165163 usb [keyboard] The USB RF keyboard and mouse become non-re o usb/164058 usb Lexar 8GB USB flash drive doesn't work by default o usb/163328 usb [usb] Support for Atheros USB abgn devices o kern/163091 usb [panic] Fatal trap 12: page fault while in kernel mode o usb/162306 usb usb devices cant get address asignation, no memories, o usb/162054 usb usbdump just hangs on 9.0-RC1 f usb/161793 usb poor EHCI usb2 i/o performance o usb/160436 usb ucom wedges machine on parity error ? o usb/160299 usb MicroSDHC-to-USB adapters do not work in FreeBSD 8.x o usb/160192 usb [install] Installation from USB-Stick doesn't find the o usb/159274 usb USB 3.0 Etron EJ168A does not work. f usb/159191 usb [fusefs-ntfs] write on fusefs-ntfs mounted partition r o usb/157376 usb LaCie USB disk not recognized o usb/157074 usb [boot] [usb8] vfs_mountroot_ask is called when no usb o usb/156898 usb [keyboard] usb keyboard does not work while boot (ps2 f usb/156735 usb Need Quirk for Goflex USB Disk Drives o usb/156725 usb USB stack stall cause complete system input loss o usb/156596 usb [ehci] Extremely high interrupt rate on ehci/uhci IRQ1 o usb/156000 usb rum(4) Fatal trap 18: integer divide fault while in ke f usb/155996 usb NanoBSD not booted as Disk o usb/155784 usb Problem with Transcend StoreJet 25M3 (2AJ1) on Asus M2 o usb/154506 usb [umass] Copying dir with large files makes FreeBSD loa o usb/154192 usb [umass] In Garmin Oregon GPS, only the first umass dev o i386/153851 usb [keyboard] keyboard issues on new Intel Mother boards. o usb/153703 usb [keyboard] My USB keyboard can not be used in 8-STABLE o usb/153609 usb [zyd] [panic] kernel: Fatal trap 12: page fault while o usb/153149 usb [umass] USB stick quirk regression [regression] o usb/152075 usb [usb8] [ehci] [request] Add quirk for CS5536 USB o usb/150892 usb [zyd] Whenever network contacted in any shape, way or o usb/150189 usb [run] [usb8] [patch] if_run appears to corrupt IP traf p usb/149764 usb [u3g] [patch] usbdevs update: Huawei K3765 3G modem o usb/149283 usb [uftdi] avrdude unable to talk to Arduino board (via u o usb/149162 usb [ural] ASUS WL-167g doesn't work in 8.1 (continue of 1 s usb/148702 usb [usb8] [request] IO DATA USB-RSAQ5 support on FreeBSD- o usb/148080 usb usbconfig(8) sometimes does not turn off the device o usb/147516 usb [umass] [usb67] kernel unable to deal with Olympus USB o i386/147475 usb [install] FreeBSD 8.x does not install on ASUS K8N4-E o usb/146840 usb [hang] FreeBSD 7.2 / 7.3 / 8.0 hang at startup after e o usb/146153 usb [axe] [usb8] Hosts in network doesn't receive any pack f usb/146054 usb [urtw] [usb8] urtw driver potentially out of date f usb/145513 usb [usb8] New USB stack: no new devices after forced usb p usb/145455 usb [usb8] [patch] USB debug support cannot be disabled o usb/145415 usb [umass] [usb8] USB card reader does not create slices a usb/145184 usb GENERIC can't mount root from USB on Asus EEE o usb/145165 usb [keyboard] [usb8] ukbd_set_leds_callback: error=USB_ER f kern/144938 usb [keyboard] [boot] Boot Failure with Apple (MB869LL/A) o usb/144387 usb [run] [panic] if_run panic o usb/144043 usb [umass] [usb8] USB DLT tape drive throws random errors a usb/143790 usb [boot] [cam] can not boot from usb hdd f usb/143620 usb [cdce] [usb8] the module if_cdce doesn't support my Op f usb/143294 usb [usb8] copying process stops at some time (10 - 50 sec o usb/143286 usb [ukbd] [usb8] [boot] boot failures on RELENG_8 system p usb/143186 usb [usbdevs] [usb8] [patch] add USB device IDs for Google a usb/143139 usb [umass] [usb8] [patch] Quirk for Century EX35SW4_SB4 J p usb/143045 usb [umass] [usb8] [patch] mounting Fujitsu 2600Z camera d o usb/142991 usb [uftdi] [usb67] [patch] Patch to add Crystalfontz 533 f usb/142989 usb [usb8] canon eos 50D attaches but detaches after few s f usb/142957 usb [umass] [usb8] [patch] patch for USB disk SYNCHRONIZE o usb/142719 usb [urtw] [usb8] AirLive WL-1600USB (RTL8187L chipset) fa o usb/142713 usb [usb67] [panic] Kernel Panik when connecting an IPhone f usb/142276 usb [umass] [usb8] Cache Synchronization Error with Olympu o usb/142229 usb [ums] [usb8] [hang] connecting a USB mouse to a Dell P f usb/141680 usb [uath] [usb8] Netgear WG111T not working with uath dri o usb/141664 usb [pcm] [usb8] Logitech USB microphone failure [regressi o usb/141474 usb [boot] [usb8] FreeBSD 8.0 can not install from USB CDR o usb/141327 usb [ukbd] [usb67] USB kbd not working with 7.1+PAE on IBM o usb/141212 usb [ukbd] [usb8] ukbd_set_leds_callback:700: error=USB_ER o kern/141011 usb [usb8] Encrypted root, geli password at boot; enter ke o usb/140920 usb [install] [usb8] USB based install fails on 8.0-RELEAS o usb/140893 usb [urtw] [usb8] WPA2 not working on rtl8187b o kern/140849 usb [ums] [usb8] USB mouse doesn't work under FreeBSD 8.0- a usb/140810 usb [uftdi] [usb8] 8.X copy and paste problem / tty overfl o usb/140477 usb [umass] [usb8] [patch] allow boot-time attachment of d o usb/140236 usb [msdosfs] [usb8] Labels wiped on external Journaled US o usb/140160 usb [usb8] [acpi] USB ports are no longer "active" after A s usb/139990 usb [panic] [patch] [usb67] Kernel frequently panics after o usb/139243 usb [uhci] [usb67] unplug prolific USB serial -> uhci_abor f usb/138882 usb [ohci] [panic] [usb67] Can't install FreeBSD 7.2 due t o usb/138798 usb [boot] [usb8] 8.0-BETA4 can't boot from USB flash driv o usb/138659 usb [usb8][uftdi] driver broken in RELENG_8/CURRENT o usb/138175 usb [usb67] [boot] System cannot boot, when USB reader wit o usb/138124 usb [snd_uaudio] [usb8] Axed uaudio functionality in the u o usb/138119 usb [usb67] [usb8] MultiBay CDROM (probably on USB bus) is f usb/137872 usb [usb67] [boot] slow booting on usb flash drive o usb/137806 usb [ukbd] [usb67] USB keyboard doesn't work until it's un o usb/137763 usb [usb67][ukbd] Logitech wireless keyboard media keys no o usb/137377 usb [usb8] request support for Huawei E180 o usb/137341 usb [usb8][rum] driver if_rum doesn't work at all and thro f usb/137190 usb [usb8][patch] inhibit spurious button releases for som o usb/137189 usb [usb8][patch] create and use sysctl nodes for HID repo p usb/137188 usb [usb8][patch] correctly handle USB report descriptors o usb/137129 usb [ums] [usb8] SteelSeries Ikari USB laser mouse not att o usb/135938 usb [aue] [usb67] aue driver only passes traffic in promis o usb/135542 usb [keyboard] boot loader does not work with a usb keyboa o usb/135206 usb machine reboots when inserted USB device f usb/135200 usb SAMSUNG i740 usb mass: Synchronize cache failed, statu o usb/134950 usb Lowering DTR for USB-modem via ubsa is not possible o usb/134299 usb Kernel Panic plugging in MF626 USB UMTS Stick u3g o usb/134193 usb System freeze on usb MP3 player insertion o usb/134085 usb [umass] Adding usb quirk for Sony USB flash drive o usb/133989 usb [usb8] [ukbd] USB keyboard dead at mountroot> prompt o usb/133712 usb [ural] [patch] RE: Fixed an issue with ural(4) that wa o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb [rum] driver not working properly in hostap mode o usb/132594 usb USB subsystem causes page fault and crashes o usb/132080 usb [patch] [usb] [rum] [panic] Kernel panic after NOMEM c o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130230 usb [patch] [quirk] [usb67] [usb] [cam] [umass] Samsung El o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [usb8] DVD drive detects as 'da' device f usb/129766 usb [usb] [panic] plugging in usb modem HUAWEI E226 panics o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader s usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb [usb67] [patch] uaudio is not full duplex p usb/128803 usb [usbdevs] [patch] Quirk for I-Tuner Networks USBLCD4X2 o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive o usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/127926 usb [boot] USB Timeout during bootup s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should o usb/127342 usb [boot] [panic] enabling usb keyboard and mouse support o usb/127248 usb [ucom] panic while uplcom devices attach and detach o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c o usb/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125631 usb [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d f usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb [rum] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o kern/124130 usb [usb] gmirror fails to start usb devices that were pre o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122936 usb [ucom] [ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa s usb/122819 usb [usb67] [patch] Patch to provide dynamic additions to o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122547 usb [ehci] USB Printer not being recognized after reboot o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121275 usb [boot] [panic] FreeBSD fails to boot with usb legacy s o usb/121169 usb [umass] Issues with usb mp3 player o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS f usb/120786 usb [usb] [panic] Kernel panic when forced umount of a det o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119509 usb [usb] USB flaky on Dell Optiplex 755 o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117598 usb [snd_uaudio] [patch] Not possible to record with Plant o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a p usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/114682 usb [umass] generic USB media-card reader unusable o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114068 usb [usb67] [usb8] [umass] [patch] Problem with connection o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff s usb/113060 usb [usb67] [ulpt] [patch] Samsung printer not working in o usb/110856 usb [usb67] [ugen] [patch] interrupt in msgs are truncated o usb/107827 usb [usb67] [ohci] [panic] ohci_add_done addr not found o usb/107388 usb [usb67] [usb8] [new driver] [patch] add utoppy device o usb/106041 usb [usb67] [usb8] [request] FreeBSD does not recognise Mu s usb/103917 usb [usb67] [uhub] USB driver reports "Addr 0 should never o usb/103418 usb [usb67] [usb8] [patch] [request] usbhidctl(8) add abil o usb/103046 usb [usb67] [ulpt] [patch] ulpt event driven I/O with sele o usb/100746 usb [usb67] [ukbd] system does not boot due to USB keyboar o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o kern/99200 usb [usb67] SMP-Kernel crashes reliably when Bluetooth con o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/96457 usb [umass] [panic] fatback on umass = reboot o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync s usb/96120 usb [ums] [request] USB mouse not always detected s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg f usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/89954 usb [umass] [panic] USB Disk driver race condition? s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg o usb/88408 usb [axe] axe0 read PHY failed o usb/87648 usb [mouse] Logitech USB-optical mouse problem. f usb/87224 usb [usb] Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. s usb/80777 usb [request] usb_rem_task() should wait for callback to c s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails f usb/80040 usb [sound] [hang] Use of sound mixer causes system freeze o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/78984 usb [umass] [patch] Creative MUVO umass failure f usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device f usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for f usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) f usb/74771 usb [umass] [hang] mounting write-protected umass device a s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s s bin/57255 usb [patch] usbd(8) and multi-function devices s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 293 problems total. From owner-freebsd-usb@FreeBSD.ORG Tue Mar 13 03:37:57 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 125E01065674; Tue, 13 Mar 2012 03:37:57 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1278FC1A; Tue, 13 Mar 2012 03:37:56 +0000 (UTC) Received: by ghrr20 with SMTP id r20so119330ghr.13 for ; Mon, 12 Mar 2012 20:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=3VVIavyR9B7pfCBjt3VGsKot3Mdm5PL12JWRWXabHZ0=; b=G074OQH7b3OEAlJdDY9x3vwQh8mEH6ybztCUSdfpLk25hVY1sxdPW8kVAV0ESLwDe6 Y8qymJshjA2osX4WYamBgC91cdBFIr8y/Vqtjy6hWKQRloZHaFBdWxXmDfxUMHKGBTQD VU/OgCcfQAGz/pjPeM7RAu/PPCGwzsXLRZddYqnasNjIUa9K8N4Z8K/mKlqjDIzbgExc 9ghqXoEc7Yn9k4XoohPP+m5ciS9quWh2g43Xr2VnJwYo17a94ENVCcq1PzmTOqiQJt14 ndcChZT6GAGBT/c+potj27qy9aiVZsQMGxS6m+NCm/2COTvKdc4nv/8ZP0Jrft28irRO pWgA== MIME-Version: 1.0 Received: by 10.182.169.41 with SMTP id ab9mr10287979obc.4.1331609875612; Mon, 12 Mar 2012 20:37:55 -0700 (PDT) Received: by 10.60.17.10 with HTTP; Mon, 12 Mar 2012 20:37:55 -0700 (PDT) In-Reply-To: <201203120915.18908.hselasky@c2i.net> References: <201203120915.18908.hselasky@c2i.net> Date: Mon, 12 Mar 2012 22:37:55 -0500 Message-ID: From: Brandon Gooch To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Alexander Motin , Nathan Whitehorn , "freebsd-usb@freebsd.org" Subject: Re: Ongoing battle with umass(4) and xhci(4) 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, 13 Mar 2012 03:37:57 -0000 On Mon, Mar 12, 2012 at 3:15 AM, Hans Petter Selasky wro= te: >> >> Is there something fishy happening between the USB stack and CAM? hmmm..= . >> > > No, > > It is not the CAM layer this time, though there are some bugs there too. > > > In the beginning of the log I see that in the successful case we receive = a > stall event: > > -xhci_check_transfer: slot=3D1 epno=3D3 remainder=3D13 status=3D6 > -xhci_check_transfer: TD is last > -xhci_cmd_stop_ep: > -xhci_check_command: Received command event > -xhci_configure_reset_endpoint: Could not stop endpoint 3 > -xhci_cmd_reset_ep: > -xhci_check_command: Received command event > -xhci_cmd_set_tr_dequeue_ptr: > -xhci_check_command: Received command event > -xhci_cmd_evaluate_ctx: > -xhci_check_command: Received command event > -xhci_cmd_configure_ep: > -xhci_check_command: Received command event > -xhci_configure_reset_endpoint: Could not configure endpoint 3 > -xhci_ep_clear_stall: > -xhci_device_generic_enter: > -xhci_setup_generic_chain_sub: NTRB=3D1 > -xhci_setup_generic_chain_sub: LINK=3D0x82883180 > -xhci_setup_generic_chain_sub: NTRB=3D1 > -xhci_setup_generic_chain_sub: LINK=3D0x82883000 > -xhci_setup_generic_chain: first=3D0xffffff8460883300 last=3D0xffffff8460= 883180 > -xhci_device_generic_start: > -xhci_transfer_insert: qh_pos =3D 1 > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 > -xhci_check_transfer: Following next TD > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 > -xhci_check_transfer: TD is last > > > This is not received in the failing case. > > Maybe this indicates a lost interrupt or something like that? > > In /sys/dev/usb/controller/xhci.c > > static void > xhci_interrupt_poll(struct xhci_softc *sc) > > Add a printf: > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (i =3D=3D XHCI_MAX_EVENTS) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0i =3D 0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0j ^=3D 1; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* check for timeout */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!--t) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("XHCI: Timeout\n"); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > > > See if what happens. > > Also change the xhci.c code to call > > xhci_interrupt_poll() two times instead of one. > > > --HPS Unfortunately, the condition was never reached. I've started trying to dtrace xhci(4) function boundaries, and, well there's a lot of recursion with xhci_interrupt_poll(). However, I never see that function called from xhci_do_poll(), which is called from xhci_interrupt() (to "catch any lost interrupts" according to the comment). You may have already told me this, but what does "Down reving Protocol Version from 2 to 0?" in the success case on my system? Is this the USB protocol which is "down rev'ed"? If so, what USB level is this flash drive running at? -Brandon From owner-freebsd-usb@FreeBSD.ORG Tue Mar 13 06:24:40 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B188D106564A; Tue, 13 Mar 2012 06:24:40 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.c2i.net [212.247.154.98]) by mx1.freebsd.org (Postfix) with ESMTP id 813A18FC14; Tue, 13 Mar 2012 06:24:38 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe04.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 249520573; Tue, 13 Mar 2012 07:24:31 +0100 From: Hans Petter Selasky To: Brandon Gooch Date: Tue, 13 Mar 2012 07:22:48 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201203120915.18908.hselasky@c2i.net> In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@ =?iso-8859-1?q?d2+AyewRX=7DmAm=3BYp=0A=09=7CU=5B?=@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y> =?iso-8859-1?q?Y=7Dk1C4TfysrsUI=0A=09-=25GU9V5=5DiUZF=26nRn9mJ=27=3F=26?=>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203130722.48489.hselasky@c2i.net> Cc: Alexander Motin , Nathan Whitehorn , "freebsd-usb@freebsd.org" Subject: Re: Ongoing battle with umass(4) and xhci(4) 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, 13 Mar 2012 06:24:40 -0000 On Tuesday 13 March 2012 04:37:55 Brandon Gooch wrote: > On Mon, Mar 12, 2012 at 3:15 AM, Hans Petter Selasky wrote: > >> Is there something fishy happening between the USB stack and CAM? > >> hmmm... > > > > No, > > > > It is not the CAM layer this time, though there are some bugs there too. > > > > > > In the beginning of the log I see that in the successful case we receive > > a stall event: > > > > -xhci_check_transfer: slot=1 epno=3 remainder=13 status=6 > > -xhci_check_transfer: TD is last > > -xhci_cmd_stop_ep: > > -xhci_check_command: Received command event > > -xhci_configure_reset_endpoint: Could not stop endpoint 3 > > -xhci_cmd_reset_ep: > > -xhci_check_command: Received command event > > -xhci_cmd_set_tr_dequeue_ptr: > > -xhci_check_command: Received command event > > -xhci_cmd_evaluate_ctx: > > -xhci_check_command: Received command event > > -xhci_cmd_configure_ep: > > -xhci_check_command: Received command event > > -xhci_configure_reset_endpoint: Could not configure endpoint 3 > > -xhci_ep_clear_stall: > > -xhci_device_generic_enter: > > -xhci_setup_generic_chain_sub: NTRB=1 > > -xhci_setup_generic_chain_sub: LINK=0x82883180 > > -xhci_setup_generic_chain_sub: NTRB=1 > > -xhci_setup_generic_chain_sub: LINK=0x82883000 > > -xhci_setup_generic_chain: first=0xffffff8460883300 > > last=0xffffff8460883180 -xhci_device_generic_start: > > -xhci_transfer_insert: qh_pos = 1 > > -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 > > -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 > > -xhci_check_transfer: Following next TD > > -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 > > -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 > > -xhci_check_transfer: TD is last > > > > > > This is not received in the failing case. > > > > Maybe this indicates a lost interrupt or something like that? > > > > In /sys/dev/usb/controller/xhci.c > > > > static void > > xhci_interrupt_poll(struct xhci_softc *sc) > > > > Add a printf: > > > > if (i == XHCI_MAX_EVENTS) { > > i = 0; > > j ^= 1; > > > > /* check for timeout */ > > if (!--t) { > > + printf("XHCI: > > Timeout\n"); break; > > } > > } > > > > > > See if what happens. > > > > Also change the xhci.c code to call > > > > xhci_interrupt_poll() two times instead of one. > > > > > > --HPS > > Unfortunately, the condition was never reached. > > I've started trying to dtrace xhci(4) function boundaries, and, well > there's a lot of recursion with xhci_interrupt_poll(). However, I > never see that function called from xhci_do_poll(), which is called > from xhci_interrupt() (to "catch any lost interrupts" according to the > comment). > > You may have already told me this, but what does "Down reving Protocol > Version from 2 to 0?" in the success case on my system? Is this the > USB protocol which is "down rev'ed"? If so, what USB level is this > flash drive running at? Hi, The XHCI supports all the wire USB protocols up to date. Is that what you ask? --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Mar 13 06:57:44 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E90B1106566B; Tue, 13 Mar 2012 06:57:44 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 49ED08FC08; Tue, 13 Mar 2012 06:57:43 +0000 (UTC) Received: by wern13 with SMTP id n13so230230wer.13 for ; Mon, 12 Mar 2012 23:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ECVMu0Qi1AEeX36cr/ZKuZyCZlw2MluRBlpJrI+THlE=; b=ZLe4BF0AnDsG9j0uOdSn07NIzWKnKweuHy4xortW3PPw0aMUPkbRTLoj0pzAABeNDp 92j+n5DqNs9/LDlXmQvozsMLO9mB5HLEMHD/vocV/PdnNuSzloC0bg42wGbk8BiFJk74 xjce9Epbso8EkSQwVE2ZTEoM3ngMSVuFEr88bwESE4An/Q2jFT+C7h1m/t82zF42rnYP 8qMGSqkr4ol4kR+I5o04rRF2zZ3SaEHgidBz2tQWaE5iIKdn7s2FiehwbzCi01I4D505 hk8LrAGGP3W2ucoDyD6VPUpjGHsMVb3GZJgtik/nyJ68nDqdOzkCYpCkNKNaT9Y3cld4 6TaQ== Received: by 10.180.83.72 with SMTP id o8mr4574506wiy.5.1331621863368; Mon, 12 Mar 2012 23:57:43 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id n15sm40630742wiw.6.2012.03.12.23.57.41 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 23:57:42 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F5EEFE4.2020402@FreeBSD.org> Date: Tue, 13 Mar 2012 08:57:40 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120226 Thunderbird/10.0.2 MIME-Version: 1.0 To: Brandon Gooch References: <201203120915.18908.hselasky@c2i.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nathan Whitehorn , "freebsd-usb@freebsd.org" Subject: Re: Ongoing battle with umass(4) and xhci(4) 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, 13 Mar 2012 06:57:45 -0000 On 03/13/12 05:37, Brandon Gooch wrote: > On Mon, Mar 12, 2012 at 3:15 AM, Hans Petter Selasky wrote: >>> >>> Is there something fishy happening between the USB stack and CAM? hmmm... >>> >> >> No, >> >> It is not the CAM layer this time, though there are some bugs there too. >> >> >> In the beginning of the log I see that in the successful case we receive a >> stall event: >> >> -xhci_check_transfer: slot=1 epno=3 remainder=13 status=6 >> -xhci_check_transfer: TD is last >> -xhci_cmd_stop_ep: >> -xhci_check_command: Received command event >> -xhci_configure_reset_endpoint: Could not stop endpoint 3 >> -xhci_cmd_reset_ep: >> -xhci_check_command: Received command event >> -xhci_cmd_set_tr_dequeue_ptr: >> -xhci_check_command: Received command event >> -xhci_cmd_evaluate_ctx: >> -xhci_check_command: Received command event >> -xhci_cmd_configure_ep: >> -xhci_check_command: Received command event >> -xhci_configure_reset_endpoint: Could not configure endpoint 3 >> -xhci_ep_clear_stall: >> -xhci_device_generic_enter: >> -xhci_setup_generic_chain_sub: NTRB=1 >> -xhci_setup_generic_chain_sub: LINK=0x82883180 >> -xhci_setup_generic_chain_sub: NTRB=1 >> -xhci_setup_generic_chain_sub: LINK=0x82883000 >> -xhci_setup_generic_chain: first=0xffffff8460883300 last=0xffffff8460883180 >> -xhci_device_generic_start: >> -xhci_transfer_insert: qh_pos = 1 >> -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 >> -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 >> -xhci_check_transfer: Following next TD >> -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 >> -xhci_check_transfer: slot=1 epno=1 remainder=0 status=1 >> -xhci_check_transfer: TD is last >> >> >> This is not received in the failing case. >> >> Maybe this indicates a lost interrupt or something like that? >> >> In /sys/dev/usb/controller/xhci.c >> >> static void >> xhci_interrupt_poll(struct xhci_softc *sc) >> >> Add a printf: >> >> if (i == XHCI_MAX_EVENTS) { >> i = 0; >> j ^= 1; >> >> /* check for timeout */ >> if (!--t) { >> + printf("XHCI: Timeout\n"); >> break; >> } >> } >> >> >> See if what happens. >> >> Also change the xhci.c code to call >> >> xhci_interrupt_poll() two times instead of one. >> >> >> --HPS > > Unfortunately, the condition was never reached. > > I've started trying to dtrace xhci(4) function boundaries, and, well > there's a lot of recursion with xhci_interrupt_poll(). However, I > never see that function called from xhci_do_poll(), which is called > from xhci_interrupt() (to "catch any lost interrupts" according to the > comment). > > You may have already told me this, but what does "Down reving Protocol > Version from 2 to 0?" in the success case on my system? Is this the > USB protocol which is "down rev'ed"? If so, what USB level is this > flash drive running at? It is SCSI protocol that "down rev'ed", not USB. AFAIK this came from old SPI era when SCSI protocol version was same for device and controller, limited by transport type. At this moment, with many possible transports, I believe this message lost its informativeness. -- Alexander Motin From owner-freebsd-usb@FreeBSD.ORG Tue Mar 13 07:02:31 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 916AC106566C; Tue, 13 Mar 2012 07:02:31 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2668F8FC12; Tue, 13 Mar 2012 07:02:30 +0000 (UTC) Received: by ghrr20 with SMTP id r20so245670ghr.13 for ; Tue, 13 Mar 2012 00:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/EzSRB8/97Y/zqU2iqAav8fFkgvC/7iB5r2PDBQ0KCs=; b=qw+luqSKEn2D7h1NJiFLXuAHmpe1OZkUBOaOZqB2tnP//DmnPNQQnzcUcurfXAH580 FjmK3CwI9aqcyzfePd3D3zNPqPiN0Wlw3xDnXUGEDaqPRgGbplWUI6rvtSxoctryF5nc 9kwzFaG0gpwCR1jJVwKrYe/5bY/ti9AKWMwxn8u0hGpRXzzeLQGEZpWHXiCJUJGGkYeN aTV6c1+LCgkbh5VSQrzgkBaO5xAmkC4B64f3XoxDhhSMz1jhwQuL6/epqzNstPtAuenf DLJCNAqsiAgXT2hvjjv+20IeXFNOxWei1TUao624mjuA1bqa2i1dUGUQvgk8hwAcYg7l ZkOQ== MIME-Version: 1.0 Received: by 10.60.24.9 with SMTP id q9mr8942448oef.4.1331622150323; Tue, 13 Mar 2012 00:02:30 -0700 (PDT) Received: by 10.60.17.10 with HTTP; Tue, 13 Mar 2012 00:02:30 -0700 (PDT) In-Reply-To: <201203130722.48489.hselasky@c2i.net> References: <201203120915.18908.hselasky@c2i.net> <201203130722.48489.hselasky@c2i.net> Date: Tue, 13 Mar 2012 02:02:30 -0500 Message-ID: From: Brandon Gooch To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Alexander Motin , Nathan Whitehorn , "freebsd-usb@freebsd.org" Subject: Re: Ongoing battle with umass(4) and xhci(4) 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, 13 Mar 2012 07:02:31 -0000 On Tue, Mar 13, 2012 at 1:22 AM, Hans Petter Selasky wro= te: > On Tuesday 13 March 2012 04:37:55 Brandon Gooch wrote: >> On Mon, Mar 12, 2012 at 3:15 AM, Hans Petter Selasky > wrote: >> >> Is there something fishy happening between the USB stack and CAM? >> >> hmmm... >> > >> > No, >> > >> > It is not the CAM layer this time, though there are some bugs there to= o. >> > >> > >> > In the beginning of the log I see that in the successful case we recei= ve >> > a stall event: >> > >> > -xhci_check_transfer: slot=3D1 epno=3D3 remainder=3D13 status=3D6 >> > -xhci_check_transfer: TD is last >> > -xhci_cmd_stop_ep: >> > -xhci_check_command: Received command event >> > -xhci_configure_reset_endpoint: Could not stop endpoint 3 >> > -xhci_cmd_reset_ep: >> > -xhci_check_command: Received command event >> > -xhci_cmd_set_tr_dequeue_ptr: >> > -xhci_check_command: Received command event >> > -xhci_cmd_evaluate_ctx: >> > -xhci_check_command: Received command event >> > -xhci_cmd_configure_ep: >> > -xhci_check_command: Received command event >> > -xhci_configure_reset_endpoint: Could not configure endpoint 3 >> > -xhci_ep_clear_stall: >> > -xhci_device_generic_enter: >> > -xhci_setup_generic_chain_sub: NTRB=3D1 >> > -xhci_setup_generic_chain_sub: LINK=3D0x82883180 >> > -xhci_setup_generic_chain_sub: NTRB=3D1 >> > -xhci_setup_generic_chain_sub: LINK=3D0x82883000 >> > -xhci_setup_generic_chain: first=3D0xffffff8460883300 >> > last=3D0xffffff8460883180 -xhci_device_generic_start: >> > -xhci_transfer_insert: qh_pos =3D 1 >> > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 >> > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 >> > -xhci_check_transfer: Following next TD >> > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 >> > -xhci_check_transfer: slot=3D1 epno=3D1 remainder=3D0 status=3D1 >> > -xhci_check_transfer: TD is last >> > >> > >> > This is not received in the failing case. >> > >> > Maybe this indicates a lost interrupt or something like that? >> > >> > In /sys/dev/usb/controller/xhci.c >> > >> > static void >> > xhci_interrupt_poll(struct xhci_softc *sc) >> > >> > Add a printf: >> > >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (i =3D=3D XHCI_MAX_EVENTS) { >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0i =3D 0; >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0j ^=3D 1; >> > >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* check for timeout */ >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!--t) { >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("XHCI: >> > Timeout\n"); break; >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> > >> > >> > See if what happens. >> > >> > Also change the xhci.c code to call >> > >> > xhci_interrupt_poll() two times instead of one. >> > >> > >> > --HPS >> >> Unfortunately, the condition was never reached. >> >> I've started trying to dtrace xhci(4) function boundaries, and, well >> there's a lot of recursion with xhci_interrupt_poll(). =A0However, I >> never see that function called from xhci_do_poll(), which is called >> from xhci_interrupt() (to "catch any lost interrupts" according to the >> comment). >> >> You may have already told me this, but what does "Down reving Protocol >> Version from 2 to 0?" in the success case on my system? =A0Is this the >> USB protocol which is "down rev'ed"? =A0If so, what USB level is this >> flash drive running at? > > Hi, > > The XHCI supports all the wire USB protocols up to date. Is that what you= ask? > > --HPS I'm curious what the "down reving" means, and whether it is a USB thing or something else. I wonder if it could be a clue to help figure out the actual issue I'm faci= ng. Also, the missing interrupt notion has come into play before while trying to investigate this in the past -- if you could come up with a method that could eliminate that as a cause altogether, I think it would a big step. Of course, a method to show that missing interrupts are absolutely the problem, that would be great too :) -Brandon From owner-freebsd-usb@FreeBSD.ORG Thu Mar 15 11:13:25 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63A00106564A for ; Thu, 15 Mar 2012 11:13:25 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nschwmtas02p.mx.bigpond.com (nschwmtas02p.mx.bigpond.com [61.9.189.140]) by mx1.freebsd.org (Postfix) with ESMTP id E0D918FC19 for ; Thu, 15 Mar 2012 11:13:24 +0000 (UTC) Received: from nschwotgx03p.mx.bigpond.com ([124.188.161.100]) by nschwmtas02p.mx.bigpond.com with ESMTP id <20120315111322.UCEY22122.nschwmtas02p.mx.bigpond.com@nschwotgx03p.mx.bigpond.com>; Thu, 15 Mar 2012 11:13:22 +0000 Received: from johnny.reilly.home ([124.188.161.100]) by nschwotgx03p.mx.bigpond.com with ESMTP id <20120315111322.MIAT8126.nschwotgx03p.mx.bigpond.com@johnny.reilly.home>; Thu, 15 Mar 2012 11:13:22 +0000 Date: Thu, 15 Mar 2012 22:13:12 +1100 From: Andrew Reilly To: Hans Petter Selasky Message-ID: <20120315111312.GA35074@johnny.reilly.home> References: <201202272027.39685.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202272027.39685.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-SIH-MSG-ID: oxA3Etz7TAD0zmQs0WyzOwJxyArnqyN48Z4QX81loRIGTUDCp8DeQ9rHK+ZRvN+kxD9JJhuENGAjaa7mTY3Rs9uK Cc: David.I.Noel@gmail.com, freebsd-usb@freebsd.org Subject: Re: 9.0 - USB init failed err=18 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, 15 Mar 2012 11:13:25 -0000 Hi, Unrelated, I think, but since Hans is here: Since (I think) the switch-over to 9_STABLE (or at least at about the time of the 9.0 release) my i3 headless server box does not restart (shutdown -r) successfully. When I plug a keyboard and screen into it, to see what is going on, the last thing on the screen is always something about usb. Besides the keyboard (in this situation) the only USB device in the system is an external (WD) hard drive. Anything I can usefully report or analyse to figure out what is going wrong? The present situation isn't immediately fatal, because the hang doesn't seem to happen until all of the file system buffers have been flushed, so the reboot is ultimately clean, but it requires me to reset the box from the switch on the front: not good for doing remotely... USB-related dmesg output includes: ehci0: mem 0xf0522400-0xf05227ff irq 16 at device 26.0 on pci0 usbus0: EHCI version 1.0 usbus0: on ehci0 ehci1: mem 0xf0522000-0xf05223ff irq 23 at device 29.0 on pci0 usbus1: EHCI version 1.0 usbus1: on ehci1 uhub3: 8 ports with 8 removable, self powered Root mount waiting for: usbus1 usbus0 ugen0.3: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:9:0:-1: Attached to scbus9 da0 at umass-sim0 bus 0 scbus9 target 0 lun 0 da0: Fixed Direct Access SCSI-6 device da0: 40.000MB/s transfers da0: 2861556MB (732558336 4096 byte sectors: 255H 63S/T 45599C) ses0 at umass-sim0 bus 0 scbus9 target 0 lun 1 ses0: Fixed Enclosure Services SCSI-6 device ses0: 40.000MB/s transfers ses0: SCSI-3 SES Device Root mount waiting for: usbus0 ugen0.4: at usbus0 ukbd0: on usbus0 kbd2 at ukbd0 ums0: on usbus0 Root mount waiting for: usbus0 Hmm. Could the ums0: line be an issue there? I've never plugged a mouse into this box. Cheers, -- Andrew On Mon, Feb 27, 2012 at 08:27:39PM +0100, Hans Petter Selasky wrote: > On Monday 27 February 2012 17:59:51 David Noel wrote: > > Since upgrading to 9.0 I've been getting a handful of EHCI-related > > dmesg errors and USB 1.0 performance from my ICH5's 2.0 ports. I > > booted an 8.3 memstick to be certain it wasn't a hardware issue and > > was able to push a few GB over USB at full 2.0 speeds. The system is a > > PowerEdge SC1420 running amd64 (GENERIC); relevant dmesg below: > > > > ... > > ehci0: mem > > 0xcff00000-0xcff003ff irq 23 at device 29.7 on pci0 > > ioapic0: routing intpin 23 (PCI IRQ 23) to lapic 0 vector 54 > > usbus4: EHCI version ff.ff > > usbus4: reset timeout > > usbus4: reset timeout > > ehci0: USB init failed err=18 > > unknown: reset timeout > > device_attach: ehci0 attach returned 6 > > ... > > > > A full "boot -v" can be found here: http://pastebin.com/pXi9kruw > > > > Hi, > > This might have something to do with ACPI USB handover. I think this feature > was supposed to be moved into the loader, but I'm not fully sure. > > http://svnweb.freebsd.org/base?view=revision&revision=224269 > > --HPS > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Thu Mar 15 12:48:56 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F1E81065670 for ; Thu, 15 Mar 2012 12:48:56 +0000 (UTC) (envelope-from holm@beast.freibergnet.de) Received: from bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2718FC0A for ; Thu, 15 Mar 2012 12:48:54 +0000 (UTC) Received: from bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by bmail.freibergnet.de (Postfix) with ESMTP id B5787929B057 for ; Thu, 15 Mar 2012 13:48:47 +0100 (CET) X-Virus-Scanned: amavisd-new at freibergnet.de Received: from bmail.freibergnet.de ([46.4.195.14]) by bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) (amavisd-new, port 10024) with LMTP id d4JRsjyG3s8I for ; Thu, 15 Mar 2012 13:48:40 +0100 (CET) Received: from beast.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by bmail.freibergnet.de (Postfix) with ESMTP id CD3D8929B054 for ; Thu, 15 Mar 2012 13:48:40 +0100 (CET) Received: by beast.freibergnet.de (Postfix, from userid 201) id C75724B8040; Thu, 15 Mar 2012 13:48:40 +0100 (CET) Date: Thu, 15 Mar 2012 13:48:40 +0100 From: Holm Tiffe To: freebsd-usb@freebsd.org Message-ID: <20120315124840.GA64319@beast.freibergnet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.3i Organization: FreibergNet Internet Services, TSHT Priority: normal X-Phone: +49-3731-74222 X-Mobile: +49-172-8790741 X-Fax: +49-3731-74200 Subject: USB UHCI Problems on 8-Stable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: holm@freibergnet.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 12:48:56 -0000 Hi, For some time I had problems with my Cam (Olympus FE-230), it wouldn't get recognized again after unplugging it from the USB Connector. Now I have a very similar Problem while trying to get an J-Link V8 compatible Jtag debugger working in conjunction with openocd. Maybe there are bugs in openocd, but the bigger ones seems to be in FreeBSDs USB drivers. In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world and kernel. I've commented the ?hci drivers out of the kernel config and set USB_DEBUG. At fist please Cc me, I'm not on freebsd-usb. After Loading the uhci module: Mar 15 13:21:09 unicorn kernel: uhci1: port 0xd000-0xd01f irq 15 at device 16.1 on pci0 Mar 15 13:21:09 unicorn kernel: uhci1: [ITHREAD] Mar 15 13:21:09 unicorn kernel: usbus0: 12Mbps Full Speed USB v1.0 Mar 15 13:21:10 unicorn kernel: usb_bus_port_set_device: bus 0xc6e44cf0 devices[1] = 0xc5608800 Mar 15 13:21:10 unicorn kernel: ugen0.1: at usbus0 Mar 15 13:21:10 unicorn kernel: uhub0: on usbus0 Mar 15 13:21:10 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, parent->selfpowered=0 Mar 15 13:21:10 unicorn kernel: uhub_attach: Getting HUB descriptor Mar 15 13:21:10 unicorn kernel: usb_needs_explore: Mar 15 13:21:10 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:21:10 unicorn kernel: usbus1: on uhci1 Mar 15 13:21:10 unicorn kernel: usbus1: 12Mbps Full Speed USB v1.0 Mar 15 13:21:10 unicorn kernel: usb_needs_explore: Mar 15 13:21:10 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:21:10 unicorn kernel: uhci2: port 0xd400-0xd41f irq 5 at device 16.2 on pci0 Mar 15 13:21:10 unicorn kernel: uhci2: [ITHREAD] Mar 15 13:21:10 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 devices[1] = 0xc5511c00 Mar 15 13:21:10 unicorn kernel: ugen1.1: at usbus1 Mar 15 13:21:10 unicorn kernel: uhub1: on usbus1 Mar 15 13:21:10 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, parent->selfpowered=0 Mar 15 13:21:10 unicorn kernel: uhub_attach: Getting HUB descriptor Mar 15 13:21:10 unicorn kernel: uhub_attach: turn on port 1 power Mar 15 13:21:10 unicorn kernel: usb_needs_explore: Mar 15 13:21:10 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:21:10 unicorn kernel: usbus2: on uhci2 Mar 15 13:21:10 unicorn kernel: usbus2: 12Mbps Full Speed USB v1.0 Mar 15 13:21:10 unicorn kernel: usb_needs_explore: ... # usbconfig list ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE # Now connecting the J-Link Mar 15 13:23:41 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:23:41 unicorn kernel: uhub_explore: udev=0xc5511c00 addr=1 Mar 15 13:23:41 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:23:41 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0109, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:23:41 unicorn kernel: uhub_reattach_port: reattaching port 2 Mar 15 13:23:41 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0109, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:23:41 unicorn kernel: uhub_reattach_port: Port 2 is in Host Mode Mar 15 13:23:42 unicorn root: Unknown USB device: vendor 0x1366 product 0x0101 bus uhub1 Mar 15 13:23:42 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x010b, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:23:42 unicorn kernel: usbd_transfer_power_ref: Adding type 0 to power state Mar 15 13:23:42 unicorn kernel: usbd_transfer_power_ref: needs power Mar 15 13:23:42 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 devices[2] = 0xc5602400 Mar 15 13:23:42 unicorn kernel: ugen1.2: at usbus1 Mar 15 13:23:42 unicorn kernel: usb_needs_explore: Mar 15 13:23:42 unicorn kernel: usb_bus_powerd: bus=0xc6e44cf0 Mar 15 13:23:42 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:23:42 unicorn kernel: uhub_explore: udev=0xc5608800 addr=1 Mar 15 13:23:42 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:23:42 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:23:42 unicorn kernel: usb_needs_explore: .. # usbconfig list ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.2: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON # now starting openocd: $ openocd -f jlinkv8.cfg Open On-Chip Debugger 0.5.0 (2012-03-15-08:44) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Warn : Adapter driver 'jlink' did not declare which transports it allows; assuming legacy JTAG-only Info : only one transport option; autoselect 'jtag' 1000 kHz adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 cortex_m3 reset_config sysresetreq 250 kHz Info : J-Link initialization started / target CPU reset initiated Info : J-Link ARM V8 compiled Dec 16 2010 20:21:29 Info : J-Link caps 0xb9ff7bbf Info : J-Link hw version 80000 Info : J-Link hw type J-Link Info : J-Link max mem block 8368 Info : J-Link configuration Info : USB-Address: 0x0 Info : Kickstart power on JTAG-pin 19: 0xffffffff Info : Vref = 3.228 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 0 TRST = 0 Info : J-Link JTAG Interface ready Error: usb_bulk_read failed (requested=1, result=-6) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: J-Link setting speed failed (-60) in procedure 'init' $ every next try end like this: $ openocd -f jlinkv8.cfg Open On-Chip Debugger 0.5.0 (2012-03-15-08:44) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Warn : Adapter driver 'jlink' did not declare which transports it allows; assuming legacy JTAG-only Info : only one transport option; autoselect 'jtag' 1000 kHz adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 cortex_m3 reset_config sysresetreq 250 kHz Info : J-Link initialization started / target CPU reset initiated Error: J-Link command 0xde failed (-60) Error: J-Link command 0xdc failed (-60) Error: J-Link command 0x01 failed (-60) Error: J-Link command EMU_CMD_VERSION failed (-60) Info : J-Link JTAG Interface ready Error: J-Link command 0xdd failed (-60) Error: J-Link command 0xdf failed (-60) Error: usb_bulk_write failed (requested=6, result=-60) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: J-Link setting speed failed (-60) in procedure 'init' $ # usbconfig list ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.2: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON # If I disconnect the J-Link the device disappears: Mar 15 13:27:42 unicorn kernel: uhub_explore: udev=0xc561f000 addr=1 Mar 15 13:27:42 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:27:42 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:27:46 unicorn kernel: usb_needs_explore: Mar 15 13:27:46 unicorn kernel: usb_bus_powerd: bus=0xc6ed4cf0 Mar 15 13:27:46 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:27:46 unicorn kernel: uhub_explore: udev=0xc5511c00 addr=1 Mar 15 13:27:46 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:27:46 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:27:46 unicorn kernel: uhub_reattach_port: reattaching port 2 Mar 15 13:27:46 unicorn kernel: ugen1.2: at usbus1 (disconnected) Mar 15 13:27:46 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 devices[2] = 0 Mar 15 13:27:46 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:27:46 unicorn kernel: usb_needs_explore: Mar 15 13:27:46 unicorn kernel: usb_bus_powerd: bus=0xc6e44cf0 Mar 15 13:27:46 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:27:46 unicorn kernel: uhub_explore: udev=0xc5608800 addr=1 Mar 15 13:27:46 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION #usbconfig list ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE # but after replugging it, it never gets connected again: Mar 15 13:29:34 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:29:34 unicorn kernel: uhub_explore: udev=0xc561f000 addr=1 Mar 15 13:29:34 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:34 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:36 unicorn kernel: usb_needs_explore: Mar 15 13:29:36 unicorn kernel: usb_bus_powerd: bus=0xc6ed4cf0 Mar 15 13:29:36 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:29:36 unicorn kernel: uhub_explore: udev=0xc5511c00 addr=1 Mar 15 13:29:36 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:36 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0109, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:36 unicorn kernel: uhub_reattach_port: reattaching port 2 Mar 15 13:29:36 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0109, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:36 unicorn kernel: uhub_reattach_port: Port 2 is in Host Mode Mar 15 13:29:37 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x010b, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:37 unicorn kernel: usbd_transfer_power_ref: Adding type 0 to power state Mar 15 13:29:37 unicorn kernel: usbd_transfer_power_ref: needs power Mar 15 13:29:38 unicorn kernel: usb_alloc_device: set address 2 failed (USB_ERR_TIMEOUT, ignored) Mar 15 13:29:38 unicorn kernel: usb_needs_explore: Mar 15 13:29:38 unicorn kernel: usb_bus_powerd: bus=0xc6e44cf0 Mar 15 13:29:38 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:29:38 unicorn kernel: uhub_explore: udev=0xc5608800 addr=1 Mar 15 13:29:38 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:29:38 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION # usbconfig list ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE # # usbconfig -d ugen1.1 reset usbconfig: could not reset device: Invalid argument # # usbconfig -d ugen1.1 resume usbconfig: could not set resume: Invalid argument # Before I've built the kernel w/o the =hci drivers compiled in a reboot was the only solution to get this device on this port recognized again. Now a simple kldunload/kldload uhci does the job, even w/o disconnecting the J-Linki (it leaves powered up). This is why I thing that the bug sits in FreeBSDs usb driver. Mar 15 13:35:06 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:10 unicorn kernel: ugen0.1: at usbus0 (disconnected) Mar 15 13:35:10 unicorn kernel: usb_bus_port_set_device: bus 0xc6e44cf0 devices[1] = 0 Mar 15 13:35:10 unicorn kernel: unknown: at usbus0, port 1, addr 1 (disconnected) Mar 15 13:35:10 unicorn kernel: usbus0: detached Mar 15 13:35:10 unicorn kernel: uhci0: detached Mar 15 13:35:10 unicorn kernel: pci0: at device 16.0 (no driver attached) Mar 15 13:35:10 unicorn kernel: ugen1.1: at usbus1 (disconnected) Mar 15 13:35:10 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 devices[1] = 0 Mar 15 13:35:10 unicorn kernel: unknown: at usbus1, port 1, addr 1 (disconnected) Mar 15 13:35:10 unicorn kernel: usbus1: detached Mar 15 13:35:10 unicorn kernel: uhci1: detached Mar 15 13:35:10 unicorn kernel: pci0: at device 16.1 (no driver attached) Mar 15 13:35:10 unicorn kernel: ugen2.1: at usbus2 (disconnected) Mar 15 13:35:10 unicorn kernel: usb_bus_port_set_device: bus 0xc7657cf0 devices[1] = 0 Mar 15 13:35:10 unicorn kernel: unknown: at usbus2, port 1, addr 1 (disconnected) Mar 15 13:35:10 unicorn kernel: usbus2: detached Mar 15 13:35:10 unicorn kernel: uhci2: detached Mar 15 13:35:10 unicorn kernel: pci0: at device 16.2 (no driver attached) Mar 15 13:35:15 unicorn kernel: uhci0: port 0xcc00-0xcc1f irq 15 at device 16.0 on pci0 Mar 15 13:35:15 unicorn kernel: uhci0: [ITHREAD] Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:35:16 unicorn kernel: usbus0: on uhci0 Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:35:16 unicorn kernel: usbus0: 12Mbps Full Speed USB v1.0 Mar 15 13:35:16 unicorn kernel: uhci1: port 0xd000-0xd01f irq 15 at device 16.1 on pci0 Mar 15 13:35:16 unicorn kernel: uhci1: [ITHREAD] Mar 15 13:35:16 unicorn kernel: usb_bus_port_set_device: bus 0xc6e44cf0 devices[1] = 0xc5591c00 Mar 15 13:35:16 unicorn kernel: ugen0.1: at usbus0 Mar 15 13:35:16 unicorn kernel: uhub0: on usbus0 Mar 15 13:35:16 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, parent->selfpowered=0 Mar 15 13:35:16 unicorn kernel: uhub_attach: Getting HUB descriptor Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:35:16 unicorn kernel: usbus1: on uhci1 Mar 15 13:35:16 unicorn kernel: usbus1: 12Mbps Full Speed USB v1.0 Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:35:16 unicorn kernel: uhci2: port 0xd400-0xd41f irq 5 at device 16.2 on pci0 Mar 15 13:35:16 unicorn kernel: uhci2: [ITHREAD] Mar 15 13:35:16 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 devices[1] = 0xc5517800 Mar 15 13:35:16 unicorn kernel: ugen1.1: at usbus1 Mar 15 13:35:16 unicorn kernel: uhub1: on usbus1 Mar 15 13:35:16 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, parent->selfpowered=0 Mar 15 13:35:16 unicorn kernel: uhub_attach: Getting HUB descriptor Mar 15 13:35:16 unicorn kernel: uhub_attach: turn on port 1 power Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:35:16 unicorn kernel: usbus2: on uhci2 Mar 15 13:35:16 unicorn kernel: usbus2: 12Mbps Full Speed USB v1.0 Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: No root HUB Mar 15 13:35:16 unicorn kernel: usb_bus_port_set_device: bus 0xc7657cf0 devices[1] = 0xc5608800 Mar 15 13:35:16 unicorn kernel: ugen2.1: at usbus2 Mar 15 13:35:16 unicorn kernel: uhub2: on usbus2 Mar 15 13:35:16 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, parent->selfpowered=0 Mar 15 13:35:16 unicorn kernel: uhub_attach: Getting HUB descriptor Mar 15 13:35:16 unicorn kernel: uhub_attach: turn on port 2 power Mar 15 13:35:16 unicorn kernel: uhub_attach: turn on port 1 power Mar 15 13:35:16 unicorn kernel: uhub0: 2 ports with 2 removable, self powered Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: bus=0xc6e44cf0 Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:35:16 unicorn kernel: uhub_explore: udev=0xc5591c00 addr=1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: reattaching port 1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: reattaching port 2 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: bus=0xc6e44cf0 Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:35:16 unicorn kernel: uhub_explore: udev=0xc5591c00 addr=1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_attach: turn on port 2 power Mar 15 13:35:16 unicorn kernel: uhub_attach: turn on port 1 power Mar 15 13:35:16 unicorn kernel: uhub1: 2 ports with 2 removable, self powered Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: bus=0xc6ed4cf0 Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:35:16 unicorn kernel: uhub_explore: udev=0xc5517800 addr=1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: reattaching port 1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0109, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: reattaching port 2 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0109, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: Port 2 is in Host Mode Mar 15 13:35:16 unicorn kernel: uhub_attach: turn on port 2 power Mar 15 13:35:16 unicorn kernel: uhub2: 2 ports with 2 removable, self powered Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_needs_explore: Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: bus=0xc7657cf0 Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:35:16 unicorn kernel: uhub_explore: udev=0xc5608800 addr=1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: reattaching port 1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_reattach_port: reattaching port 2 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: bus=0xc7657cf0 Mar 15 13:35:16 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 13:35:16 unicorn kernel: uhub_explore: udev=0xc5608800 addr=1 Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:16 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:17 unicorn kernel: usb_needs_explore: Mar 15 13:35:17 unicorn root: Unknown USB device: vendor 0x1366 product 0x0101 bus uhub1 Mar 15 13:35:17 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x010b, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:17 unicorn kernel: usbd_transfer_power_ref: Adding type 0 to power state Mar 15 13:35:17 unicorn kernel: usbd_transfer_power_ref: needs power Mar 15 13:35:17 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 devices[2] = 0xc5602000 Mar 15 13:35:17 unicorn kernel: ugen1.2: at usbus1 Mar 15 13:35:17 unicorn kernel: usb_bus_powerd: bus=0xc6ed4cf0 Mar 15 13:35:17 unicorn kernel: uhub_explore: udev=0xc5517800 addr=1 Mar 15 13:35:17 unicorn kernel: uhub_read_port_status: port 1, wPortStatus=0x0108, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION Mar 15 13:35:17 unicorn kernel: uhub_read_port_status: port 2, wPortStatus=0x010b, wPortChange=0x0000, err=USB_ERR_NORMAL_COMPLETION It is exactly the same story with the Olympus Cam, but I need it seldom on my FreeBSD PC. This J-Link I need to make a income, so please can anyobody look at this? I think this misbehavior has popped up between 8.1 and 8.2. $ uname -a FreeBSD unicorn.tsht.lan 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #22: Thu Mar 15 11:25:58 CET 2012 holm@unicorn.tsht.lan:/data/FreeBSD/obj/data/FreeBSD/src/sys/UNICORN i386 $ Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.3-PRERELEASE #22: Thu Mar 15 11:25:58 CET 2012 holm@unicorn.tsht.lan:/data/FreeBSD/obj/data/FreeBSD/src/sys/UNICORN i386 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) XP 3000+ (2109.49-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x6a0 Family = 6 Model = a Stepping = 0 Features=0x383fbff AMD Features=0xc0400800 real memory = 2147483648 (2048 MB) avail memory = 2092113920 (1995 MB) kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 7fef0000 (3) failed cpu0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: on hostb0 agp0: aperture size is 128M pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0xa000-0xa0ff mem 0xd8000000-0xdfffffff,0xe9000000-0xe900ffff irq 15 at device 0.0 on pci1 drm0: on vgapci0 info: [drm] AGP at 0xd0000000 128MB info: [drm] Initialized radeon 1.31.0 20080613 vgapci1: mem 0xe0000000-0xe7ffffff,0xe9010000-0xe901ffff at device 0.1 on pci1 de0: port 0xb000-0xb07f mem 0xeb002000-0xeb00207f irq 15 at device 9.0 on pci0 de0: Cogent 21040 [10Mb/s] pass 2.3 de0: WARNING: using obsoleted if_watchdog interface de0: Ethernet address: 00:00:92:90:09:8d de0: [ITHREAD] ahd0: port 0xb400-0xb4ff,0xb800-0xb8ff mem 0xeb000000-0xeb001fff irq 11 at device 11.0 on pci0 ahd0: [ITHREAD] aic7901A: Ultra320 Wide Channel A, SCSI Id=7, PCI 33 or 66MHz, 512 SCBs puc0: port 0xbc00-0xbc07,0xc000-0xc007,0xc400-0xc41f mem 0xeb003000-0xeb003fff,0xeb004000-0xeb004fff irq 15 at device 12.0 on pci0 puc0: [FILTER] uart2: <16550 or compatible> at port 1 on puc0 uart2: [FILTER] uart3: <16550 or compatible> at port 2 on puc0 uart3: [FILTER] sym0: <810a> port 0xc800-0xc8ff mem 0xeb005000-0xeb0050ff irq 15 at device 13.0 on pci0 sym0: No NVRAM, ID 7, Fast-10, SE, parity checking sym0: [ITHREAD] pci0: at device 16.0 (no driver attached) pci0: at device 16.1 (no driver attached) pci0: at device 16.2 (no driver attached) pci0: at device 16.3 (no driver attached) isab0: at device 17.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xd800-0xd80f at device 17.1 on pci0 ata0: at channel 0 on atapci0 ata0: [ITHREAD] ata1: at channel 1 on atapci0 ata1: [ITHREAD] pcm0: port 0xdc00-0xdcff irq 5 at device 17.5 on pci0 pcm0: [ITHREAD] pcm0: pcm0: rl0: port 0xe000-0xe0ff mem 0xeb007000-0xeb0070ff irq 5 at device 19.0 on pci0 miibus0: on rl0 rlphy0: PHY 0 on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:0d:61:c3:c4:5a rl0: [ITHREAD] atrtc0: port 0x70-0x73 irq 8 on acpi0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 fd1: <1200-KB 5.25" drive> on fdc0 drive 1 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: [FILTER] uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart1: [FILTER] ppc0: port 0x378-0x37f,0x778-0x77b irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppc0: [ITHREAD] ppbus0: on ppc0 plip0: on ppbus0 plip0: [ITHREAD] lpt0: on ppbus0 lpt0: [ITHREAD] lpt0: Interrupt-driven port ppi0: on ppbus0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model MouseMan+, device ID 0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xccfff,0xd0000-0xd97ff pnpid ORM0000 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 Timecounter "TSC" frequency 2109485501 Hz quality 800 Timecounters tick every 1.000 msec (probe21:sym0:0:6:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe21:sym0:0:6:0): CAM status: SCSI Status Error (probe21:sym0:0:6:0): SCSI status: Check Condition (probe21:sym0:0:6:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power on, reset, or bus device reset occurred) (probe20:sym0:0:5:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe20:sym0:0:5:0): CAM status: SCSI Status Error (probe20:sym0:0:5:0): SCSI status: Check Condition (probe20:sym0:0:5:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power on, reset, or bus device reset occurred) (probe20:sym0:0:5:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe20:sym0:0:5:0): CAM status: SCSI Status Error (probe20:sym0:0:5:0): SCSI status: Check Condition (probe20:sym0:0:5:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) sa0 at sym0 bus 0 scbus1 target 5 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: 4.166MB/s transfers (4.166MHz, offset 8) sa1 at sym0 bus 0 scbus1 target 6 lun 0 sa1: Removable Sequential Access SCSI-2 device sa1: 10.000MB/s transfers (10.000MHz, offset 8) da0 at ahd0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) da0: Command Queueing enabled da0: 70006MB (143374000 512 byte sectors: 255H 63S/T 8924C) da1 at ahd0 bus 0 scbus0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) da1: Command Queueing enabled da1: 70006MB (143374000 512 byte sectors: 255H 63S/T 8924C) da2 at ahd0 bus 0 scbus0 target 2 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) (probe20:sym0:0:5:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe20:sym0:0:5:0): CAM status: SCSI Status Error (probe20:sym0:0:5:0): SCSI status: Check Condition (probe20:sym0:0:5:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power on, reset, or bus device reset occurred) (probe20:sym0:0:5:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe20:sym0:0:5:0): CAM status: SCSI Status Error (probe20:sym0:0:5:0): SCSI status: Check Condition (probe20:sym0:0:5:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) sa0 at sym0 bus 0 scbus1 target 5 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: 4.166MB/s transfers (4.166MHz, offset 8) sa1 at sym0 bus 0 scbus1 target 6 lun 0 sa1: Removable Sequential Access SCSI-2 device sa1: 10.000MB/s transfers (10.000MHz, offset 8) da0 at ahd0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) da0: Command Queueing enabled da0: 70006MB (143374000 512 byte sectors: 255H 63S/T 8924C) da1 at ahd0 bus 0 scbus0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) da1: Command Queueing enabled da1: 70006MB (143374000 512 byte sectors: 255H 63S/T 8924C) da2 at ahd0 bus 0 scbus0 target 2 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) da2: Command Queueing enabled da2: 70006MB (143374000 512 byte sectors: 255H 63S/T 8924C) da3 at ahd0 bus 0 scbus0 target 3 lun 0 da3: Fixed Direct Access SCSI-3 device da3: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) da3: Command Queueing enabled da3: 70006MB (143374000 512 byte sectors: 255H 63S/T 8924C) GEOM_CONCAT: Device gc0d created (id=2065581164). GEOM_CONCAT: Disk da0d attached to gc0d. GEOM_CONCAT: Device data created (id=2038144655). GEOM_CONCAT: Disk da0g attached to data. GEOM_MIRROR: Device mirror/gm0a launched (2/2). GEOM_CONCAT: Disk da1d attached to gc0d. GEOM_CONCAT: Device gc0d activated. GEOM_MIRROR: Device mirror/gm0e launched (2/2). GEOM_MIRROR: Device mirror/gm0f launched (2/2). GEOM_CONCAT: Disk da1g attached to data. GEOM_CONCAT: Disk da2a attached to data. GEOM_CONCAT: Disk da2b attached to data. GEOM_CONCAT: Device data activated. Trying to mount root from ufs:/dev/mirror/gm0a bridge0: Ethernet address: 02:82:44:4d:6c:00 Regards, Holm -- Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583 www.tsht.de, info@tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741 From owner-freebsd-usb@FreeBSD.ORG Thu Mar 15 18:00:06 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5D36106564A for ; Thu, 15 Mar 2012 18:00:06 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.c2i.net [212.247.154.130]) by mx1.freebsd.org (Postfix) with ESMTP id 602F88FC15 for ; Thu, 15 Mar 2012 18:00:06 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 248944409; Thu, 15 Mar 2012 18:59:58 +0100 From: Hans Petter Selasky To: Andrew Reilly Date: Thu, 15 Mar 2012 18:58:18 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201202272027.39685.hselasky@c2i.net> <20120315111312.GA35074@johnny.reilly.home> In-Reply-To: <20120315111312.GA35074@johnny.reilly.home> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203151858.19237.hselasky@c2i.net> Cc: David.I.Noel@gmail.com, freebsd-usb@freebsd.org Subject: Re: 9.0 - USB init failed err=18 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, 15 Mar 2012 18:00:07 -0000 On Thursday 15 March 2012 12:13:12 Andrew Reilly wrote: > Hi, > > Unrelated, I think, but since Hans is here: > > Since (I think) the switch-over to 9_STABLE (or at least at about the time > of the 9.0 release) my i3 headless server box does not restart (shutdown > -r) successfully. When I plug a keyboard and screen into it, to see what > is going on, the last thing on the screen is always something about usb. > Besides the keyboard (in this situation) the only USB device in the system > is an external (WD) hard drive. Anything I can usefully report or analyse > to figure out what is going wrong? The present situation isn't > immediately fatal, because the hang doesn't seem to happen until all of > the file system buffers have been flushed, so the reboot is ultimately > clean, but it requires me to reset the box from the switch on the front: > not good for doing remotely... Hi, Is the external USB hard drive mounted when the system is shutting down. Most likely some device driver is not detaching. I've seen and notified Alexander Motin about some of these, but we don't know yet who is refcounting wrong, except that it is in CAM/SCSI. There is a flag which you can set to avoid the this waiting: sysctl hw.usb.no_shutdown_wait=1 It might work as a temporary workaround until umass is fixed. Simply run a config loop with UMASS, and you'll see the eventual/hang and panic happening. while true do usbconfig -d X.Y set_config 0 usbconfig -d X.Y set_config 1 done > > Hmm. Could the ums0: line be an issue there? I've never plugged a mouse > into this box. USB audio devices are also known to block, if an application has /dev/dsp opened still during shutdown. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Mar 15 18:09:12 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 696111065670 for ; Thu, 15 Mar 2012 18:09:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.c2i.net [212.247.154.66]) by mx1.freebsd.org (Postfix) with ESMTP id E6F608FC0A for ; Thu, 15 Mar 2012 18:09:11 +0000 (UTC) X-T2-Spam-Status: No, hits=1.0 required=5.0 tests=ALL_TRUSTED, BAYES_80 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 85304522; Thu, 15 Mar 2012 19:09:09 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 15 Mar 2012 19:07:30 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <20120315111312.GA35074@johnny.reilly.home> <201203151858.19237.hselasky@c2i.net> In-Reply-To: <201203151858.19237.hselasky@c2i.net> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203151907.30900.hselasky@c2i.net> Cc: David.I.Noel@gmail.com Subject: Re: 9.0 - USB init failed err=18 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, 15 Mar 2012 18:09:12 -0000 On Thursday 15 March 2012 18:58:18 Hans Petter Selasky wrote: > while true > do > usbconfig -d X.Y set_config 0 > usbconfig -d X.Y set_config 1 > done Should be: usbconfig -d X.Y set_config 255 usbconfig -d X.Y set_config 0 From owner-freebsd-usb@FreeBSD.ORG Thu Mar 15 18:11:05 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AEC9106566C for ; Thu, 15 Mar 2012 18:11:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.c2i.net [212.247.154.66]) by mx1.freebsd.org (Postfix) with ESMTP id EFEE28FC14 for ; Thu, 15 Mar 2012 18:11:04 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 85303447; Thu, 15 Mar 2012 19:05:57 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, holm@freibergnet.de Date: Thu, 15 Mar 2012 19:04:18 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <20120315124840.GA64319@beast.freibergnet.de> In-Reply-To: <20120315124840.GA64319@beast.freibergnet.de> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203151904.18541.hselasky@c2i.net> Cc: Subject: Re: USB UHCI Problems on 8-Stable 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, 15 Mar 2012 18:11:05 -0000 On Thursday 15 March 2012 13:48:40 Holm Tiffe wrote: > Hi, > > For some time I had problems with my Cam (Olympus FE-230), it wouldn't get > recognized again after unplugging it from the USB Connector. > > Now I have a very similar Problem while trying to get an J-Link V8 > compatible Jtag debugger working in conjunction with openocd. > Maybe there are bugs in openocd, but the bigger ones seems to be in > FreeBSDs USB drivers. > > In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world > and kernel. I've commented the ?hci drivers out of the kernel config and > set USB_DEBUG. > > > At fist please Cc me, I'm not on freebsd-usb. > > After Loading the uhci module: Hi, Could you log the USB traffic on the UHCI controller using usbdump ? It would be interesting to see what is going on. Have you tried using an external High-Speed HUB? --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Mar 15 22:06:46 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65D14106564A for ; Thu, 15 Mar 2012 22:06:46 +0000 (UTC) (envelope-from holm@beast.freibergnet.de) Received: from bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by mx1.freebsd.org (Postfix) with ESMTP id CA09A8FC19 for ; Thu, 15 Mar 2012 22:06:45 +0000 (UTC) Received: from bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by bmail.freibergnet.de (Postfix) with ESMTP id 04486929A503 for ; Thu, 15 Mar 2012 23:06:45 +0100 (CET) X-Virus-Scanned: amavisd-new at freibergnet.de Received: from bmail.freibergnet.de ([46.4.195.14]) by bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) (amavisd-new, port 10024) with LMTP id V0jCq1nsxdeE for ; Thu, 15 Mar 2012 23:06:40 +0100 (CET) Received: from beast.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by bmail.freibergnet.de (Postfix) with ESMTP id 5FB5C929A4FA for ; Thu, 15 Mar 2012 23:06:40 +0100 (CET) Received: by beast.freibergnet.de (Postfix, from userid 201) id 572884B8040; Thu, 15 Mar 2012 23:06:40 +0100 (CET) Date: Thu, 15 Mar 2012 23:06:40 +0100 From: Holm Tiffe To: freebsd-usb@freebsd.org Message-ID: <20120315220640.GB96051@beast.freibergnet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.3i User-Agent: Mutt/1.4.2.3i Organization: FreibergNet Internet Services, TSHT Priority: normal X-Phone: +49-3731-74222 X-Mobile: +49-172-8790741 X-Fax: +49-3731-74200 Subject: Re: USB UHCI Problems on 8-Stable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: holm@freibergnet.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 22:06:46 -0000 >> Hi, >> >> For some time I had problems with my Cam (Olympus FE-230), it wouldn't get >> recognized again after unplugging it from the USB Connector. >> >> Now I have a very similar Problem while trying to get an J-Link V8 >> compatible Jtag debugger working in conjunction with openocd. >> Maybe there are bugs in openocd, but the bigger ones seems to be in >> FreeBSDs USB drivers. >> >> In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world >> and kernel. I've commented the ?hci drivers out of the kernel config and >> set USB_DEBUG. >> >> >> At fist please Cc me, I'm not on freebsd-usb. >> >> After Loading the uhci module: > >Hi, > >Could you log the USB traffic on the UHCI controller using usbdump ? > >It would be interesting to see what is going on. > >Have you tried using an external High-Speed HUB? > >--HPS > Here is the dump: http://www.tiffe.de/other/usbus1.dump This is connecting the J-link, starting openocd twice, removing and reconnecting the J-link followed by a kldunload uhci. Can't provide a dump while kldloading since usbdump stops when the driver is unloaded. I have no Highspeedr-Hub so this was a direct connect. Results are the same regardless whcih interface is used. Regards, Holm -- Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583 www.tsht.de, info@tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741 From owner-freebsd-usb@FreeBSD.ORG Fri Mar 16 16:27:33 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1305C106566B for ; Fri, 16 Mar 2012 16:27:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3E38FC0A for ; Fri, 16 Mar 2012 16:27:32 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 253254450; Fri, 16 Mar 2012 17:22:24 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, holm@freibergnet.de Date: Fri, 16 Mar 2012 17:20:46 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <20120315220640.GB96051@beast.freibergnet.de> In-Reply-To: <20120315220640.GB96051@beast.freibergnet.de> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203161720.46468.hselasky@c2i.net> Cc: Subject: Re: USB UHCI Problems on 8-Stable 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, 16 Mar 2012 16:27:33 -0000 On Thursday 15 March 2012 23:06:40 Holm Tiffe wrote: > >> Hi, > >> > >> For some time I had problems with my Cam (Olympus FE-230), it wouldn't > > get > > >> recognized again after unplugging it from the USB Connector. > >> > >> Now I have a very similar Problem while trying to get an J-Link V8 > >> compatible Jtag debugger working in conjunction with openocd. > >> Maybe there are bugs in openocd, but the bigger ones seems to be in > >> FreeBSDs USB drivers. > >> > >> In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world > >> and kernel. I've commented the ?hci drivers out of the kernel config and > >> set USB_DEBUG. > >> > >> > >> At fist please Cc me, I'm not on freebsd-usb. > > > >> After Loading the uhci module: > >Hi, > > > >Could you log the USB traffic on the UHCI controller using usbdump ? > > > >It would be interesting to see what is going on. > > > >Have you tried using an external High-Speed HUB? > > > >--HPS > > Here is the dump: http://www.tiffe.de/other/usbus1.dump > > This is connecting the J-link, starting openocd twice, removing > and reconnecting the J-link followed by a kldunload uhci. > > Can't provide a dump while kldloading since usbdump stops when the driver > is unloaded. > > I have no Highspeedr-Hub so this was a direct connect. Results are the same > regardless whcih interface is used. Hi, The BULK transfer stops by a stall. I suspect the UHCI is receiving more data than it can, and is hardware programmed to stop it looks like. I can't change that behaviour. It is not a bug in the FreeBSD USB driver I think. Try this patch to /usr/ports/devel/openocd/ make extract patch ee ./work/openocd-0.5.0/src/jtag/drivers/jlink.c Change: result = jlink_usb_read(jlink, in_length); Into: /* must read at least one packet at a time! */ result = jlink_usb_read(jlink, in_length + ((-in_length) & 63)); Then re-compile and try again! --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Mar 17 08:59:04 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91EA3106564A for ; Sat, 17 Mar 2012 08:59:04 +0000 (UTC) (envelope-from holm@beast.freibergnet.de) Received: from bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by mx1.freebsd.org (Postfix) with ESMTP id 4BF088FC19 for ; Sat, 17 Mar 2012 08:59:03 +0000 (UTC) Received: from bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by bmail.freibergnet.de (Postfix) with ESMTP id 664FD929B02E for ; Sat, 17 Mar 2012 09:58:57 +0100 (CET) X-Virus-Scanned: amavisd-new at freibergnet.de Received: from bmail.freibergnet.de ([46.4.195.14]) by bmail.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) (amavisd-new, port 10024) with LMTP id DYSDxNdKonGf for ; Sat, 17 Mar 2012 09:58:53 +0100 (CET) Received: from beast.freibergnet.de (bmail.freibergnet.de [46.4.195.14]) by bmail.freibergnet.de (Postfix) with ESMTP id 36768929A503 for ; Sat, 17 Mar 2012 09:58:53 +0100 (CET) Received: by beast.freibergnet.de (Postfix, from userid 201) id 285BB4B8040; Sat, 17 Mar 2012 09:58:53 +0100 (CET) Date: Sat, 17 Mar 2012 09:58:53 +0100 From: Holm Tiffe To: freebsd-usb@freebsd.org Message-ID: <20120317085853.GA53895@beast.freibergnet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.3i Organization: FreibergNet Internet Services, TSHT Priority: normal X-Phone: +49-3731-74222 X-Mobile: +49-172-8790741 X-Fax: +49-3731-74200 Subject: Re: USB UHCI Problems on 8-Stable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: holm@freibergnet.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 08:59:04 -0000 >Hi, > >The BULK transfer stops by a stall. I suspect the UHCI is receiving more data >than it can, and is hardware programmed to stop it looks like. I can't change >that behaviour. It is not a bug in the FreeBSD USB driver I think. > >Try this patch to /usr/ports/devel/openocd/ > >make extract patch > >ee ./work/openocd-0.5.0/src/jtag/drivers/jlink.c Uhh, may I use Vi? :-) > >Change: > >result = jlink_usb_read(jlink, in_length); > >Into: > >/* must read at least one packet at a time! */ >result = jlink_usb_read(jlink, in_length + ((-in_length) & 63)); > >Then re-compile and try again! > >--HPS Ok, I'll try that patch(~ sunday eavening, I'm out of town currntly), but it adresses the problem with openocd. ( which is good anyways). I is still a bug in FreeBSD's driver that there is now way to wake up the controller again and I think that should be changed. (please remember, most Kerenels are running with compiled in drivers, so thie singe solution is a reboot to reactivate the controller. I dont know that much about USB, but I sure that FreeBSDs behavior in this case isn't that what we really want. I think usbconfig -d ugen1.1 reset schould be made working.. Regards, Holm -- Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583 www.tsht.de, info@tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741 From owner-freebsd-usb@FreeBSD.ORG Sat Mar 17 16:32:31 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502421065675 for ; Sat, 17 Mar 2012 16:32:31 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id CEA578FC1A for ; Sat, 17 Mar 2012 16:32:30 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 252909752; Sat, 17 Mar 2012 17:32:22 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, holm@freibergnet.de Date: Sat, 17 Mar 2012 17:30:46 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <20120317085853.GA53895@beast.freibergnet.de> In-Reply-To: <20120317085853.GA53895@beast.freibergnet.de> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203171730.46127.hselasky@c2i.net> Cc: Subject: Re: USB UHCI Problems on 8-Stable 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, 17 Mar 2012 16:32:31 -0000 On Saturday 17 March 2012 09:58:53 Holm Tiffe wrote: > >Hi, > > > >The BULK transfer stops by a stall. I suspect the UHCI is receiving more > >data than it can, and is hardware programmed to stop it looks like. I > >can't change that behaviour. It is not a bug in the FreeBSD USB driver I > >think. > > > >Try this patch to /usr/ports/devel/openocd/ > > > >make extract patch > > > >ee ./work/openocd-0.5.0/src/jtag/drivers/jlink.c > > Uhh, may I use Vi? :-) > > >Change: > > > >result = jlink_usb_read(jlink, in_length); > > > >Into: > > > >/* must read at least one packet at a time! */ > >result = jlink_usb_read(jlink, in_length + ((-in_length) & 63)); > > > >Then re-compile and try again! > > > >--HPS > > Ok, I'll try that patch(~ sunday eavening, I'm out of town currntly), > but it adresses the problem with openocd. ( which is good anyways). > I is still a bug in FreeBSD's driver that there is now way to > wake up the controller again and I think that should be changed. > (please remember, most Kerenels are running with compiled in drivers, so > thie singe solution is a reboot to reactivate the controller. > I dont know that much about USB, but I sure that FreeBSDs behavior in this > case isn't that what we really want. I think usbconfig -d ugen1.1 reset > schould be made working.. I will think about it. Currently a suspend and resume will do that, though it might be an idea to allow that runtime using usbconfig. --HPS