[U-Boot] [fw_printenv should open device as O_SYNC]

Wolfgang Denk wd at denx.de
Thu Sep 11 22:49:08 CEST 2008


Dear "Mari Ivan-AIM018",

In message <7ADFACCCB37616458C4A346B2727D3360474A9CE at ct11exm66.ds.mot.com> you wrote:
> 
> We are using ATCA equipment and those boards have redundant boot banks
> and they are managed by IPMI controllers.
> So while you are you are running Linux, you can change the boot banks
> for next restart through set boot options IPMI command.
> The problem arises when we write the U-Boot env variables using
> fw_setenv and immediately send the IPMI command to switch the boot bank.
> In this situation the variables are not written immediately by the
> fw_setenv application but buffered to be written later when the OS
> decides it is the time to write them to the mtd driver. But it is too
> late because the IPMI command was quickly executed and the boot bank has
> changed. This could yield to a corrupted flash boot bank.

You mean, the IPMI actions are not synchronized with the Linux
kernel's MTD layer? Then that's a serious bug in the IPMI
implementation that needs to be fixed there.

Your suggested patch may serve as a temporary workaround for you, but
it makes no sense in the general case.

I really recommend you to get the interface to the MTD layer fixed,
because lots of other problems can happen in your system.

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
Mandrell: "You know what I think?"
Doctor:   "Ah, ah that's a catch question. With a brain your size you
          don't think, right?"
                - Dr. Who


More information about the U-Boot mailing list