From: Sancho Dauskardt <[EMAIL PROTECTED]>

    > > Forget datafab.c for this, as the protocoll is a little different.
    >
    >Hm. I used datafab.c successfully for the CF side.
    >What precisely is different?

    It's a while ago, but if I remember correctly, the ACOMdATA (actually 
    OnSpec Inc.) chip
    has two short bulk data packets waiting to be read after a read/write, and 
    datafab.c only requested one,
    which got the device quite confused after some time - and especially so 
    after media change.
    Also datafab.c is useless for lun != 0 (for the ACOMdATA drive that is).

    Note: reseting the ACOMdATA via the usb hub  (usb_reset_device()) only work 
    for the CF/SM part, but not for the MS/SD.
    Check older postings about other quirks.

Last Tuesday ("Queens Birthday" - a holiday in Holland)
I did the reading part, and this evening the writing part
for this animal. I see that you also did reading, more or
less in the same way, but you did not have writing code?

Let me document the present state of knowledge.

/*
 * Commands: 8 bytes
 * Five commands are known:
 *
 * Identify:      0 0 0 0 0 b0 0 80
 *
 * Read DeviceID: 0 0 0 0 0 b0 0 84
 *
 * Read:          0 P P P 0 b0 N 85
 * here N is the number of 256-byte chunks,
 * the high order bits of PPP are the PBA, the low order bits
 * the sector within an erase block.
 *
 * Write:         L1 P P P eN b0 L2 86
 * here e is the bit "no evacuation needed" (bit 6), and
 * N is the number of 512-byte sectors (bits 5-0),
 * and PPP is as for Read, and L1,L2 are the low and high order
 * parts of LBA.
 *
 * The write is not done at the indicated address, but elsewhere,
 * and after the 2-byte OK status, four more bytes are returned
 * to indicate where. The address PPP is big-endian, the returned
 * address little-endian.
 *
 * Read map:      0 0 0 0 0 b0 L 8a
 * here L is the number of 256-byte chunks.
 * The map in 2 bytes (little endian) per block.
 *
 * (The CF part uses Identify: 00 01 00 00 00 a0 ec 01.)
 */

(more details in the code).

I changed quite a lot in the usb-storage directory, mostly
to avoid code duplication. If anyone is interested, the current
version lives on ftp.XX.kernel.org in kernel/people/aeb/usb-storage*wip

Unfortunately I cannot finish this second driver this evening, since
I destroyed my SmartMedia card. Wrote something bad to it, and this
reader doesnt want to look at it anymore.

Andries

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to