From owner-freebsd-usb@FreeBSD.ORG Sun Feb 16 09:20:00 2014 Return-Path: Delivered-To: freebsd-usb@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EF47990 for ; Sun, 16 Feb 2014 09:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57AC91C34 for ; Sun, 16 Feb 2014 09:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1G9K0X7092138 for ; Sun, 16 Feb 2014 09:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1G9K0Lh092137; Sun, 16 Feb 2014 09:20:00 GMT (envelope-from gnats) Resent-Date: Sun, 16 Feb 2014 09:20:00 GMT Resent-Message-Id: <201402160920.s1G9K0Lh092137@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Philipp Maechler Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89722886 for ; Sun, 16 Feb 2014 09:16:31 +0000 (UTC) Received: from newred.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 654A81C16 for ; Sun, 16 Feb 2014 09:16:31 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by newred.freebsd.org (8.14.7/8.14.7) with ESMTP id s1G9GUIF046508 for ; Sun, 16 Feb 2014 09:16:30 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.7/8.14.7/Submit) id s1G9GUeR046495; Sun, 16 Feb 2014 09:16:30 GMT (envelope-from nobody) Message-Id: <201402160916.s1G9GUeR046495@cgiserv.freebsd.org> Date: Sun, 16 Feb 2014 09:16:30 GMT From: Philipp Maechler To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: usb/186811: Intel NUC Haswell Generation USB 3 support (solution attached) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Feb 2014 09:20:00 -0000 >Number: 186811 >Category: usb >Synopsis: Intel NUC Haswell Generation USB 3 support (solution attached) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 16 09:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Philipp Maechler >Release: 9.2-RELEASE / 10.0-RELEASE >Organization: >Environment: FreeBSD x.tontaube.ch 10.0-RELEASE FreeBSD 10.0-RELEASE #6 r261922M: Sat Feb 15 19:30:32 CET 2014 root@x.tontaube.ch:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I bought a Intel Nuc D34010WYK [0]. It has a QS77 Chipset with a Intel Panther Point USB Controller (as far as I can say). The problem was, that a connected external harddisk case (it has a JMicron USB2Sata bridge JMicron JMS539 [1]) or even a simple usb 3 memory stick, it was always connected at highspeed (usb2) instead of superspeed (usb3) (see usbconfig in [2]). Of course, the attached harddisk drives only appeared to have only 40MB/s transfer rates instead of 400MB/s. [0] http://www.intel.com/content/www/us/en/nuc/nuc-kit-d34010wyk.html [1] http://www.jmicron.com/Product_JMS539.htm JMicron USB2Sata bridge (in a Raidsonic Icybox IB-3640SU3 together with a JMB321 SATA port multiplier) [2] faked output out of my head, if you need an exactly output I will provide after a reboot from a 10.0-RELEASE memory stick: [root@x ~]# usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (8mA) # <- PROBLEM ugen0.7: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (8mA) # <- PROBLEM >How-To-Repeat: Attach any USB 3 mass storage (maybe any device) to a Intel Nuc D34010WYK. Below 9.2-RELEASE and 10.0-RELEASE, the device will only appear as a HIGH-speed device (usb2) instead of a SUPER-speed device (usb3). (e.g. output dmesg or usbconfig) >Fix: By accident I found this commit: http://lists.freebsd.org/pipermail/svn-src-stable-9/2012-November/003213.html I then realized, that the pci dev id on my intel nuc is 0x9c318086 instead of 0x8c318086. In a fast hack I added the same code for this id in a 10.0-RELEASE Generic kernel [3] and the problem was solved [4], the devices are now correctly routed to xhci and have superspeed support. I hope this pr helps to integrate the solution to FreeBSD, but I think the patch is not finished yet (maybe you would change the descriptions etc, as my knowledge of hardware naming is limited I'm not able to do). But as it doesn't change much, I'd define it as production-ready. Philipp [3] [root@x /usr/src]# svn diff sys/dev/usb/controller/xhci_pci.c Index: sys/dev/usb/controller/xhci_pci.c =================================================================== --- sys/dev/usb/controller/xhci_pci.c (revision 261922) +++ sys/dev/usb/controller/xhci_pci.c (working copy) @@ -106,6 +106,8 @@ return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); + case 0x9c318086: + return ("Intel Panther Point USB 3.0 controller"); default: break; @@ -239,6 +241,7 @@ switch (pci_get_devid(self)) { case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ + case 0x9c318086: /* Panther Point */ sc->sc_port_route = &xhci_pci_port_route; break; default: [4] [root@x /usr/src]# usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.6: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (2mA) # <- perfect ugen0.7: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (2mA) # <- perfect Patch attached with submission follows: --- sys/dev/usb/controller/xhci_pci.c 2014-02-16 10:09:07.597292623 +0100 +++ sys/dev/usb/controller/xhci_pci.c.new 2014-02-16 10:09:00.400292742 +0100 @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: releng/10.0/sys/dev/usb/controller/xhci_pci.c 255768 2013-09-21 21:40:57Z hselasky $"); +__FBSDID("$FreeBSD: release/10.0.0/sys/dev/usb/controller/xhci_pci.c 255768 2013-09-21 21:40:57Z hselasky $"); #include #include @@ -106,6 +106,8 @@ return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); + case 0x9c318086: + return ("Intel Panther Point USB 3.0 controller"); default: break; @@ -239,6 +241,7 @@ switch (pci_get_devid(self)) { case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ + case 0x9c318086: /* Panther Point */ sc->sc_port_route = &xhci_pci_port_route; break; default: >Release-Note: >Audit-Trail: >Unformatted: