Some issues with the AT91 dataflash driver...
Artem Bityutskiy
dedekind at infradead.org
Tue May 29 15:42:43 EDT 2007
On Mon, 2007-05-28 at 21:25 +0300, Ivan Kuten wrote:
> On Mon, 28 May 2007 20:44:40 +0300
> Artem Bityutskiy wrote:
>
> > On Sun, 2007-05-27 at 21:12 +0200, Haavard Skinnemoen wrote:
> > > On Sun, 27 May 2007 20:08:53 +0200
> > > Haavard Skinnemoen <hskinnemoen at atmel.com> wrote:
> > >
> > > > Now that I've got the CRC errors sorted out, I'll try bisecting it.
> > >
> > > Done. git-bisect blames this commit:
> >
> > Hi,
> >
> > whats mtd->writesize of the flash? Do you have the debugging output log?
> >
>
> MTD_DEBUG=3 enabled:
Sorry for long delay. I is not quite what I asked, but anyway, may you
pleas apply the below patch, reproduce the problem and send me the
result.
Please, do this faster if you can because I will need to disappear for
about 2 weeks in a day. I will try to figure out what is going wrong,
thanks.
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 4884d5e..c629c54 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -761,7 +761,7 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
len = min_t(uint32_t, rdlen - sizeof(*rd), csize);
tn->partial_crc = crc32(0, buf, len);
- dbg_readinode("Calculates CRC (%#08x) for %d bytes, csize %d\n", tn->partial_crc, len, csize);
+printk("Calculates CRC (%#08x) for %d bytes, csize %d\n", tn->partial_crc, len, csize);
/* If we actually calculated the whole data CRC
* and it is wrong, drop the node. */
@@ -780,7 +780,7 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
*/
struct jffs2_eraseblock *jeb;
- dbg_readinode("the node has no data.\n");
+printk("the node has no data.\n");
jeb = &c->blocks[ref->flash_offset / c->sector_size];
len = ref_totlen(c, jeb, ref);
@@ -919,7 +919,7 @@ static int read_more(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref,
/* We need to read more data */
offs = ref_offset(ref) + *rdlen;
- dbg_readinode("read more %d bytes\n", to_read);
+printk("read more %d bytes, needed_len %d\n", to_read, needed_len);
err = jffs2_flash_read(c, offs, to_read, &retlen, buf + *rdlen);
if (err) {
@@ -1004,7 +1004,7 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf
len = end - ref_offset(ref);
}
- dbg_readinode("read %d bytes at %#08x(%d).\n", len, ref_offset(ref), ref_flags(ref));
+printk("read %d bytes at %#08x(%d), wbuf sz %d\n", len, ref_offset(ref), ref_flags(ref), c->wbuf_pagesize);
/* FIXME: point() */
err = jffs2_flash_read(c, ref_offset(ref), len, &retlen, buf);
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list