<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/fat/fat_write.c, branch v2016.09</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>Fix spelling of "supported/unsupported".</title>
<updated>2016-03-22T16:16:14+00:00</updated>
<author>
<name>Vagrant Cascadian</name>
<email>vagrant@debian.org</email>
</author>
<published>2016-03-15T19:11:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0af49b9575476587d7c0cfd79ba29a21aa50bc05'/>
<id>0af49b9575476587d7c0cfd79ba29a21aa50bc05</id>
<content type='text'>
Signed-off-by: Vagrant Cascadian &lt;vagrant@debian.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Peter Griffin &lt;peter.griffin@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Vagrant Cascadian &lt;vagrant@debian.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Peter Griffin &lt;peter.griffin@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: block: Adjust device calls to go through helpers function</title>
<updated>2016-03-14T21:34:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-02-29T22:25:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2a981dc2c62c500110aad297fa70503aec36e689'/>
<id>2a981dc2c62c500110aad297fa70503aec36e689</id>
<content type='text'>
To ease conversion to driver model, add helper functions which deal with
calling each block device method. With driver model we can reimplement these
functions with the same arguments.

Use inline functions to avoid increasing code size on some boards.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To ease conversion to driver model, add helper functions which deal with
calling each block device method. With driver model we can reimplement these
functions with the same arguments.

Use inline functions to avoid increasing code size on some boards.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: pass block dev not num to read/write/erase()</title>
<updated>2016-01-14T02:05:18+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-12-07T18:38:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86'/>
<id>7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86</id>
<content type='text'>
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat/fat_write: Fix management of empty files</title>
<updated>2015-10-11T21:12:08+00:00</updated>
<author>
<name>Benoît Thébaudeau</name>
<email>benoit@wsystem.com</email>
</author>
<published>2015-09-28T13:45:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1254b44a9f31c78ce7325eb392eaa949a2c7fc9a'/>
<id>1254b44a9f31c78ce7325eb392eaa949a2c7fc9a</id>
<content type='text'>
Overwriting an empty file not created by U-Boot did not work, and it
could even corrupt the FAT. Moreover, creating empty files or emptying
existing files allocated a cluster, which is not standard.

Fix this by always keeping empty files clusterless as specified by
Microsoft (the start cluster must be set to 0 in the directory entry in
that case), and by supporting overwriting such files.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Overwriting an empty file not created by U-Boot did not work, and it
could even corrupt the FAT. Moreover, creating empty files or emptying
existing files allocated a cluster, which is not standard.

Fix this by always keeping empty files clusterless as specified by
Microsoft (the start cluster must be set to 0 in the directory entry in
that case), and by supporting overwriting such files.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat/fat_write: Factor out duplicate code</title>
<updated>2015-10-11T21:12:08+00:00</updated>
<author>
<name>Benoît Thébaudeau</name>
<email>benoit@wsystem.com</email>
</author>
<published>2015-09-28T13:45:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e876be4b5ccb661d68b5b83330e134ace339316c'/>
<id>e876be4b5ccb661d68b5b83330e134ace339316c</id>
<content type='text'>
Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat/fat_write: Fix curclust/newclust mix-up</title>
<updated>2015-10-11T21:12:07+00:00</updated>
<author>
<name>Benoît Thébaudeau</name>
<email>benoit@wsystem.com</email>
</author>
<published>2015-09-28T13:45:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5e1a860e6cd6d42d9ae16c9d9abbde46514da46d'/>
<id>5e1a860e6cd6d42d9ae16c9d9abbde46514da46d</id>
<content type='text'>
curclust was used instead of newclust in the debug() calls and in one
CHECK_CLUST() call, which could skip a failure case.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
curclust was used instead of newclust in the debug() calls and in one
CHECK_CLUST() call, which could skip a failure case.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat/fat_write: Merge calls to set_cluster()</title>
<updated>2015-10-11T21:12:07+00:00</updated>
<author>
<name>Benoît Thébaudeau</name>
<email>benoit@wsystem.com</email>
</author>
<published>2015-09-28T13:45:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1d7f2ece69c9d80264321bc4ee07f57eec392538'/>
<id>1d7f2ece69c9d80264321bc4ee07f57eec392538</id>
<content type='text'>
set_contents() had uselessly split calls to set_cluster(). Merge these
calls, which removes some cases of set_cluster() being called with a
size of zero.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
set_contents() had uselessly split calls to set_cluster(). Merge these
calls, which removes some cases of set_cluster() being called with a
size of zero.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat/fat_write: Fix buffer alignments</title>
<updated>2015-10-11T21:12:07+00:00</updated>
<author>
<name>Benoît Thébaudeau</name>
<email>benoit@wsystem.com</email>
</author>
<published>2015-09-28T13:45:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8133f43d1cd4f0df0a6b4c2aa99a47753fda20d6'/>
<id>8133f43d1cd4f0df0a6b4c2aa99a47753fda20d6</id>
<content type='text'>
set_cluster() was using a temporary buffer without enforcing its
alignment for DMA and cache. Moreover, it did not check the alignment of
the passed buffer, which can come directly from applicative code or from
the user.

