Why USB must be so hard to use ?

From: Luigi Rizzo <rizzo_at_icir.org>
Date: Fri, 21 Sep 2007 10:38:29 -0700
i recently tried to attach one of the Openbeacon USB devices

	http://wiki.openbeacon.org/wiki/OpenBeacon_USB

to a -stable box, and "of course" attach failed, even though the
same thing is claimed to work right away on Linux and XP without
any special driver.

It wasn't too hard to convince umodem.c to attach to the device,
but i had to put the <vendor,product> ids in the list of devices
explicitly recognised, and further disable the extra check for
capabilities at the end of umodem.c::USB_MATCH (or umodem_match in
-current).  The device itself returns a class UICLASS_CDC, but
subclass and protocol are 0, i.e. this is a very basic serial device
as probably many gadget we are going to see in the future.

<rant>

Now i wonder: why dealing with usb peripherals in FreeBSD must be
so hard, and nothing works out of the box ? In many cases it
is really because we are too strict in making checks, or because
our system to embed device IDs in the driver is unaccessible to
the average user/sysadmin.

Can we try to relax a bit the checks in the code (inherited
from some other BSD) that probes peripherals so it is more
tolerant to small differences in the features of peripherals,
and provides an easier way to tweak device tables ?

</rant>

Over the last year, once i have gathered a bit more familiarity
with the USB code, i managed to make a number of peripherals
(cameras, scanners, various usb memory or mp3 players) work
on FreeBSD and in several cases it was just a matter of a
few lines of code. Hopefully, my patches are going in the tree in
some way (linux_kmod_compat) or another (patches waiting to
be committed), but the process is slow because, I suppose, all of
us are still a bit nervous about relaxing checks in the code.

I understand being careful, but if we keep being so strict in what
our driver accept (and sometimes i wonder if they ever worked on
more than a single specific device!) FreeBSD will get a reputation
for having an unusable USB subsystem, and this drives away
many workstation users.

	cheers
	luigi
Received on Fri Sep 21 2007 - 15:39:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC