Question on ue devices autoconfigure versus Linux.
Hans Petter Selasky
hps at selasky.org
Sat Nov 29 04:42:30 UTC 2014
On 11/29/14 02:05, Jesus Monroy via freebsd-usb wrote:
> Alfred,
> I usually don't get the USB mailing list in my inbox. However,
> for some reason I fished this out of spam. Indicating to me
> I should answer this.
>
> THE ANSWER:
>
> Hot swapping has never been a strong point for BSD.
> Basically they think, "hot swapping" means, flip a
> mechanical switch, remove the device. They DON'T
> think like a USB device; which is "plug in and pull"
> - at will.
>
> In the Linux world, there is an army of people that
> attack problems like this 'ad hoc'. The BSD
> community is far too formal to get it done in
> any reasonable time frame.
>
> In the Linux world, there are a host of "post-boot"
> solutions, such as systemd, busd, etc. They all
> generally trap an event, be it real (such as an IRQ),
> network, program, or user. This is usually
> leverage by /proc, dmesg or similar.
>
> Hope this helps.
> FWIW: I'm living in El Paso Texas for the next 6 months.
>
> Best of Luck,
> Jesse
Hello!
The FreeBSD USB kernel side stack does not know during boot if a driver
will be loaded by devd for the given configuration or not. So it doesn't
switch it to see if a driver attaches! There are already a couple of
checks to switch to non-default configurations, and possibly these can
be extended.
What you want to do is to add a quirk for your device to
sys/dev/usb/quirk/usb_quirk.c named "UQ_CFG_INDEX_1". Maybe Linux has
this quirk already, I don't know.
There exist a couple of USB protocols defined by USB.org, which everyone
can use free of royalty, like CDC-ethernet and NCM. Because some big IT
vendors out there don't support these protocols out of the box, they are
sometimes considered as secondary USB protocols, and left in the
non-default configuration. Instead the device manufacturers implement
MS's RNDIS as the first choice typically.
Can you send a complete dump of your device's configuration descriptors:
usbconfig -d X.Y dump_device_desc dump_all_config_desc
And also check that your "/etc/devd/usb.conf" is up to date!
--HPS
More information about the freebsd-usb
mailing list