Date: Thu, 7 Nov 2013 09:33:09 +0100 From: Kristof Provost <kristof@sigsegv.be> To: Ian Lepore <ian@FreeBSD.org> Cc: Grzegorz Bernacki <gber@FreeBSD.org>, freebsd-embedded@FreeBSD.org Subject: Re: Incorrect struct onfi_params definition Message-ID: <20131107083308.GH58987@vega.codepro.be> In-Reply-To: <1383782353.31172.183.camel@revolution.hippie.lan> References: <20131106212855.GF58987@vega.codepro.be> <1383782353.31172.183.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2013-11-06 16:59:13 (-0700), Ian Lepore <ian@FreeBSD.org> wrote: > On Wed, 2013-11-06 at 22:28 +0100, Kristof Provost wrote: > > 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. > > > There's more wrong with the onfi support than just that. The biggie is > that it doesn't handle packed/unaligned accesses and the endianess of > the data in the struct. I've got patches from like a year ago that I've > been meaning to dust off and check in. They address more than just the > onfi, and they contain a mix of unrelated stuff and style changes, so > there's some work involved in making them committable. > > I'll attach them here so you can at least get an idea what I'm talking > about and see if there's anything useful for you in them. > Thanks. I see these patches also fix the original problem I was chasing. I have an OpenRD board with a flash chip which claims to be ONFI but isn't. It replies 'ONFI' when I read the ID, but gives me empty parameters. The CRC check should at least detect that. I won't be able to test the ONFI case, but I'll try to pick the patches apart and submit them. Regards, Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131107083308.GH58987>