I'm currently waiting for an O.K. on publishing the Carry-specific bits.
But until I (hopefully) get that, I'll publish the ssfdc_info.c &.h

Since I'm new to Linux-USB, where should I send the source to (~20K) ?

>I've been trying to work on write-access, hoping to have it done by the 
>end of the weekend, but I ran into a problem with writes stalling. I'll 
>keep trying, though.
>
>Do the other media (MemoryStick, etc) use SSFDC format, in that there is a 
>data area and a redundancy or control area?
AFAIK No.
Anyone know how do real SCSI SSFDC Readers work ? Are they 'intelligent' ?


>>* does sddr09.c work with 1&2 MB Cards ?
>>   These cards would show up as 256bytes/sector devices to the scsi layer ?
>>   From all specs/docs I've seen, one should really hide this detail from 
>> other layers ?
>
>The driver *should* work with those cards, although I haven't tested them 
>since I don't have those cards. The driver is set up to report 256 
>bytes/sector for those cards.
>
>Something in the driver would definitely need to know about the number of 
>bytes per sector, because otherwise the driver wouldn't know how to 
>translate sectors to blocks and bytes.

The driver does: pageshit. Well it's also in the new geomerty definition.


>For sure, lba->pba is important for read access, but not for write access. 
>For write access pba->lba shouldn't be necessary -- all you would need is 
>to know whether a pba is allocated or not. So I think we don't need 
>pba->lba at all.
And if it's Bad/Damaged. O.K. i'll change this.

struct ssfdc_info is fair enough.

>>                 // Functions to read/write/copy complete 256+8/512+16 
>> sectors (data+redundancy)
>>                 //
>>         int     (*read_raw_sector_func)(ssfdc_abstract_manager *mgr,int 
>> block,int page,char *data,int size);
>>         int     (*write_raw_sector_func)(ssfdc_abstract_manager *mgr,int 
>> block,int page,char *data,int size);
>
>This might be inefficient... on the SmartMedia, when you want to write 
>sectors, you would read the entire block (up to 32 sectors) with control 
>information, update the block, and write it back in a different place. So 
>in the driver I don't have a "write one sector" function, but rather an 
>entire "write data" function, since you never really need to write just 
>one raw sector -- you always end up writing a whole block.

Size is ment to be bytes --> O.K. to write multiple pages in one shot. I'll 
add comments.
Doesn't the SDDR have a copy command ?



>>         int     (*copy_raw_sector_func)(ssfdc_abstract_manager *mgr,int 
>> sourceblock,int sourcepage,int destblock);
>>                 // Erase a block after it's been copied somewhere else..
>>                 //
>>         int     (*erase_block_func)(ssfdc_abstract_manager *mgr,int block);
>
>I'm not sure about these. Although the SDDR09 SmartMedia reader has an 
>independent erase function, its write function does a simultaneous erase. 
>So I would say that the write function does what these do anyway. I don't 
>know about the other media.
How does that work ??

If I've got it all right, for writing a single page, we need to:

* Find a free "block"
* Copy all other pages+unchanged redundancy to that block
* Write out new page+redundancy to the new block
* Erase the old block

BTW: what happend if  we loose contact to the device between write & erase ?
Then we have two PBA mapped to one LBA, right ?

>I think you'll want a read_data_and_redundancy_func, since the SCM write 
>command requires the data in data+redundancy form.

As above: read_raw should do just that.



sda


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to