<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/lib, branch v1.5.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v1.5.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v1.5.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2013-10-22T23:19:23+00:00</updated>
<entry>
<title>check the MLC nand type</title>
<updated>2013-10-22T23:19:23+00:00</updated>
<author>
<name>Huang Shijie</name>
<email>b32955@freescale.com</email>
</author>
<published>2013-08-20T05:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=263e138719f6358c3cf2ce47d6254cebef31dd4b'/>
<id>urn:sha1:263e138719f6358c3cf2ce47d6254cebef31dd4b</id>
<content type='text'>
In the current code, the MTD_NANDFLASH stands for both the SLC and MLC.

In the kernel, the MTD_NANDFLASH only stands for the SLC now,
so in order to keep the logic unchanged, we should also check the MLC
NAND by MTD_MLCNANDFLASH.

Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>add the MTD_MLCNANDFLASH case</title>
<updated>2013-10-22T23:17:52+00:00</updated>
<author>
<name>Huang Shijie</name>
<email>b32955@freescale.com</email>
</author>
<published>2013-08-20T05:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=2e4fe96b2bc5ad33793d0d5cbeb23c9f76155211'/>
<id>urn:sha1:2e4fe96b2bc5ad33793d0d5cbeb23c9f76155211</id>
<content type='text'>
The MTD_MLCNANDFLASH case is missed in the current code.
This patch adds it.

Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>consistency between u_int32_t / off_t / off64_t</title>
<updated>2012-09-25T15:06:50+00:00</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-09-12T14:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f3f3a208048eac5f8b5752a17ebcd44db9230fd8'/>
<id>urn:sha1:f3f3a208048eac5f8b5752a17ebcd44db9230fd8</id>
<content type='text'>
We should use the off_t type instead of off64_t or u_int32_t as its
length is controlled by the WITHOUT_LARGEFILE flag.

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd_legacy: don't open device in R/W</title>
<updated>2012-02-29T07:19:17+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-08T21:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ac10be41ad321752682f2549ebc42b2512012f60'/>
<id>urn:sha1:ac10be41ad321752682f2549ebc42b2512012f60</id>
<content type='text'>
On legacy kernels with ROM devices, we can get mtdinfo errors like:

libmtd: error!: cannot open "/dev/mtd4"
        error 13 (Permission denied)
mtdinfo: error!: libmtd failed get MTD device 4 information
         error 13 (Permission denied)

We don't need O_RDRW access for informational ioctls(), so make this
O_RDONLY.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: perform device checking first</title>
<updated>2012-02-29T07:19:17+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-08T21:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c3e2250260f9ab7846cea5ae974ddb7379a8fef6'/>
<id>urn:sha1:c3e2250260f9ab7846cea5ae974ddb7379a8fef6</id>
<content type='text'>
If we don't check for the MTD before calling `legacy_get_dev_info1', we may
get errors like:

libmtd: MTD subsystem is old and does not support sysfs, so MTD character device nodes have to exist
libmtd: error!: "/dev/mtd2" is not a character device
mtdinfo: error!: libmtd failed get MTD device 2 information
         error 22 (Invalid argument)

So reverse the order of these two checks.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: fix mtd_write() issues for large data-only writes</title>
<updated>2012-02-14T09:01:20+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-11T04:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=71c76e74661492b4f68f670514866cfc85f47089'/>
<id>urn:sha1:71c76e74661492b4f68f670514866cfc85f47089</id>
<content type='text'>
ioctl(MEMWRITE) is implemented with memdup_user(), and so it allocates
kernel memory in contiguous regions. This limits its usefulness for large
amounts of data, since contiguous kernel memory can become scarce. I have
experienced "out of memory" problems with ubiformat, for instance, which
writes in eraseblock-sized regions:

  ...
  ubiformat: flashing eraseblock 12 -- 72 % complete
  ubiformat: page allocation failure.
  order:8, mode:0xd0
  Call Trace:
  [&lt;8043fa7c&gt;] dump_stack+0x8/0x34
  [&lt;8008c940&gt;] __alloc_pages_nodemask+0x408/0x618
  [&lt;800bd748&gt;] cache_alloc_refill+0x400/0x730
  [&lt;800bdbbc&gt;] __kmalloc+0x144/0x154
  [&lt;8009cae4&gt;] memdup_user+0x24/0x94
  [&lt;802d04e4&gt;] mtd_ioctl+0xba8/0xbd0
  [&lt;802d0544&gt;] mtd_unlocked_ioctl+0x38/0x5c
  [&lt;800d43c0&gt;] do_vfs_ioctl+0xa4/0x6e4
  [&lt;800d4a44&gt;] sys_ioctl+0x44/0xa0
  [&lt;8000f95c&gt;] stack_done+0x20/0x40
  ...
  libmtd: error!: MEMWRITE ioctl failed for eraseblock 12 (mtd0)
          error 12 (Cannot allocate memory)
  ubiformat: error!: cannot write eraseblock 12
             error 12 (Cannot allocate memory)

