From 0034b2a7a41b247eedcc8976ce21389e406bbc20 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 14 Feb 2005 16:27:38 +0000 Subject: [PATCH] --- yaml --- r: 4485 b: refs/heads/master c: 011b2a36278cca110c70506ad85b042c2faabac2 h: refs/heads/master i: 4483: 95a8e4b86583a4987e3f231ab9d9ed56d2449ba5 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/chips/jedec_probe.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0ca6095f8791..2910a54d092c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eeada24da8bd23fcf6acd2729be054ea99b301bb +refs/heads/master: 011b2a36278cca110c70506ad85b042c2faabac2 diff --git a/trunk/drivers/mtd/chips/jedec_probe.c b/trunk/drivers/mtd/chips/jedec_probe.c index 30325a25ab95..c2ef821b7af9 100644 --- a/trunk/drivers/mtd/chips/jedec_probe.c +++ b/trunk/drivers/mtd/chips/jedec_probe.c @@ -1,7 +1,7 @@ /* Common Flash Interface probe code. (C) 2000 Red Hat. GPL'd. - $Id: jedec_probe.c,v 1.61 2004/11/19 20:52:16 thayne Exp $ + $Id: jedec_probe.c,v 1.62 2005/02/14 16:27:34 bjd Exp $ See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5) for the standard this probe goes back to. @@ -1856,6 +1856,16 @@ static inline int jedec_match( __u32 base, case CFI_DEVICETYPE_X8: mfr = (__u8)finfo->mfr_id; id = (__u8)finfo->dev_id; + + /* bjd: it seems that if we do this, we can end up + * detecting 16bit flashes as an 8bit device, even though + * there aren't. + */ + if (finfo->dev_id > 0xff) { + DEBUG( MTD_DEBUG_LEVEL3, "%s(): ID is not 8bit\n", + __func__); + goto match_done; + } break; case CFI_DEVICETYPE_X16: mfr = (__u16)finfo->mfr_id;