It's amazing what kind of strange and broken USB devices there are. Here at
Linux Bangalore, they've got a bunch of 'combo USB WLAN and Flash Disk Sticks'
that turned out to be TwinMOS B241
devices. But let's forget about this for a moment and join me on my journey...
They ship with a Linux driver preinstalled onto the flash disk. Unfortunately
that driver consists of some hacked wlan-ng driver. For most people who've
worked with wlan-ng, they know that it's overly complex, and not really the standard Linux way of doing things.
That modified wlan-ng source code would only build for 2.4.x, the machines here are running Fedora Core 3.
Also, the machines would totally lock up their USB stack as soon as you would enable the WLAN part, even without any driver.
Since the wlan-ng was a modified prism2 USB driver, I though I could somehow merge the changes into the orinoco_usb driver that is in the standard kernel.
After some deeper look, it turned out that the device has no relation with
Intersil, and definitely doesn't have a Prism2 chip on the PCB, so my tries to get this working were useless.
Apparently, they didn't even do 'copy+paste', but they did 'edit and forget',
i.e. forget about prism2 devices and only support some totally different
chipset without actually changing file names or comments in the driver.
So I opened one of the devices and found a AU9254A21-CBS (4 port USB hub), a
K9F1G08UOM (the Flash memory for the USB drive), a IC1114-F48LQ (usb storage
controller for the flash), and some unknown chip labelled ZyDAS ARM. Also
there was a Cyprus semiconductor chip that I though of the EZ-USB controller
that connects the alleged prism2 to the USB bus. This fits the driver design,
since it has to download some 'bootup code' to the usb device before being able
to use it.
After some further analysis, the Cyprus CY62137CV30LL-70BVI turned out to be
some SRAM chip, and the ZyDAS ARM the real 802.11 MAC. And luckily, some
people are working on a very clean 2.6 style stand-alone driver.
And the driver even worked after just adding the USB device ID to it's list of known devices, at least on little endian platforms.
If the devices specs or documentation would have told us that it is a ZD1201,
the driver clearly indicated that it has no relation with prism2 or somebody
who wrote the driver actually had a clue how to do this, this would have saved me about four hours of time, at least.
Oh yes, and the usb stack lockup comes from violating the USB specification and
only supporting one particular flavour of USB bus enumeration. So nobody
actually ever tested it for USB spec compliance, even though there are
compliance tests available by the USB forum. *sigh*