[Gllug] USB drivers - was Re: Smart Media

Matt Amos matt.amos at ic.ac.uk
Wed Jun 12 14:59:54 UTC 2002


On Tue, Jun 11, 2002 at 02:30:03PM -0400, SteveC wrote:
> * Adrian McMenamin (adrian at mcmen.demon.co.uk) wrote:
> > >Adrian McMenamin wrote:
> > On Tuesday 11 Jun 2002 8:06 am, tet at accucard.com wrote:
> > > >Has anybody got Smart Media readers to work? I am using Red Hat 7.3
> > > >(2.4.18-3), with a DataFab CF+SM reader (badged PC Line).

i wrote drivers for my compact flash reader usb, but its Carry, badged as 
memory gold. send me your /proc/bus/usb/devices and i'll tell you if its 
the same thing. mine has vendor code 0x07cc product id 0x000d rev. 0.01

> > I am almost tempted to think about looking at the USB code to see if it is 
> > worth attempting to hack the driver up. I have written Linux drivers before, 
> > but not USB and I have read that USB code is very complex.
> > 
> > Anybody care to comment?

> matt [cc:] was working on this, he has userspace drivers written IIRC

my user space drivers (using libusb) are capable of reading the entire (or 
part) of the flash to/from disk. then i use a loopback device to read the 
filesystem (fat12). it would be much nicer, and save on flash writes, to 
move this into the kernel so it could be accessed as a normal bloack 
device. this is what i got stuck on and shelved the project for ages.

usb code isnt exactly complex, but it is poorly documented. its not 
exactly clear what you have to allocate yourself and free yourself and 
what has to be freed/allocated from returned functions. i managed to crash 
my system more than a few times by freeing something i wasnt supposed to.

if you feel like taking it on (and youve got the same hardware) i'll send 
you a copy of the userspace code i have, it could help.

cya,

matt


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list