From owner-freebsd-usb@freebsd.org Thu Jun 29 21:29:00 2017 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 26DC5DA5ED2 for ; Thu, 29 Jun 2017 21:29:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 E525874639 for ; Thu, 29 Jun 2017 21:28:59 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (216-72-41-245.barak.net.il [216.72.41.245]) (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 837ED260608; Thu, 29 Jun 2017 23:28:56 +0200 (CEST) Subject: Re: USB devices sometimes not seen at boot time To: Matthias Apitz , freebsd-usb@freebsd.org References: <20170629194658.GA2488@c720-r314251> From: Hans Petter Selasky Message-ID: <11fac898-a4bc-8337-2d84-8777d136c7e0@selasky.org> Date: Thu, 29 Jun 2017 23:26:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170629194658.GA2488@c720-r314251> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 21:29:00 -0000 On 06/29/17 21:46, Matthias Apitz wrote: > > Hello, > > I have the problem that on my netbook (an Acer C720) sometimes the USB > devices are not seen at boot time while the bus is probed. I filed an > issue as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220127 which > did not got any attention so far. > > Meanwhile I was trying to find the rule for the problem and have > investigated the 'dmesg' output for any "good" boot (i.e. the devices > was seen) and compared with "bad" boot (when the device was not seen). > There is a clear dependency of the order the USB bus is probed: > > This is from a good one: > > # egrep 'uhub|ugen' dmesg-20170628-202601-good.txt > ugen0.1: <0x8086 XHCI root HUB> at usbus0 > ugen1.1: at usbus1 > uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 > uhub1: on usbus1 > uhub0: 13 ports with 13 removable, self powered > uhub1: 2 ports with 2 removable, self powered > ugen0.2: at usbus0 > ugen0.3: at usbus0 > ugen0.4: at usbus0 > > and this is from a bad one: > > # egrep 'uhub|ugen' dmesg-20170628-202351-bad.txt > ugen1.1: at usbus1 > ugen0.1: <0x8086 XHCI root HUB> at usbus0 > uhub0: on usbus1 > uhub1: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 > uhub1: 13 ports with 13 removable, self powered > uhub0: 2 ports with 2 removable, self powered > ugen1.2: at usbus1 > uhub2 on uhub0 > uhub2: on usbus1 > uhub2: 8 ports with 8 removable, self powered > > The device in question it the "Identiv uTrust 3512 SAM slot Token" and > the rule is: When XHCI is probed as ugen0.1 and later as uhub0, all is > fine; else it fails. > > Any ideas on this? What makes the boot differ in this order? > Hi, USB explores different root HUBs ugen0.1, ugenX.1 and so on in parallell and not serial. Maybe a race or electrical issue is causing the order to fail. You can try compiling a kernel without USB support and loading xhci, ehci, ohci and uhci by a script using kldload. Alternate the loading order. --HPS