From: Wolfgang Denk Date: Fri, 02 May 2014 00:31:26 +0200 Subject: [U-Boot] Possible race condition when accessing SPI NOR Flash ? In-Reply-To: <53623597.8040909@keymile.com> References: <53623597.8040909@keymile.com> Message-ID: <20140501223126.E4CD63809A5@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Valentin, In message <53623597.8040909@keymile.com> you wrote: > > Now when fw_setenv ([1], [2]) updates the environment variables, it sometimes > (approximately 1 out of 100 runs) triggers such kernel errors: ... > I see the same behavior with both the 2013.10 and the 2014.04 releases of > u-boot/fw_env. The kernel we are using is 3.10.36. > > I suspect that the problem is related to SPI NOR/m25p80 driver: on the system we > have a NAND Flash device with UBI volumes. If I create 2 ubi volumes on the NAND > Flash and configure fw_setenv (/etc/fw_env.config) to use them instead of the > the mtd devices targetting the s25fl256s1, I am not able to reproduce the > problem, even over more than 10'000 runs. Um... this is _Linux_ crashing - at this point the U-Boot driver has nothing to do with it.. If there is a problem, then with the Linux kernel / driver code. I guess you should rather post this on the MTD mailing ist. > One other possible culprit that I see is the fsl_espi.c driver for the > underlying hardware connection from the CPU to the NOR Flash, but I wanted to > ask here if someone had an idea about what's going wrong. It's Linux code.... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Don't hit a man when he's down - kick him; it's easier.