This could cause random data corruption, which has been observed on
i.MX25 writing to an SD card.

Fix this by only passing ARCH_DMA_MINALIGN-aligned buffers to
disk_write(), which requires the introduction of a buffer bouncing
mechanism for the misaligned buffers passed to set_cluster().

By the way, improve the handling of the corresponding return values from
disk_write():
 - print them with debug() in case of error,
 - consider that there is an error is disk_write() returns a smaller
   block count than the requested one, not only if its return value is
   negative.

After this change, set_cluster() and get_cluster() are almost
symmetrical.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
set_cluster() was using a temporary buffer without enforcing its
alignment for DMA and cache. Moreover, it did not check the alignment of
the passed buffer, which can come directly from applicative code or from
the user.

This could cause random data corruption, which has been observed on
i.MX25 writing to an SD card.

Fix this by only passing ARCH_DMA_MINALIGN-aligned buffers to
disk_write(), which requires the introduction of a buffer bouncing
mechanism for the misaligned buffers passed to set_cluster().

By the way, improve the handling of the corresponding return values from
disk_write():
 - print them with debug() in case of error,
 - consider that there is an error is disk_write() returns a smaller
   block count than the requested one, not only if its return value is
   negative.

After this change, set_cluster() and get_cluster() are almost
symmetrical.

Signed-off-by: Benoît Thébaudeau &lt;benoit@wsystem.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FIX: fat: Provide correct return code from disk_{read|write} to upper layers</title>
<updated>2015-09-11T21:15:21+00:00</updated>
<author>
<name>Łukasz Majewski</name>
<email>l.majewski@samsung.com</email>
</author>
<published>2015-09-03T12:21:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0a04ed86cfaa36d93d55016d0b3dc3f06352a2fe'/>
<id>0a04ed86cfaa36d93d55016d0b3dc3f06352a2fe</id>
<content type='text'>
It is very common that FAT code is using following pattern:
if (disk_{read|write}() &lt; 0)
        return -1;

Up till now the above code was dead, since disk_{read|write) could only
return value &gt;= 0.
As a result some errors from medium layer (i.e. eMMC/SD) were not caught.

The above behavior was caused by block_{read|write|erase} declared at
struct block_dev_desc (@part.h). It returns unsigned long, where 0
indicates error and &gt; 0 indicates that medium operation was correct.

This patch as error regards 0 returned from block_{read|write|erase}
when nr_blocks is grater than zero. Read/Write operation with nr_blocks=0
should return 0 and hence is not considered as an error.

Signed-off-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;

Test HW: Odroid XU3 - Exynos 5433
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is very common that FAT code is using following pattern:
if (disk_{read|write}() &lt; 0)
        return -1;

Up till now the above code was dead, since disk_{read|write) could only
return value &gt;= 0.
As a result some errors from medium layer (i.e. eMMC/SD) were not caught.

The above behavior was caused by block_{read|write|erase} declared at
struct block_dev_desc (@part.h). It returns unsigned long, where 0
indicates error and &gt; 0 indicates that medium operation was correct.

This patch as error regards 0 returned from block_{read|write|erase}
when nr_blocks is grater than zero. Read/Write operation with nr_blocks=0
should return 0 and hence is not considered as an error.

Signed-off-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;

Test HW: Odroid XU3 - Exynos 5433
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ext4/ext4fs.c, fs/fs.c fs/fat/fat_write.c: Adjust 64bit math methods</title>
<updated>2014-12-01T20:21:57+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@ti.com</email>
</author>
<published>2014-11-24T16:50:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf'/>
<id>9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf</id>
<content type='text'>
The changes to introduce loff_t into filesize means that we need to do
64bit math on 32bit platforms.  Make sure we use the right wrappers for
these operations.

Cc: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Cc: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
Tested-by: Pierre Aubert &lt;p.aubert@staubli.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The changes to introduce loff_t into filesize means that we need to do
64bit math on 32bit platforms.  Make sure we use the right wrappers for
these operations.

Cc: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Cc: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
Tested-by: Pierre Aubert &lt;p.aubert@staubli.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
