mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.183,1.184
Nicolas Pitre
nico at infradead.org
Tue Oct 25 16:28:43 EDT 2005
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv13100
Modified Files:
cfi_cmdset_0001.c
Log Message:
[MTD] CHIPS: fix for P30 cfi parsing
From: Jared Hulbert <jaredeh at gmail.com>
Change to the extended cfi table parsing for Intel NOR flash that uses
the info in the extended table to 'walk' the table rather than using
hard coding for various primary extended query table version numbers.
Signed-off-by: Nicolas Pitre <nico at cam.org>
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- cfi_cmdset_0001.c 6 Aug 2005 04:46:56 -0000 1.183
+++ cfi_cmdset_0001.c 25 Oct 2005 20:28:40 -0000 1.184
@@ -285,7 +285,10 @@
sizeof(struct cfi_intelext_otpinfo);
/* Burst Read info */
- extra_size += (extp->MinorVersion < '4') ? 6 : 5;
+ extra_size += 2;
+ if (extp_size < sizeof(*extp) + extra_size)
+ goto need_more;
+ extra_size += extp->extra[extra_size-1];
/* Number of hardware-partitions */
extra_size += 1;
@@ -519,7 +522,7 @@
sizeof(struct cfi_intelext_otpinfo);
/* Burst Read info */
- offs += (extp->MinorVersion < '4') ? 6 : 5;
+ offs += extp->extra[offs+1]+2;
/* Number of partition regions */
numregions = extp->extra[offs];
More information about the linux-mtd-cvs
mailing list