From owner-freebsd-questions@FreeBSD.ORG Sun Mar 15 13:51:00 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D944A3A for ; Sun, 15 Mar 2015 13:51:00 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 111D82BF for ; Sun, 15 Mar 2015 13:50:59 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BE5D01FE023; Sun, 15 Mar 2015 14:50:50 +0100 (CET) Message-ID: <55058E68.7070806@selasky.org> Date: Sun, 15 Mar 2015 14:51:36 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ian Smith , The Lost Admin Subject: Re: FreeBSD 9.3 is not recognizing USB 2.0 peripherals (or maybe USB2 bus) References: <20150315233303.D22641@sola.nimnet.asn.au> In-Reply-To: <20150315233303.D22641@sola.nimnet.asn.au> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2015 13:51:00 -0000 On 03/15/15 14:35, Ian Smith wrote: > In freebsd-questions Digest, Vol 562, Issue 7, Message: 2 > On Sat, 14 Mar 2015 10:24:52 -0400 The Lost Admin wrote: > > On Mar 14, 2015, at 12:53 AM, Ian Smith wrote: > > > > > In freebsd-questions Digest, Vol 562, Issue 4, Message: 3 > > > On Wed, 11 Mar 2015 18:43:03 -0400 The Lost Admin wrote: > > >> Hi all, > > >> > > >> I?ve got a Zotac Zbox SD-ID12 (Intel Atop D525). According to the > > >> vendor specs it?s got 6 USB 2.0 ports. It?s spend the last few years > > >> sitting on a shelf running FreeBSD and getting periodic > > >> updates/upgrades and little else. > > >> > > >> Currently at FreeBSD 9.3-RELEASE-p10. > > >> > > >> Recently I decided to make use of some old USB2 hard drives I had > > >> lying around and turn the box into a basic NAS for my home network > > >> (nothing fancy just NFS). I got the NFS working without a hitch. > > >> > > >> I attached the first of the USB 2.0 drives and it seamed really slow. > > >> Looking at /var/messages it indicates it?s running at USB 1 speeds: > > >> > > >> da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 > > >> da0: Fixed Direct Access SCSI-4 device > > >> da0: Serial Number 575851314136305639323030 > > >> da0: 1.000MB/s transfers > > >> da0: 953842MB (1953468416 512 byte sectors: 255H 63S/T 121597C) > > >> da0: quirks=0x2 > > >> > > >> Further digging into dmesg suggests to me that FreeBSD is somehow > > >> either not finding or not using USB2 drivers. > > >> > > >> For the sake of keeping this message short, the full verbose dmesg > > >> can be found here -> http://pastebin.com/sUxvCd0m ; it will expire in > > >> one month (April 11, 2015). > > > > > > Unfortunately your dmesg is missing the top - these days you likely need > > > to set kern.msgbufsize=98304 or at least >64K, to capture a full verbose > > > boot; I have that in /boot/loader.conf or you can set it from the loader > > > prompt - so it's not clear whether you're running a GENERIC kernel, but > > > as you say 9.3-RELEASE-p10 I'll assume you probably do. If not, and > > > your kernel doesn't include device ehci, that's your problem solved :) > > > > This is the top of a non-verbose DMESG. It will take some fiddling to > > get the verbose one out of the box because it?s headless. NOTE: > > currently I have module_load eyries for ehci and ohci in loader.conf. > > Ordinary dmesg will show ehci detection fine, and your dmesg at pastebin > may be enough for someone who knows the details of pci and usb detection > - which sure isn't me. Copying this to Hans Petter as > this seems like a real failure to detect hardware - or broken hardware. > > > It is a GENERIC kernel. > > Ok, so loading ehci is superfluous, and ohci is the other USB 1 driver > other than the uhci that yours has. See below, where it seems that the > ehci that kldstat -v lists is the module rather than the built-in (hmm!) > > > Copyright (c) 1992-2014 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 9.3-RELEASE-p10 #0: Tue Feb 24 21:01:19 UTC 2015 > > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 > > gcc version 4.2.1 20070831 patched [FreeBSD] > > > module_register: module pci/ehci already exists! > > Module pci/ehci failed to register: 17 > > module_register: module pci/ohci already exists! > > Module pci/ohci failed to register: 17 > > > CPU: Intel(R) Atom(TM) CPU D525 @ 1.80GHz (1795.74-MHz 686-class CPU) > > Origin = "GenuineIntel" Id = 0x106ca Family = 0x6 Model = 0x1c Stepping = 10 > > Features=0xbfebfbff > > Features2=0x40e31d > > AMD Features=0x20100000 > > Any reason you're not running amd64 on this machine (LM)? Might be > worth booting from a 9.3 amd64 memstick to a shell and checking dmesg or > /var/run/dmesg.boot to see if it detects/attaches ehci with that kernel? > > > AMD Features2=0x1 > > TSC: P-state invariant, performance statistics > > real memory = 2147483648 (2048 MB) > > avail memory = 2071896064 (1975 MB) > > Event timer "LAPIC" quality 400 > > ACPI APIC Table: <122310 APIC1702> > > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > > FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 HTT threads > > cpu0 (BSP): APIC ID: 0 > > cpu1 (AP/HT): APIC ID: 1 > > cpu2 (AP): APIC ID: 2 > > cpu3 (AP/HT): APIC ID: 3 > > ioapic0: Changing APIC ID to 4 > > ioapic0 irqs 0-23 on motherboard > > kbd1 at kbdmux0 > > acpi0: <122310 RSDT1702> on motherboard > > acpi0: Power Button (fixed) > > acpi0: reservation of fee00000, 1000 (3) failed > > acpi0: reservation of 0, a0000 (3) failed > > acpi0: reservation of 100000, 7f600000 (3) failed > > > >> NOTES: > > >> I have tried a variety of USB2 devices (CD R/W, usb hard drive, thumb > > >> drives). I have confirmed that all are detected and accessed as USB > > >> 2.0 devices on Windows 7, Mac OSX. I have also confirmed that Linux > > >> (Raspbian on a raspberry Pi) recognized and used the hard drive as a > > >> USB2.0 device. > > Have you tried say some linux boot CD or memstick to see if linux sees > the USB ports ok as USB 2 on this box? That could narrow this down to > whether the hardware on your board is faulty, or it's a FreeBSD issue? > > > > Your dmesg shows: > > > > > > uhci0: port 0xd880-0xd89f irq > > > 23 at device 29.0 on pci0 > > > ioapic0: routing intpin 23 (PCI IRQ 23) to lapic 0 vector 55 > > > uhci0: LegSup = 0x2f00 > > > usbus0 on uhci0 > > > usbus0: bpf attached > > > uhci0: usbpf: Attached > > > > > > and the same for uhci1, uhci2 and uhci3. If ehci (USB 2) were being > > > detected you'd then expect to see something like, as here on 9.3-R: > > > > > > ehci0: mem 0xf2926c00-0xf2926fff irq > > > 23 at device 26.7 on pci0 > > > ioapic0: routing intpin 23 (PCI IRQ 23) to lapic 0 vector 55 > > > usbus3: EHCI version 1.0 > > > usbus3 on ehci0 > > > usbus3: bpf attached > > > ehci0: usbpf: Attached > > > > > > though on a different irq and usbus than the uhci ones. > > > > > >> I tried a few different cables just in case. > > >> > > >> Also, I have been using FreeBSD since the 1990s and used to be pretty > > >> active at helping people on this list (a long time ago). > > > > > > That's cool, but you don't need a credit balance to qualify :) > > > > > > smithi@x200:~ % kldstat -v | grep ehci > > > 295 ehci/usbus > > > 287 pci/ehci > > > smithi@x200:~ % devinfo -v | grep ehci > > > ehci0 pnpinfo vendor=0x8086 device=0x293c subvendor=0x17aa > > > subdevice=0x20f1 class=0x0c0320 at slot=26 function=7 handle=\_SB_.PCI0.EHC1 > > > ehci1 pnpinfo vendor=0x8086 device=0x293a subvendor=0x17aa > > > subdevice=0x20f1 class=0x0c0320 at slot=29 function=7 handle=\_SB_.PCI0.EHC0 > > > $ kldstat -v | grep ehci > > 317 ehci/usbus > > 3 1 0xc1697000 e7b4 ehci.ko (/boot/kernel/ehci.ko) > > 2 pci/ehci > > I find that odd, I'd have thought the failure to load ehci above would > have left you with the pci/ehci from kernel, like mine. Had you loaded > ehci from /boot/loader.conf the first time you reported this problem > also, or just this last time? Trying not to assume too much .. > > > $ devinfo -v | grep ehci > > # produced nothing so.. > > Yes that only appears after hardware is detected, and yours isn't. > > > $ devinfo -v | grep hci > > uhci0 pnpinfo vendor=0x8086 device=0x27c8 subvendor=0x8086 subdevice=0x27c8 class=0x0c0300 at slot=29 function=0 handle=\_SB_.PCI0.USB0 > > uhci1 pnpinfo vendor=0x8086 device=0x27c9 subvendor=0x8086 subdevice=0x27c9 class=0x0c0300 at slot=29 function=1 handle=\_SB_.PCI0.USB1 > > uhci2 pnpinfo vendor=0x8086 device=0x27ca subvendor=0x8086 subdevice=0x27ca class=0x0c0300 at slot=29 function=2 handle=\_SB_.PCI0.USB2 > > uhci3 pnpinfo vendor=0x8086 device=0x27cb subvendor=0x8086 subdevice=0x27cb class=0x0c0300 at slot=29 function=3 handle=\_SB_.PCI0.USB3 > > These look ok, and they're working ok at USB 1 speeds, right? > > > > If you've got ehci loaded then it's not being detected, which is weird > > > indeed. Report back with the output of those two commands? > > > > > > cheers, Ian (please cc me, I take questions as a digest) > > If you can confirm USB 2 works booting linux or $omethingelse then you > maybe should try freebsd-usb@freebsd.org, likely needing subscription. > > cheers, Ian > Hi, With regular PC's there should be an EHCI or XHCI host controllers in dmesg. Else only FULL speed will be supported. What is "pciconf -lv" outputting. Might be an ACPI issue ... --HPS