Date: Wed, 6 Nov 2013 22:28:55 +0100 From: Kristof Provost <kristof@sigsegv.be> To: freebsd-embedded@freebsd.org Cc: Grzegorz Bernacki <gber@FreeBSD.org> Subject: Incorrect struct onfi_params definition Message-ID: <20131106212855.GF58987@vega.codepro.be>
index | next in thread | raw e-mail
Hi,
The definition of struct onfi_params in sys/dev/nand/nand.h is
incorrect. The total structure size should be 256 bytes, but it's only
176 bytes.
That's because the vendor_spec array was declared as being 8 bytes,
rather than the 88 bytes it should be. Clearly a typo.
This patch should fix it:
diff --git a/sys/dev/nand/nand.h b/sys/dev/nand/nand.h
index 0d6d7b4..46b6993 100644
--- a/sys/dev/nand/nand.h
+++ b/sys/dev/nand/nand.h
@@ -217,7 +217,7 @@ 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));
Regards,
Kristof
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131106212855.GF58987>
