From b1a584a1b6fbc3d16d7dbbd8f2fac857a1332f60 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 14 Sep 2008 20:33:24 +0000 Subject: 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 --- firmware/usbstack/usb_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/usbstack') diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 17b8bb7..f774d14 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; } -- cgit v1.1