Re: [U-Boot] Problems around fatwrite command from uboot

Jean Louis wrote:
Many thanks for your great help, I change the code as you say by :
~line 659: if ((fat_val == 0xfffffff && mydata->fatsize == 32) || (fat_val == 0xffff && mydata->fatsize == 16)) break; ~line 904: if ((curclust >= 0xffffff8 && mydata->fatsize == 32) || (curclust >= 0xfff8 && mydata->fatsize == 16)) { empty_dentptr = dentptr; return NULL; }
I will do more tests with these changes.
Yes, that's what I had in mind. However there is also FAT12 but I think that is only used for floppy disks and nobody uses those anymore ?!? Please post your test results to the list!
Thank you
You're welcome ;)
Btw. I have also seen the missalignment warnings that Tom Rini just posted about but I don't know if it's just performance that suffers or if the missalignment may also cause corruption. Tom?
// Mats

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 02/21/2013 05:05 PM, Mats K¦rrman wrote:
Jean Louis wrote:
Many thanks for your great help, I change the code as you say by :
~line 659: if ((fat_val == 0xfffffff && mydata->fatsize == 32) ||
(fat_val == 0xffff && mydata->fatsize == 16))
break; ~line 904: if ((curclust >= 0xffffff8 && mydata->fatsize == 32)
|| (curclust >= 0xfff8 && mydata->fatsize == 16)) {
empty_dentptr = dentptr; return NULL; }
I will do more tests with these changes.
Yes, that's what I had in mind. However there is also FAT12 but I think that is only used for floppy disks and nobody uses those anymore ?!? Please post your test results to the list!
Thank you
You're welcome ;)
Btw. I have also seen the missalignment warnings that Tom Rini just posted about but I don't know if it's just performance that suffers or if the missalignment may also cause corruption. Tom?
The performance problems are due to using bounce buffers that (are intended) to avoid potential corruption.
- -- Tom

Hi Mats and Tom,
(sorry for precedent duplicate email)
I currently test with the correction.
I see that not help me to exit from the case I have described but I think that avoid or significantly reduce future problems with a sane card.
I use mainly FAT32 (not FAT12).
I think also that the corruption may arise from the fragmentation or cluster chaining because I have also see the problem of inconsistency when write of multiple files with a lot of append data, but it is still a supposition (no trace for the moment)
Thanks
---- 2013/2/21 Tom Rini trini@ti.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 02/21/2013 05:05 PM, Mats K¦rrman wrote:
Jean Louis wrote:
Many thanks for your great help, I change the code as you say by :
~line 659: if ((fat_val == 0xfffffff && mydata->fatsize == 32) ||
(fat_val == 0xffff && mydata->fatsize == 16))
break; ~line 904: if ((curclust >= 0xffffff8 && mydata->fatsize == 32)
|| (curclust >= 0xfff8 && mydata->fatsize == 16)) {
empty_dentptr = dentptr; return NULL; }
I will do more tests with these changes.
Yes, that's what I had in mind. However there is also FAT12 but I think that is only used for floppy disks and nobody uses those anymore ?!? Please post your test results to the list!
Thank you
You're welcome ;)
Btw. I have also seen the missalignment warnings that Tom Rini just posted about but I don't know if it's just performance that suffers or if the missalignment may also cause corruption. Tom?
The performance problems are due to using bounce buffers that (are intended) to avoid potential corruption.
Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRJpuuAAoJENk4IS6UOR1WSfYP/1RvLV9yj7TiCCSYmXluM2UU 81Z272nA5RsJTnZQkM7OfY62lizu7HTpX6yAbQB5o6m0pp2baCPhr8NO7+hlmmv+ N4hrTGpFTV77UFcTKCJmF3oobDhXpohmL9ytFyoaecaNvGw6H/VDT68NQMop+jrc rzvxvLEcaDuwa8/wa8WcMlvldvDARq/y264HkWROcyNsrxtZViIUmKqL5/Aqnavc nM+I2vFqqqhfq9gozetfKV/VP+qVek4f39mPookRhYn/7WVBWEuPQ7Gn6m3gontQ XirKxzi1NH+2OjzpQxncrZ68YMqudOpb9pROBDsAQyMHx+zy+bryCp5CxhyLGadb KjTeVULtOkL2+3uc3ZevWA1ox9Aa0ILosvManWYxmhBGMvCxC4AFVn2DqLelGwFc xDCIyh4V5ytCa+WSo1DiNuHt9o8MmTqBnEkCJQul2O+1uDm5pi4RL/rTCWJ7ftmR anOfd8j8zf/eR8durLh9BsUFFAgwhVNQIMJFp9HfjizH24LnoEwl+gLiO9CDZlgN ZDePo5IQr5V/4Ootm467nRG7kdSTGlimQe4Wrj3q1nDbxd01oj/jb9//30GMOO7H IJ0qO+FITamBQshnLn47nSZrAppBAwfQAnOowb5ssL6l+AqP8ewGR6pZURvrQqJE a+q0hQZ/Ypp//DQu/+ZH =rvZ7 -----END PGP SIGNATURE-----
participants (3)
-
Jean Louis
-
Mats Kärrman
-
Tom Rini