From: Kari N. <ka...@gm...> - 2007-07-18 08:40:53
|
Hi, I had some problems with 128MB SD memory card ----------------clip from log-------------- [ 443.115173] +SDIO Memory Function: CreateDisk [ 443.119995] SDIO Memory Function: block size 512 [ 443.124847 ] SDIO Memory Function: setting block size 512 [ 443.130615] SDIO Memory Function: setting up DMA [ 443.135681] SDIO Memory Function: CreateDisk: size 245760 (Size 123008, FileSysBlockSize 512) ... and later... [ 445.515045] -SDIO Memory Function: AsyncCompletionLast [ 445.521118] p1 [ 445.522979] sdmem0: p1 exceeds device capacity ----------------clip from log-------------- Now looking at code on sdio_memory_os.c: set_capacity(pInstance->Config.pGenDisk,pInstance->Size/pInstance- >FileSysBlockSize*1024); This causes rounding errors and disk size 245760 after changing code to set_capacity(pInstance->Config.pGenDisk , (pInstance->Size* 1024)/pInstance->FileSysBlockSize); The 128 MB card is functional (card has only one partition) and /sys/block/sdmem0/sdmem0p1# more size -> 245919 sectors which is bigger than originally calculated (245760) So is this bug on driver or is there some reason way calculation was originally done way it was? BR, Kari |