This error can be mitigated for now by only using ioctl(MEMWRITE) when we
need to write OOB data, since we can only do this in small transactions
anyway. Then, data-only transactions (like those originating from
ubiformat) can be carried out with write() calls.

This issue can also be solved within the kernel ioctl(), but either way,
this patch is still useful, since write() is more straightforward (and
efficient?) than ioctl() for data-only writes.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: fix segmentation fault on lib-&gt;mtd</title>
<updated>2012-02-14T09:00:12+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-09T18:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6571ef822aa7d782a8168d39a27fa3e65a3032be'/>
<id>urn:sha1:6571ef822aa7d782a8168d39a27fa3e65a3032be</id>
<content type='text'>
Legacy systems do not initialize lib-&gt;mtd, so we shouldn't perform
strlen(lib-&gt;mtd); this produces a segmentation fault. As this code isn't
used in the legacy codepath, we can just move it down to an 'else' branch.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>limbtd: implement mtd_dev_present for old kernels</title>
<updated>2012-02-14T09:00:09+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-02-09T18:13:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=eded3cd0a52252f677ceacd1fbcae13be3d55e8f'/>
<id>urn:sha1:eded3cd0a52252f677ceacd1fbcae13be3d55e8f</id>
<content type='text'>
Implement the 'legacy_dev_present()' function which will check whether an MTD
device is present by scanning the /proc/mtd file when the MTD subsystem does
not support sysfs (the case for pre-2.6.30 kernels).

This patch also moves the 'mtd_dev_present()' function to a slightly more
logical position.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: add `mtd_dev_present()' library function</title>
<updated>2012-02-02T11:23:39+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-01-27T18:30:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=de3f8789d9e54b2e0e45197a693ad87ebf3bab60'/>
<id>urn:sha1:de3f8789d9e54b2e0e45197a693ad87ebf3bab60</id>
<content type='text'>
Will be used for `mtdinfo --all'

Artem: add a temporary stub for pre-2.6.30 kernels.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: Variable name same as function name causing compile to fail (Android)</title>
<updated>2012-01-13T21:56:56+00:00</updated>
<author>
<name>Thomas Cannon</name>
<email>mail@thomascannon.net</email>
</author>
<published>2012-01-09T16:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=bacf173c87a936858125d3248067329c5b069e58'/>
<id>urn:sha1:bacf173c87a936858125d3248067329c5b069e58</id>
<content type='text'>
When compiling mtd-utils against Android's bionic libc using the
supplied cross compiler environment it errors:

lib/libmtd.c: In function 'dev_node2num':
lib/libmtd.c:444: error: called object 'major' is not a function
lib/libmtd.c:445: error: called object 'minor' is not a function
lib/libmtd.c: In function 'mtd_probe_node':
lib/libmtd.c:1384: error: called object 'major' is not a function
lib/libmtd.c:1385: error: called object 'minor' is not a function

This patch updates the variable names for "major" and "minor" in two
places. It then compiles cleanly.

Artem: pick different names, also rename major1/minor1 variables for
consistency.

Signed-off-by: Thomas Cannon &lt;mail at thomascannon.net&gt;
Cc: linux-mtd at lists.infradead.org
</content>
</entry>
</feed>
