Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2014 05:42:51 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Jesus Monroy <jessemonroy650@yahoo.com>,  "freebsd-usb@FreeBSD.org" <freebsd-usb@FreeBSD.org>, Alfred Perlstein <alfred@freebsd.org>
Subject:   Re: Question on ue devices autoconfigure versus Linux.
Message-ID:  <54794ECB.2080401@selasky.org>
In-Reply-To: <1417223131.59789.YahooMailBasic@web140503.mail.bf1.yahoo.com>
References:  <1417223131.59789.YahooMailBasic@web140503.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54794ECB.2080401>