+ clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Clear abnormal poweroff flag on VIA southbridges, fix resume

has been added to the -mm tree.  Its filename is

     clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Clear abnormal poweroff flag on VIA southbridges, fix resume
From: Matthew Garrett <mjg59@xxxxxxxxxxxxx>


Some VIA southbridges contain a flag in the ACPI register space that
indicates whether an abnormal poweroff has occured, presumably with the
intention that it can be cleared on clean shutdown.  Some BIOSes check this
flag at resume time, and will re-POST the system rather than jump back to
the OS if it's set.  Clearing it at boot time appears to be sufficient. 
I'm not sure if drivers/pci/quirks.c is the right place to do it, but I'm
not sure where would be cleaner.

Signed-off-by: Matthew Garrett <mjg59@xxxxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: "Brown, Len" <len.brown@xxxxxxxxx>
Cc: "Yu, Luming" <luming.yu@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/pci/quirks.c |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff -puN drivers/pci/quirks.c~clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume drivers/pci/quirks.c
--- a/drivers/pci/quirks.c~clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume
+++ a/drivers/pci/quirks.c
@@ -683,6 +683,33 @@ static void __devinit quirk_vt82c598_id(
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C597_0,	quirk_vt82c598_id );
 
+#ifdef CONFIG_ACPI
+
+/* Some VIA systems boot with the abnormal status flag set. This can cause
+ * the BIOS to re-POST the system on resume rather than passing control
+ * back to the OS. Clear the flag on boot
+ */
+
+static void __devinit quirk_via_abnormal_poweroff(struct pci_dev *dev)
+{
+	u32 register;
+
+	acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS,
+			       &register);
+
+	if (register & 0x800) {
+		printk ("Clearing abnormal poweroff flag\n");
+		acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,
+					ACPI_REGISTER_PM1_STATUS,
+					(u16)0x800);
+	}
+}
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_VIA, PCI_DEVICE_ID_VIA_8235, quirk_via_abnormal_poweroff);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_abnormal_poweroff);
+
+#endif
+
 /*
  * CardBus controllers have a legacy base address that enables them
  * to respond as i82365 pcmcia controllers.  We don't want them to
_

Patches currently in -mm which might be from mjg59@xxxxxxxxxxxxx are

acpi-sony-add-fn-hotkey-support.patch
via-pmu-add-input-device.patch
clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux