Post by Tim RobertsPost by Xiaofan ChenPost by Tim RobertsA kernel driver is almost never required for USB devices on Linux these
days.
Wow, now that is very brave prediction. If you subscribe to the Linux-usb
mailing list and you will know the above can not be correct.
I stand by my statement. There are many devices that HAVE custom kernel
drivers, but that's out of inertia and tradition, not because they were
REQUIRED. The default Linux USB driver is quite good, and is
sufficient
for most purposes. Despite being a Microsoft cheerleader, I far prefer
writing code for the default Linux USB driver over writing code for WinUSB.
Now, there are certainly good reasons to go kernel. If you need to
share a device between multiple applications, a kernel driver is often a
better solution than a complicated user-mode sharing solution. And
actually, I can't think of any other reasons right now.
For another platform data point, the Sun Ray thin client USB drivers
are all
userspace drivers on both Solaris and Linux - we do mass storage,
serial,
parallel, smart card, and a few others in userspace. This tends to
make the
"kernel-only" crowd's heads explode, but oh well.
We use a few kernel loopback drivers for things like file system
mounting
and for legacy apps that absolutely need to have a block or character
device
to talk to, but these are not USB kernel drivers, they are basically
pseudo
drivers that talk to our userspace device server on one end and to the
consuming application (such as tip, the spooler, etc...) on the other.
Our USB controller is on the end of a network connection and we pass USB
packets over the network between the server and the Sun Ray. We don't
actually provide the notion of an OHCI or EHCI node on the server OS.
mike