USB and loader.conf hints
Gary Jennejohn
gljennjohn at gmail.com
Sun Jul 3 13:35:04 UTC 2016
On Sun, 3 Jul 2016 13:35:06 +0100
Gary Palmer <gpalmer at freebsd.org> 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: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST
> spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.2: <product 0x07db
> vendor 0x8087> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps)
> pwr=SAVE (0mA) ugen0.3: <Ultra Fast Media Generic> at usbus0,
> cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (96mA) ugen0.4: <ZTE
> 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
More information about the freebsd-usb
mailing list