The unusual_devs.h Guide

I currently maintain the unusual_devs.h file which is part of the usb-storage driver in the linux kernel. I hope to do more kernel development in the future, but this was a healthy start.

This document was written with corrections and input from Alan Stern and Matthew Dharm. Thanks!

unusual_devs.h is where we list all hardware that is a USB Storage device but somehow needs special attention. This could be because it doesn't claim it's a USB Storage device, it could be because it incorrectly impliments the spec, or because it otherwise has special needs.

Contents

How The Entry Looks

A given entry looks like this:
UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
               vendorName, productName,useProtocol, useTransport, \
               initFunction, flags) \
And those fields are:

Protocols aren't protocols... wait, what?

You will note that the entry refers to a "protocol" and a "transport"... but the spec refers to a "SubClass" and a "Protocol".

Intuitively one might match up "protocol" with "protocol," but that would be incorrect.

What the USB spec calls a SubClass is actually defining a language the device uses - what any programmer would refer to as a "protocol." What the USB spec calls a Protocol is actually the way messages are packed for transmission - what any programmer would refer to as a "transport."

In other words, spec's SubClass is our Protocol and the spec's Protocol is our Transport.

So if your kernel tells you there is an unneeded SubClass, you need to check the "protocol" field, but if it tells you there is an unneeded Protocol, you need to check the "transport" field. Confusing, I know.


Submitting a Patch

Anyone may submit a patch, but should make sure to keep in mind the following:

Last Updated: 01/23/07

Copyright © Phil Dibowitz 2004-2008