From owner-freebsd-usb@freebsd.org Sun Jul 3 13:35:04 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 2A4F2B8FD1A for ; Sun, 3 Jul 2016 13:35:04 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (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 B3C6F24EA; Sun, 3 Jul 2016 13:35:03 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id r201so84231228wme.1; Sun, 03 Jul 2016 06:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=+2U4jxmNwNRa2ldH1bsliFaLCseD4imTiU1ENjz1tHs=; b=gLA/UcrUVWASdUOWqHiRq/Ef+BN5bzlgQDUL9p+ESrW6T1pqwr4Wjd/nsfcQuS6wIC VzhpLcQidHVZdTy/nuS2oR+u5StYRnBR8UZYRR+o0qfXuqYRWgy599A+ZItJeNgthJ1k 2Vn9XMmdiprImunKVTMNEgOmyFFj4GjiTZYikD4GOm1WuUkFhXnpG5nUsIsUVoXEDL9+ kiNNhoY8G52VLLoxqEc/ASAe1LN/Ujz2KfuZfV7kjUo6wJNL769OtvHVsD1+Y8qy7dt1 I3Oq/I9cC+ONKGbJzenQM7UjU4LA7twFbbYOcdsGD7455VQcEj36RTEwFnVQQJ7urLTQ WwwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=+2U4jxmNwNRa2ldH1bsliFaLCseD4imTiU1ENjz1tHs=; b=V3MTrFfwVMrnMjQ8vWMAjwmLJU9ngrFWzc+HZVqxXWABu/+dQ/EoweC8bNcUPZLu4a D4U0RAgXMcNwyCSVwMvPRpauN8QAXDxi2iQ9xgrVXIsW3qFXTyRKN0qqyYfj0P+szhtc se0RkjgFEFz1P0e1fQ0VLWqAjVm6rgw3715F2wscKd4vpSpIk6YAEpWE6b3u9VxCm08e boduluNtJ0tfJ6r5qII/57k43H6LB48EyzXLyyvajIYU1DkIfGKjJ2vDA1EVOxuMqL8P 5sbP5PLKYTNyWPD7Fg/x+UY/ajWEzj/Ddjz30Ywss/4a/g6QDeOBMDK3ejy/aR8jGrCx zH8Q== X-Gm-Message-State: ALyK8tJOQZ7pQM3YTMDdzEMdcurb1wfz/qmbeC5OTutL15qLT8X1G1NUTNZfib/v/LJ2Ow== X-Received: by 10.28.41.195 with SMTP id p186mr6663239wmp.41.1467552901537; Sun, 03 Jul 2016 06:35:01 -0700 (PDT) Received: from ernst.home (p578E3E65.dip0.t-ipconnect.de. [87.142.62.101]) by smtp.gmail.com with ESMTPSA id 66sm2764982wmg.23.2016.07.03.06.35.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2016 06:35:00 -0700 (PDT) Date: Sun, 3 Jul 2016 15:35:00 +0200 From: Gary Jennejohn To: Gary Palmer Cc: freebsd-usb@freebsd.org Subject: Re: USB and loader.conf hints Message-ID: <20160703153500.01b1c686@ernst.home> In-Reply-To: <20160703123506.GC70150@in-addr.com> References: <20160703014245.GB70150@in-addr.com> <20160703123506.GC70150@in-addr.com> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 13:35:04 -0000 On Sun, 3 Jul 2016 13:35:06 +0100 Gary Palmer wrote: > 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: vendor 0x8087> 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: Mobile Broadband Station ZTE,Incorporated> at usbus0, cfg=0 > md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > This won't help to solve your problem, but if I understand the above trace correctly the ZTE dongle is also presenting itself as containing mass storage. Seems like the long-term solution would be to add a quirk (if at all possible) to ignore the storage part. Looking at usb_quirk(4) this might help: UQ_MSC_ALT_IFACE_1 but I'm not certain. Anyway, take a look at the manpage, because it's possible to set a quirk in loader.conf. -- Gary Jennejohn