forked from len0rd/rockbox
Simplify & fix the MMC driver. After more than 3 years I found that the MMC specs were a bit misleading, and the 'large' MMC which state a block size of 1024 or 2048 bytes and no partial read and/or partial write capability are happily accepting a block size of 512 bytes. So go KISS and remove all the variable/partial block handling code. This fixes the driver for the Transcend 4GB MMCplus, which doesn't cope when we actually set the 2048 byte block size it states. It also makes write operations involving small blocks faster and more reliable. * Note: The 4GB Transcend still doesn't work when plugged at boot, but works when hotplugged.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18515 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d4404d3de0
commit
b1a584a1b6
5 changed files with 130 additions and 292 deletions
|
|
@ -627,7 +627,7 @@ static void handle_scsi(struct command_block_wrapper* cbw)
|
|||
unsigned int block_size_mult = 1;
|
||||
#if defined(HAVE_ATA_SD) || defined(HAVE_HOTSWAP)
|
||||
tCardInfo* cinfo = card_get_info(lun);
|
||||
if(cinfo->initialized==1 && cinfo->numblocks > 0) {
|
||||
if(cinfo->initialized && cinfo->numblocks > 0) {
|
||||
block_size = cinfo->blocksize;
|
||||
block_count = cinfo->numblocks;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue