So, I've been thinking about my sdcard block driver (which, btw, I've now gotten to successfully mount a read-only media), and struggling with the code for libsmedia (Gnome integration, etc.), fdisk, etc.
I'm gradually coming to the conclusion that I've been going about this all wrong, but I'm interested to hear other ideas. Right now, I have my own driver, which will not readily be reusable, for SDcard (and also MMC card) media. I can certainly make this work, as my initial code has demonstrated. But I'm wondering if I should take a different approach and produce a SCSA HBA emulation instead. Then I could leverage the SCSA framework, and userland applications would not be able to easily tell the difference between an SDcard inserted in a USB reader or one inserted into an SDHCI reader. The problem is that natively, SDcard is *not* SCSI, so I'd have to emulate support for basic SCSI commands: read, write, inquiry, mode sense, and possibly a couple of others. (This is unlikely the 1394 and USB layers, which basically encapsulate SCSI.) So the approach I'm thinking of is basically creating a "simple" framework for raw LBA style access -> SCSI translation. Then I could reuse this layer for other kinds of devices besides SDcard, such as memstick, raw NAND flash devices (if they ever show up in computer systems), etc. I've very little experience with SCSI and SCSA, so this would be a new direction for me. But I think at the end of the day, that it might be the better approach. But I'm interested to hear counter arguments, and if folks experienced with either can point out any flaws in my thinking, I'd be grateful to hear them. -- Garrett _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss