From: David Woodhouse <dwmw2@infradead.org>
To: Nicolas Pitre <nico@cam.org>
Cc: mtd@infradead.org
Subject: Re: cfi_cmdset_0001 unaligned write problems.
Date: Thu, 19 Oct 2000 15:43:07 +0100 [thread overview]
Message-ID: <25665.971966587@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10010191023540.29348-100000@xanadu.vipswitch.com>
Quick response :)
nico@cam.org said:
> Yeah... I just fixed that one... Wonder why it worked for me till
> now...
If you're testing with JFFS you won't have exercised that code.
> However I suspect that there might be an issue with __u16 promoted to
> __u32 then back to __u16 on big endian CPUs. What is the expected
> behavior?
> On LE, 0x1234 becomes 0x00001234 the back to 0x1234 which is fine...
On BE, I think it'll match the comments I put in.
(writing 0x5a to an odd address)
tmp_buf holds {0xff, 0x5a, xx, yy}
*(__u16)tmp_buf is 0xff5a
datum is 0x0000ff5a, which is stored as 0x00,0x00,0xff,0x5a
do_write_oneword uses the two bytes at &datum, which are 0x00 and 0x00.
I have no BE machine to test on ATM, though.
I was also seeing problems with JFFS - whatever I was writing to the flash
wasn't 'taking'. Immediately reading files back would give corrupted data,
and the filesystem was entirely untouched on rebooting - it didn't even
complain of invalid nodes.
I very much doubt that was the same problem - I'm running on SH3 where the
unaligned trap would kill it first time. The unaligned problems showed up
when I was using 'cat' to write to the flash, to check it was working.
I've reverted to v1.25 for now.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next prev parent reply other threads:[~2000-10-19 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-19 14:05 cfi_cmdset_0001 unaligned write problems David Woodhouse
2000-10-19 14:30 ` Nicolas Pitre
2000-10-19 14:43 ` David Woodhouse [this message]
2000-10-19 15:26 ` David Given
2000-10-19 15:39 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25665.971966587@redhat.com \
--to=dwmw2@infradead.org \
--cc=mtd@infradead.org \
--cc=nico@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox