From: David Woodhouse <dwmw2@infradead.org>
To: "Kremer, Alex" <alex.kremer@intel.com>
Cc: "'Larry Doolittle'" <ldoolitt@recycle.lbl.gov>,
linux-mtd@lists.infradead.org
Subject: Re: Bug in chip alias detection! (jedec_probe, possibly cfi_probe)
Date: Tue, 16 Oct 2001 15:44:41 +0100 [thread overview]
Message-ID: <9339.1003243481@redhat.com> (raw)
In-Reply-To: <7C0E66E1B97BD5119B120002A50A63D22E419F@hasmsx101.iil.intel.com>
alex.kremer@intel.com said:
> I think I have found the problem. When scanning over previously found
> chips *THEY* (chips[i].start) should be checked if they also switched
> to autoselect mode when we switched the one we are checking now (base)
Thanks. Please could you test this slightly edited fix:
Index: drivers/mtd/chips/jedec_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/jedec_probe.c,v
retrieving revision 1.5
diff -u -r1.5 jedec_probe.c
--- drivers/mtd/chips/jedec_probe.c 2001/10/06 15:56:57 1.5
+++ drivers/mtd/chips/jedec_probe.c 2001/10/16 14:44:31
@@ -583,8 +583,11 @@
for (i=0; i<sizeof(jedec_table)/sizeof(jedec_table[0]); i++) {
if (mfr == jedec_table[i].mfr_id &&
- id == jedec_table[i].dev_id)
- return cfi_jedec_setup(cfi, i);
+ id == jedec_table[i].dev_id) {
+ if (!cfi_jedec_setup(cfi, i))
+ return 0;
+ goto ok_out;
+ }
}
if (!retried++) {
/* Deal with whichever strange chips these were */
@@ -599,8 +602,8 @@
for (i=0; i<cfi->numchips; i++) {
/* This chip should be in read mode if it's one
we've already touched. */
- if (jedec_read_mfr(map, base, osf) == cfi->mfr &&
- jedec_read_id(map, base, osf) == cfi->id) {
+ if (jedec_read_mfr(map, chips[i].start, osf) == cfi->mfr &&
+ jedec_read_id(map, chips[i[.start, osf) == cfi->id) {
/* Eep. This chip also looks like it's in autoselect mode.
Is it an alias for the new one? */
@@ -640,6 +643,7 @@
chips[cfi->numchips].state = FL_READY;
cfi->numchips++;
+ok_out:
/* Put it back into Read Mode */
cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
cfi_send_gen_cmd(0xff, 0, base, map, cfi, cfi->device_type, NULL);
--
dwmw2
prev parent reply other threads:[~2001-10-16 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-16 12:43 Bug in chip alias detection! (jedec_probe, possibly cfi_probe) Kremer, Alex
2001-10-16 14:44 ` David Woodhouse [this message]
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=9339.1003243481@redhat.com \
--to=dwmw2@infradead.org \
--cc=alex.kremer@intel.com \
--cc=ldoolitt@recycle.lbl.gov \
--cc=linux-mtd@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.