Aha - I recalled that I had a writeCIS command, but see
that it is not in the current kernel. Should update that driver.
The comment gives the important information:
/*
* Write CIS Command: 12 bytes.
* byte 0: opcode: EE
* bytes 2-5: write address in shorts
* bytes 10-11: sector count
*
* This writes at the indicated address. Don't know how it differs
* from E9. Maybe it does not erase? However, it will also write to
* the CIS.
*
* When two such commands on the same page follow each other directly,
* the second one is not done.
*/
static int
sddr09_writeCIS(struct us_data *us, int nr_of_pages, unsigned char *buf) {
struct sm_card_info *info = us->extra;
unsigned char command[12] = {
0xee, LUNBITS, 0, 0, 0x20, 0, 0, 0, 0, 0, 0, 0x01
};
unsigned char ecc[3];
unsigned char *bptr, *cptr;
int pagelen, bulklen, result, i;
command[4] = (1 << info->blockshift);
command[11] = nr_of_pages;
result = sddr09_send_scsi_command(us, command, sizeof(command));
...
etc. I deleted the rest, the details in the present kernel are
a bit different, but this command is what one needs.
Andries
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel