[PATCH 1/5] Fix typo in struct onfi_params

kristof at sigsegv.be kristof at sigsegv.be
Wed Nov 13 22:32:45 UTC 2013


From: Kristof Provost <kristof at 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



More information about the freebsd-embedded mailing list