diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-09-14 20:33:24 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-09-14 20:33:24 +0000 |
commit | b1a584a1b6fbc3d16d7dbbd8f2fac857a1332f60 (patch) | |
tree | 6e5e2a7d70563af7161804948dea2d004b2fc229 /firmware/usbstack/usb_storage.c | |
parent | d4404d3de0a99b69720b25ba730af197ea7d6c0b (diff) |
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
Diffstat (limited to 'firmware/usbstack/usb_storage.c')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 17b8bb7168..f774d14cbc 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -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; } |