From owner-freebsd-usb@freebsd.org Sun Aug 28 15:53:01 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2226B777E8 for ; Sun, 28 Aug 2016 15:53:01 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49FF4D8B for ; Sun, 28 Aug 2016 15:53:01 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: by mail-lf0-x236.google.com with SMTP id g62so85797727lfe.3 for ; Sun, 28 Aug 2016 08:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=3HahTLErs79W+NjAQpegRVspxFWmS25zHoJ+/FIbNGM=; b=X3HVM4Sd4eq4yr3Vl69w2oycaHrfNAFLh122V2DpFyRDWFfDV5bCgpaCKkQHETrMUB KEPT0N6eYQozjUP/cCDmSbpKXCrSsXZ8RQ87mIDylpGw6T+Ab7hSoGcNXAOo0IfrRFIp 6V+UJthTkcdLQ8XZphoXoOhS8Dz4NPSj1mc6AZRRLUVZOUOU4T60OkfDHjdXohZjArmJ A/KtoCwIUbyG/xE5hKnW+yblpT0QwoOoxx+l0qiVF+NwSHlbFc1pXVv2h6M7lIoRTFRH LQb0WnIkRn+ktxQ6yxriPnFF08qz4wLOlg+Y+l8ViUicPQH6FCUBINHfQcQex2jQjODJ cxJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=3HahTLErs79W+NjAQpegRVspxFWmS25zHoJ+/FIbNGM=; b=JVn41HA6oYF7kCpZI2Q0Q93ioiTN+LmYucTMvRTJxhQgYhL9m7n1qf4WfPFQnzD0bu QzlA6TDQd3AOKtDl+KaXDW3JfYcmRxtjGuwmI7TJpjo67hyOveZyyzWIFH8J9XCJDtnW s5EQiR1GBwl3xPcTJHH9s++0kgMV9MksIU6m6kunc1ZHtEHvH+2HTHxgsSRagmMVlKBw X1+jvaj7hpBfjOuXqXfenb9kNodPTkVGynV7pnBLGoze6kCIkojZxftjWekvamCRJwBc lqkMjAxrMfqqwrCsFK3b/O+XOG5zNBEDwlP4f2KEnySBkuHr0ER7/e77VrhI2XyyvjQ7 qwSw== X-Gm-Message-State: AE9vXwNvhp2NXmXEnwZ3rzzZMit66gnoo5N2t8TEllo8QgweREt4mfztXdYtntLXAob8mRFS5cr4+0NHS/nHMA== X-Received: by 10.25.80.212 with SMTP id e203mr4762545lfb.115.1472399578699; Sun, 28 Aug 2016 08:52:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.30.83 with HTTP; Sun, 28 Aug 2016 08:52:57 -0700 (PDT) In-Reply-To: References: <2a28aa4b-3256-b091-9a6e-c2a29f993d6c@selasky.org> From: Adam Stylinski Date: Sun, 28 Aug 2016 11:52:57 -0400 Message-ID: Subject: Re: USB 3.0 devices negotiate to spd=HIGH for all ports To: Hans Petter Selasky , freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2016 15:53:02 -0000 On Sun, Aug 28, 2016 at 10:18 AM, Adam Stylinski wrote: > Looking at my motherboard's manual, this is what my BIOS exposes: > > USB 2.0 Controller Use this item to enable or disable the use of USB 2.0 > controller. USB 3.0 Controller Use this item to enable or disable the use > of USB 3.0 controller. Legacy USB Support Use this option to select legacy > support for USB devices. There are four con guration options: [Enabled], > [Disabled], [Auto] and [UEFI Setup Only]. The default value is [Enabled]. > Please refer to below descriptions for the details of these four options: > [Enabled] - Enables support for legacy USB. [Disabled] - USB devices are > not allowed to use under legacy OS and UEFI setup when [Disabled] is > selected. If you have USB compatibility issue, it is recommended to select > [Disabled] to enter OS. [Auto] - Enables legacy support if USB devices are > connected. [UEFI Setup Only] - USB devices are allowed to use only under > UEFI setup and Windows / Linux OS. Legacy USB 3.0 Support Use this option > to enable or disable legacy support for USB 3.0 devices. > > I believe 3.0 controller is enabled, or I wouldn't be able to use those > ports at all. Now the Legacy USB 3.0 option is a bit vaguely named, as it > could be taken to mean, use USB 3.0 ports in legacy mode. It could also > mean, "allow USB 2.0 devices with 3.0 ports". The default for that option > is disabled, but it may have been misconstrued and enabled at one point. > Getting to the BIOS unfortunately requires me installing a video card in > there that's not 15 years old, unfortunately, as it's one of those > sophisticated new BIOSes that work with a mouse and require fancier VGA > BIOSes than what this S3 Virge card provides. It's definitely worth a > look, though. > > On Sat, Aug 27, 2016 at 2:05 PM, Adam Stylinski > wrote: > >> The only quirk specific code I can find in Linux's kernel for XHCI is >> this: >> http://lxr.free-electrons.com/source/drivers/usb/host/pci-quirks.c >> >> I believe I have one of the SBxxx AMD chipsets, though I can't recall >> which one. I don't see anything in there referring to my PCI IDs, unless >> I'm looking at the wrong outputs in pciconf -lv. I see one quirk in >> particular regarding power management but that seems to be more about >> stability rather than speed. I'm sure I'm missing something. >> >> On Sat, Aug 27, 2016 at 1:43 PM, Hans Petter Selasky >> wrote: >> >>> On 08/27/16 18:41, Adam Stylinski wrote: >>> >>>> Hello, >>>> >>>> I definitely have a USB 3.0 controller that is being recognized by XHCI: >>>> >>>> [adam@nasbox ~]$ sudo usbconfig >>>> ugen0.1: at usbus0, cfg=0 md=HOST spd=SUPER >>>> (5.0Gbps) pwr=SAVE (0mA) >>>> ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) >>>> pwr=SAVE (0mA) >>>> ugen1.1: at usbus1, cfg=0 md=HOST spd=SUPER >>>> (5.0Gbps) pwr=SAVE (0mA) >>>> ugen3.1: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) >>>> pwr=SAVE (0mA) >>>> ugen4.1: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) >>>> pwr=SAVE (0mA) >>>> ugen5.1: at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) >>>> pwr=SAVE (0mA) >>>> ugen7.1: at usbus7, cfg=0 md=HOST spd=FULL (12Mbps) >>>> pwr=SAVE (0mA) >>>> ugen6.1: at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) >>>> pwr=SAVE (0mA) >>>> ugen8.1: at usbus8, cfg=0 md=HOST spd=HIGH (480Mbps) >>>> pwr=SAVE (0mA) >>>> ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) >>>> pwr=ON (200mA) >>>> >>>> >>>> xhci0@pci0:3:0:0: class=0x0c0330 card=0x70231849 chip=0x70231b6f >>>> rev=0x01 >>>> hdr=0x00 >>>> vendor = 'Etron Technology, Inc.' >>>> device = 'EJ168 USB 3.0 Host Controller' >>>> class = serial bus >>>> subclass = USB >>>> xhci1@pci0:4:0:0: class=0x0c0330 card=0x70231849 chip=0x70231b6f >>>> rev=0x01 >>>> hdr=0x00 >>>> vendor = 'Etron Technology, Inc.' >>>> device = 'EJ168 USB 3.0 Host Controller' >>>> class = serial bus >>>> subclass = USB >>>> >>>> However, when I connect a USB 3.0 device into a USB 3.0 port, it only >>>> gives >>>> me spd=HIGH. This is a Sandisk CZ80, but I've other devices in the past >>>> and have had the same behavior. Plugging a device in with >>>> hw.usb.xhci.debug=1 doesn't appear to print too many useful things, at >>>> least not to an end user. I won't yet paste the full output, but it >>>> looks >>>> something like this: >>>> >>>> xhci_transfer_insert: qh_pos = 2 >>>> xhci_check_transfer: slot=1 epno=3 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_check_transfer: TD is last >>>> xhci_check_transfer: slot=1 epno=3 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_device_generic_enter: >>>> xhci_setup_generic_chain_sub: NTRB=1 >>>> xhci_setup_generic_chain_sub: LINK=0x241ff800 >>>> xhci_setup_generic_chain: first=0xfffff800241ff980 >>>> last=0xfffff800241ff980 >>>> xhci_device_generic_start: >>>> xhci_transfer_insert: qh_pos = 2 >>>> xhci_check_transfer: slot=1 epno=4 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_check_transfer: TD is last >>>> xhci_check_transfer: slot=1 epno=4 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_device_generic_enter: >>>> xhci_setup_generic_chain_sub: NTRB=1 >>>> xhci_setup_generic_chain_sub: LINK=0x55fc6a300 >>>> xhci_setup_generic_chain: first=0xfffff8055fc6a480 >>>> last=0xfffff8055fc6a480 >>>> xhci_device_generic_start: >>>> xhci_transfer_insert: qh_pos = 0 >>>> xhci_check_transfer: slot=1 epno=3 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_check_transfer: TD is last >>>> xhci_check_transfer: slot=1 epno=3 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_device_generic_enter: >>>> xhci_setup_generic_chain_sub: NTRB=1 >>>> xhci_setup_generic_chain_sub: LINK=0x3d958d000 >>>> xhci_setup_generic_chain: first=0xfffff803d958d180 >>>> last=0xfffff803d958d180 >>>> xhci_device_generic_start: >>>> xhci_transfer_insert: qh_pos = 1 >>>> xhci_check_transfer: slot=1 epno=3 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_check_transfer: TD is last >>>> xhci_check_transfer: slot=1 epno=3 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_device_generic_enter: >>>> xhci_setup_generic_chain_sub: NTRB=1 >>>> xhci_setup_generic_chain_sub: LINK=0x7d676f000 >>>> xhci_setup_generic_chain: first=0xfffff807d676f180 >>>> last=0xfffff807d676f180 >>>> xhci_device_generic_start: >>>> xhci_transfer_insert: qh_pos = 0 >>>> xhci_check_transfer: slot=1 epno=4 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> xhci_check_transfer: TD is last >>>> xhci_check_transfer: slot=1 epno=4 stream=256 remainder=0 status=1 >>>> xhci_check_transfer: stream_id=0 >>>> >>>> What can I do to end this frustrating issue of USB 2.0 only-ness? >>>> >>> >>> Try to google the PCI IDs of your device and see if Linux has any quirks >>> for your card. Sometimes these cards need special register writes to enable >>> USB 3.0. >>> >>> --HPS >>> >>> >> > Alright, so I went through the crazy hurdles to actually get to the BIOS, and the USB legacy support for USB 3.0 was enabled. I disabled it, and it has no apparently effect, other than the fact that setting up the device takes a lot longer now: usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT ugen0.2: at usbus0 (disconnected) uhub_reattach_port: could not allocate new device ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x0100 umass0:14:0:-1: Attached to scbus14 da23 at umass-sim0 bus 0 scbus14 target 0 lun 0 da23: Removable Direct Access SPC-4 SCSI device da23: Serial Number [PROBABLY NOT IMPORTANT ENOUGH TO SCRUB, BUT DOING SO ANYWAY] da23: 40.000MB/s transfers da23: 59840MB (122552320 512 byte sectors) da23: quirks=0x2 [adam@nasbox ~]$ sudo usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen3.1: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen4.1: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen6.1: at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen5.1: at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen7.1: at usbus7, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen8.1: at usbus8, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA) Which steps are next? I apologize to the list for top-posting, it's been a while since I've been to a mailing list and I decided to do it through Gmail for whatever reason instead of mutt.