9
0
Fork 0

Fix FAT32 bug

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1829 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2009-05-27 21:44:20 +00:00
parent 9a1ec9abe6
commit ca68e12516
5 changed files with 28 additions and 19 deletions

View File

@ -738,4 +738,10 @@
calculation based on CSD settings, inappropriate timeouts, odd code that looks like
a bad search and replace. Also needs support for SDHC ver 2.x. New MMC/SD is
largely redesigned and probably non-functional in the first check-in.
* drivers/mmcsd: Changes verified on 4Gb Kingston SHDC card. Still having
issues with 2Gb SanDisk SDC card.
* fs/fat: With the 4Gb card, the first tests of FAT32 were (finally) performed.
Found a correct a problem that prevented use of FAT32: It was not updating
the sector cache before checking the FAT32 FSINFO sector.

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: May 26, 2009</p>
<p>Last Updated: May 27, 2009</p>
</td>
</tr>
</table>
@ -1428,6 +1428,11 @@ nuttx-0.4.7 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
calculation based on CSD settings, inappropriate timeouts, odd code that looks like
a bad search and replace. Also needs support for SDHC ver 2.x. New MMC/SD is
largely redesigned and probably non-functional in the first check-in.
* drivers/mmcsd: Changes verified on 4Gb Kingston SHDC card. Still having
issues with 2Gb SanDisk SDC card.
* fs/fat: With the 4Gb card, the first tests of FAT32 were (finally) performed.
Found a correct a problem that prevented use of FAT32: It was not updating
the sector cache before checking the FAT32 FSINFO sector.
pascal-0.1.3 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;

View File

@ -10,7 +10,7 @@ NuttX TODO List (Last updated April 12, 2009)
(12) Network (net/, netutils/)
(1) USB (drivers/usbdev)
(4) Libraries (lib/)
(6) File system/Generic drivers (fs/, drivers/)
(7) File system/Generic drivers (fs/, drivers/)
(2) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/)
(0) Documentation (Documentation/)
@ -289,11 +289,6 @@ o File system / Generic drivers (fs/, drivers/)
Priority: Low. I have mixed feelings about if NuttX should pay a
performance penalty for better data integrity.
Description: FAT: FAT32 is untested -- because I don't have any large
enough devices yet to support a FAT32 FS.
Status: Open
Priority: Medium
Description: The simple SPI based MMCS/SD driver in fs/mmcsd does not
yet handle multiple block transfers.
Status: Open

View File

@ -1575,7 +1575,6 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
result = mmcsd_sendcmd(slot, &g_cmd55, 0);
if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK)
{
SPI_SEND(spi, 0xff);
result = mmcsd_sendcmd(slot, &g_acmd41, 0);
if (result == MMCSD_SPIR1_OK)
{
@ -1586,7 +1585,6 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
else
{
fvdbg("%d. Send CMD1\n", i);
SPI_SEND(spi, 0xff);
result = mmcsd_sendcmd(slot, &g_cmd1, 0);
if (result == MMCSD_SPIR1_OK)
{

View File

@ -261,6 +261,10 @@ static inline int fat_path2dirname(const char **path, struct fat_dirinfo_s *diri
****************************************************************************/
static int fat_checkfsinfo(struct fat_mountpt_s *fs)
{
/* Make sure that the fsinfo sector is in the cache */
if (fat_fscacheread(fs, fs->fs_fsinfo) == OK)
{
/* Verify that this is, indeed, an FSINFO sector */
@ -272,6 +276,7 @@ static int fat_checkfsinfo(struct fat_mountpt_s *fs)
fs->fs_fsifreecount = FSI_GETNXTFREE(fs->fs_buffer);
return OK;
}
}
return -ENODEV;
}