From owner-freebsd-usb@freebsd.org Sun Jul 3 12:35:11 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 233E0AC5F47 for ; Sun, 3 Jul 2016 12:35:11 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (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 E46B52FE6 for ; Sun, 3 Jul 2016 12:35:10 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bJgc7-000I3B-Ma for freebsd-usb@freebsd.org; Sun, 03 Jul 2016 13:35:08 +0100 Date: Sun, 3 Jul 2016 13:35:06 +0100 From: Gary Palmer Cc: freebsd-usb@freebsd.org Subject: Re: USB and loader.conf hints Message-ID: <20160703123506.GC70150@in-addr.com> References: <20160703014245.GB70150@in-addr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160703014245.GB70150@in-addr.com> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false 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, 03 Jul 2016 12:35:11 -0000 On Sun, Jul 03, 2016 at 02:42:46AM +0100, Gary Palmer wrote: > Hi, > > Is it possible to wire a disk device to a particular USB port > via loader.conf hints? > > My problem is that my root device appears via USB. If I leave my 3g > dongle attached, then it competes for the root device for what gets > da0, and the two times I've tried the dongle wins and gets da0 and > the boot stops as it can't find the root partitions. > > This is in a nanobsd install, so I'm not sure if labels would work > as nanobsd is set up to use device names. More specifically, I see from dmesg "umass1: at uhub1, port 1, addr 4 (disconnected)" (why that isn't also available on probe I don't know). How do I represent that in loader.conf? e.g. hints.umass.1.at="uhub1" doesn't exactly communicate what is needed, I also need the port number in there somehow, and "hint.umass.1.port" would seem to be reserved for the I/O address according to device.hints(5) FYI the usbconfig output is: ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (96mA) ugen0.4: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) Thanks, Gary