Bugfix in cfi_intelext_read_prot_reg
PATCH 1/1 Bugfix in cfi_intelext_read_prot_reg
This patch fixes a bug with the calculation of which byte to read from the protection regsietsr which are presennt in some Intel flash devices.
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v retrieving revision 1.102
cfi_cmdset_0001.c 25 Sep 2002 09:46:16 -0000 renamed from cfi_cmdset_0001.c 13 Sep 2002 14:39:34 -0000 1.102 +1 -1
@@ -527,7 +527,7 @@ static int cfi_intelext_read_prot_reg (s cfi_send_gen_cmd(0x90, 0x55,chip->start, map, cfi, cfi->device_type, NULL); while(count && ((offst-base_offst)<reg_sz)){ - *buf=map->read8(map,(chip->start+(extp->ProtRegAddr*ofs_factor)+offst)); + *buf=map->read8(map,(chip->start+((extp->ProtRegAddr+1)*ofs_factor)+offst)); buf++; offst++; count--;