Fix for 2Gb cards being detected as 1Gb
[SCSI2SD-V6.git] / src / firmware / sd.c
index a3c2c3bdc85b3e0a556f5598308b233e24b9118b..78a94fe86f789ff66bf5e146a6c7eacaccc368a0 100755 (executable)
@@ -113,7 +113,7 @@ static int sdDoInit()
                HAL_SD_GetCardInfo(&hsd, &cardInfo);\r
                memcpy(sdDev.csd, hsd.CSD, sizeof(sdDev.csd));\r
                memcpy(sdDev.cid, hsd.CID, sizeof(sdDev.cid));\r
-               sdDev.capacity = cardInfo.BlockNbr;\r
+               sdDev.capacity = cardInfo.LogBlockNbr;\r
                blockDev.state |= DISK_PRESENT | DISK_INITIALISED;\r
                result = 1;\r
 \r