Linux support for USBAT02 storage devices

A couple of nights ago I (finally) submitted a driver that I’ve been developing on-and-off over the last 8 months.

I got interested when a Gentoo user on the forums created a thread, detailing the problem that he couldn’t use his compact flash reader. I gathered some info and did a bit of Googling: He owned a non-standard device unsupported by Linux.

I found a website on SourceForge, a project where previously, a Linux 2.4 driver had been developed. This was incomplete, but apparently worked for those users.

I did a quick port of their patch to 2.6 (maybe my first piece of “real” kernel hacking..), and after a bit more discussion on the forums, it was working!

A month or so later, I decided to return to this, with the aim of developing the driver into the quality such that it could be submitted for inclusion in the Linux kernel.

I introduced myself on their mailing list. The maintainer of the website fed me some information: he told me where I can get the manufacturers tech documents about the device, and he also persuaded some other people who had contacted him privately abou 2.6 support to join the mailing list and aid development of a 2.6 driver. It turns out that the original developer (Thomas Kreiling) who performed the amazing task of writing a partial driver without the specs, is not active.

Here begins the slow process of slowly developing the work I had already done, solving a few problems and cleaning up the code, using the knowledge I had gained out of interpreting the device specs. Without actually owning the device, development was quite slow.

After a few months of sporadic development, I eventually bought one of these devices from ebay, which allowed me to make a release which pretty much solved all problems, and added features such as the ability to hotswap media. After releasing this, and solving new problems experienced by my 10-or-so testers, I was able to finalize a release and send some final patches to the Linux USB developers.

The code is now pending review, but will hopefully be included in Linux 2.6.12. It adds support for eleven old, but fairly common, compactflash readers.

It’s been an amazing experience. Starting with almost zero kernel experience, I now have a fairly sound knowledge of USB, ATA, and SCSI, plus the relevant Linux-specifics. It’s also made me realise just how well the “open development” model works : the testers on the mailing list were always cooperative and enthusiastic about the development, and very fast to test new releases, even though they were not interested in coding themselves and at the end of the day just wanted to be able to use their hardware. This support was very encouraging and motivated me to see it through to the end.

For anyone interested, the project page can be found here: http://usbat2.sourceforge.net/

I have uploaded the final patches (against 2.6.10) here:
usbat_01_unification.patch
usbat_02_usbat02.patch
usbat_03_flash.patch

One Response to “Linux support for USBAT02 storage devices”

  1. Marcos Says:

    Amazing work, dsd. What you did is great. With efforts like yours using Linux becomes more enjoyable for more people every day.

Leave a Reply

You must be logged in to post a comment.