Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2013 23:32:36 +0100
From:      kristof@sigsegv.be
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        Grzegorz Bernacki <gber@FreeBSD.org>, freebsd-embedded@FreeBSD.org
Subject:   [PATCH 1/5] Fix typo in struct onfi_params
Message-ID:  <1384381960-98851-2-git-send-email-kristof@sigsegv.be>
In-Reply-To: <1384381960-98851-1-git-send-email-kristof@sigsegv.be>
References:  <1383782353.31172.183.camel@revolution.hippie.lan> <1384381960-98851-1-git-send-email-kristof@sigsegv.be>

next in thread | previous in thread | raw e-mail | index | archive | help
From: Kristof Provost <kristof@sigsegv.be>

The vendor specified field is 88 bytes, not 8 bytes.

See ONFI specification rev. 2.3a: 5.7.1 Parameter Page Data Structure Definition
---
 sys/dev/nand/nand.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/nand/nand.h b/sys/dev/nand/nand.h
index d2aa661..1ca0fb2 100644
--- a/sys/dev/nand/nand.h
+++ b/sys/dev/nand/nand.h
@@ -31,6 +31,7 @@
 
 #include <sys/bus.h>
 #include <sys/param.h>
+#include <sys/systm.h>
 #include <sys/lock.h>
 #include <sys/sx.h>
 #include <sys/taskqueue.h>
@@ -218,9 +219,10 @@ struct onfi_params {
 	uint8_t		driver_strength_support;
 	uint8_t		res4[12];
 	uint16_t	vendor_rev;
-	uint8_t		vendor_spec[8];
+	uint8_t		vendor_spec[88];
 	uint16_t	crc;
 }__attribute__((packed));
+CTASSERT(sizeof(struct onfi_params) == 256);
 
 struct nand_ecc_data {
 	int	eccsize;		/* Number of data bytes per ECC step */
-- 
1.7.10.3




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1384381960-98851-2-git-send-email-kristof>