On 5/23/11 4:23 PM, Stefan Tauner wrote:
Signed-off-by: Stefan Taunerstefan.tauner@student.tuwien.ac.at
chipset_enable.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/chipset_enable.c b/chipset_enable.c index 83b49ad..339c6bb 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -264,8 +264,18 @@ static int enable_flash_ich(struct pci_dev *dev, const char *name, (old& (1<< 0)) ? "en" : "dis"); msg_pdbg("BIOS_CNTL is 0x%x\n", old);
- new = old | 1;
- /*
* Quote from the 6 Series datasheet:
* "5: SMM BIOS Write Protect Disable (SMM_BWP)
* 1 = BIOS region SMM protection is enabled.
* The BIOS Region is not writable unless all processors are in SMM."
* In earlier chipsets this bit is reserved. */
- if (old& (5<< 1)) {
msg_pinfo("WARNING: BIOS region SMM protection is enabled!\n");
return -1;
You might still be successful doing the write, in case the SMM handler does not enforce the protection, so maybe you should just print a warning but not return here?
}
new = old | 1; if (new == old) return 0;