public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Jonas Holmberg <jonas.holmberg@axis.com>
To: linux-mtd@lists.infradead.org
Subject: Patch for jedec_probe
Date: 04 Feb 2002 11:52:29 +0100	[thread overview]
Message-ID: <1012819949.4315.2.camel@pcjonashg> (raw)
In-Reply-To: <8523.1012575879@redhat.com>

I need the jedec_probe to give up when finding a chip of a different
manufacturer or device id (or no chip at all) than a previously found
chip in the same map.

This patch below fixes that. Is it OK to commit?

/Jonas



Index: jedec_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/jedec_probe.c,v
retrieving revision 1.10
diff -u -r1.10 jedec_probe.c
--- jedec_probe.c       2002/01/21 18:09:01     1.10
+++ jedec_probe.c       2002/02/04 10:46:45
@@ -832,6 +832,19 @@
                        goto retry;
                }
                return 0;
+       } else {
+               __u16 mfr;
+               __u16 id;
+
+               /* Make sure it is a chip of the same manufacturer and
id */
+               mfr = jedec_read_mfr(map, base, cfi);
+               id = jedec_read_id(map, base, cfi);
+
+               if ((mfr != cfi->mfr) || (id != cfi->id)) {
+                       printk(KERN_DEBUG "%s: Found different chip or
no chip at all (mfr %x, id %x) at 0x%x\n",
+                              map->name, mfr, id, base);
+                       return 0;
+               }
        }

        /* Check each previous chip to see if it's an alias */

  reply	other threads:[~2002-02-04 10:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 11:06 chip drivers Jonas Holmberg
2002-02-01 13:34 ` David Woodhouse
2002-02-01 13:47   ` Jonas Holmberg
2002-02-01 13:49     ` David Woodhouse
2002-02-01 14:49       ` Jonas Holmberg
2002-02-01 15:04         ` David Woodhouse
2002-02-04 10:52           ` Jonas Holmberg [this message]
2002-02-05  3:06             ` Patch for jedec_probe David Woodhouse
2002-02-04 15:47           ` chip drivers Jonas Holmberg
2002-02-05 16:48             ` Jonas Holmberg
2002-02-06 13:49           ` Jonas Holmberg
2002-02-06 14:22             ` 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=1012819949.4315.2.camel@pcjonashg \
    --to=jonas.holmberg@axis.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox