From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA0FK-0007iy-6x for qemu-devel@nongnu.org; Fri, 07 Sep 2012 11:13:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TA0FJ-00040O-54 for qemu-devel@nongnu.org; Fri, 07 Sep 2012 11:13:26 -0400 Received: from hall.aurel32.net ([88.191.126.93]:58138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA0FI-00040K-UV for qemu-devel@nongnu.org; Fri, 07 Sep 2012 11:13:25 -0400 From: Aurelien Jarno Date: Fri, 7 Sep 2012 17:13:20 +0200 Message-Id: <1347030800-9439-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH] pflash_cfi01: fix vendor specific extended query List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno pflash_cfi01 announces a version number of 1.1, which implies "Protection Register Information" and "Burst Read information" sections, which are not provided. Decrease the version number to 1.0 so that only the "Protection Register Information" section is needed. Set the number of protection fields (0x3f) to 0x01, as 0x00 means 256 protections field, which makes the CFI table bigger than the current implementation, causing some kernels to fail to read it. Signed-off-by: Aurelien Jarno --- hw/pflash_cfi01.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index d1c7423..d56b51a 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -711,7 +711,7 @@ pflash_t *pflash_cfi01_register(target_phys_addr_t base, pfl->cfi_table[0x33] = 'I'; pfl->cfi_table[0x34] = '1'; - pfl->cfi_table[0x35] = '1'; + pfl->cfi_table[0x35] = '0'; pfl->cfi_table[0x36] = 0x00; pfl->cfi_table[0x37] = 0x00; @@ -723,6 +723,8 @@ pflash_t *pflash_cfi01_register(target_phys_addr_t base, pfl->cfi_table[0x3b] = 0x00; pfl->cfi_table[0x3c] = 0x00; + pfl->cfi_table[0x3f] = 0x01; /* Number of protection fields */ + return pfl; } -- 1.7.10.4