]> git.baikalelectronics.ru Git - uboot.git/commitdiff
Revert "fs: fat: assign rootdir sector when accessing root directory"
authorTom Rini <trini@konsulko.com>
Fri, 11 Jan 2019 14:54:44 +0000 (09:54 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 11 Jan 2019 15:15:42 +0000 (10:15 -0500)
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 362c0d27776a5adcfe1208db2b08fbe2c834d930.

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>
fs/fat/fat.c

index ac8913e71929b1a847d09fdc1d69552f72afc962..179bf4f3d89de7d0c7bfc3e500224b7245fcacdb 100644 (file)
@@ -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);