summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-01-11 09:54:44 -0500
committerTom Rini <trini@konsulko.com>2019-01-11 10:15:42 -0500
commitd3035b856027cb9621a252aafc6316b3724d6294 (patch)
tree0b1d2df2096cbc6a9cc1f339bebd13b57fb0fea0 /fs
parentb6a6238f0455db4ad9f447a4424cb5f56e47cd60 (diff)
downloadu-boot-d3035b856027cb9621a252aafc6316b3724d6294.tar.gz
Revert "fs: fat: assign rootdir sector when accessing root directory"
This particular commit is causing a regression on stih410-b2260 and other platforms when reading from FAT16. Noting that I had rebased the original fix from Thomas onto then-current master, there is also question from Akashi-san if the change is still needed after other FAT fixes that have gone in. This reverts commit a68b0e11ea774492713a65d9fd5bb525fcaefff3. Reported-by: Patrice Chotard <patrice.chotard@st.com> Cc: AKASHI Takahiro <takahiro.akashi@linaro.org> Cc: Thomas RIENOESSL <thomas.rienoessl@bachmann.info> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fat/fat.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index ac8913e719..179bf4f3d8 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -736,10 +736,7 @@ static void *next_cluster(fat_itr *itr)
if (itr->last_cluster)
return NULL;
- if (itr->fsdata->fatsize != 32 && itr->is_root)
- sect = mydata->rootdir_sect;
- else
- sect = clust_to_sect(itr->fsdata, itr->next_clust);
+ sect = clust_to_sect(itr->fsdata, itr->next_clust);
debug("FAT read(sect=%d), clust_size=%d, DIRENTSPERBLOCK=%zd\n",
sect, itr->fsdata->clust_size, DIRENTSPERBLOCK);