From 5416c1a1e398fbae5dc494e304c622ada897fc36 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 2 May 2016 21:18:16 +0200 Subject: [PATCH] Revert "sp5100_tco: fix the device check for SB800 and later chipsets" Probably fixes #822651, #823146 --- debian/changelog | 2 + ...o-fix-the-device-check-for-SB800-and.patch | 73 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 76 insertions(+) create mode 100644 debian/patches/bugfix/x86/revert-sp5100_tco-fix-the-device-check-for-SB800-and.patch diff --git a/debian/changelog b/debian/changelog index 2ebf95d79..66cee5c3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ linux (4.5.2-2) UNRELEASED; urgency=medium [ Ben Hutchings ] * bug control: Update list of related firmware packages + * Revert "sp5100_tco: fix the device check for SB800 and later chipsets" + (probably fixes #822651, #823146) -- Uwe Kleine-König Sun, 01 May 2016 16:13:04 +0200 diff --git a/debian/patches/bugfix/x86/revert-sp5100_tco-fix-the-device-check-for-SB800-and.patch b/debian/patches/bugfix/x86/revert-sp5100_tco-fix-the-device-check-for-SB800-and.patch new file mode 100644 index 000000000..92000052c --- /dev/null +++ b/debian/patches/bugfix/x86/revert-sp5100_tco-fix-the-device-check-for-SB800-and.patch @@ -0,0 +1,73 @@ +From: Ben Hutchings +Date: Mon, 2 May 2016 21:15:00 +0200 +Subject: Revert "sp5100_tco: fix the device check for SB800 and later chipsets" +Bug: https://bugzilla.kernel.org/show_bug.cgi?id=114201 +Bug-Debian: https://bugs.debian.org/823146 + +This reverts commit bdecfcdb5461834aab24002bb18d3cbdd907b7fb, which +caused log flooding and hung CPUs on some systems. +--- + drivers/watchdog/sp5100_tco.c | 28 ++++++++++++---------------- + 1 file changed, 12 insertions(+), 16 deletions(-) + +diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c +index 6467b91f2245..0ccadb44b609 100644 +--- a/drivers/watchdog/sp5100_tco.c ++++ b/drivers/watchdog/sp5100_tco.c +@@ -335,24 +335,21 @@ static unsigned char sp5100_tco_setupdevice(void) + if (!sp5100_tco_pci) + return 0; + +- pr_info("PCI Vendor ID: 0x%x, Device ID: 0x%x, Revision ID: 0x%x\n", +- sp5100_tco_pci->vendor, sp5100_tco_pci->device, +- sp5100_tco_pci->revision); ++ pr_info("PCI Revision ID: 0x%x\n", sp5100_tco_pci->revision); + + /* + * Determine type of southbridge chipset. + */ +- if (sp5100_tco_pci->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS && +- sp5100_tco_pci->revision < 0x40) { +- dev_name = SP5100_DEVNAME; +- index_reg = SP5100_IO_PM_INDEX_REG; +- data_reg = SP5100_IO_PM_DATA_REG; +- base_addr = SP5100_PM_WATCHDOG_BASE; +- } else { ++ if (sp5100_tco_pci->revision >= 0x40) { + dev_name = SB800_DEVNAME; + index_reg = SB800_IO_PM_INDEX_REG; + data_reg = SB800_IO_PM_DATA_REG; + base_addr = SB800_PM_WATCHDOG_BASE; ++ } else { ++ dev_name = SP5100_DEVNAME; ++ index_reg = SP5100_IO_PM_INDEX_REG; ++ data_reg = SP5100_IO_PM_DATA_REG; ++ base_addr = SP5100_PM_WATCHDOG_BASE; + } + + /* Request the IO ports used by this driver */ +@@ -388,12 +385,7 @@ static unsigned char sp5100_tco_setupdevice(void) + * Secondly, Find the watchdog timer MMIO address + * from SBResource_MMIO register. + */ +- if (sp5100_tco_pci->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS && +- sp5100_tco_pci->revision < 0x40) { +- /* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */ +- pci_read_config_dword(sp5100_tco_pci, +- SP5100_SB_RESOURCE_MMIO_BASE, &val); +- } else { ++ if (sp5100_tco_pci->revision >= 0x40) { + /* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */ + outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG); + val = inb(SB800_IO_PM_DATA_REG); +@@ -403,6 +395,10 @@ static unsigned char sp5100_tco_setupdevice(void) + val = val << 8 | inb(SB800_IO_PM_DATA_REG); + outb(SB800_PM_ACPI_MMIO_EN+0, SB800_IO_PM_INDEX_REG); + val = val << 8 | inb(SB800_IO_PM_DATA_REG); ++ } else { ++ /* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */ ++ pci_read_config_dword(sp5100_tco_pci, ++ SP5100_SB_RESOURCE_MMIO_BASE, &val); + } + + /* The SBResource_MMIO is enabled and mapped memory space? */ diff --git a/debian/patches/series b/debian/patches/series index 4d0e35cd2..91d8b4a53 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -154,3 +154,4 @@ bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch bugfix/all/power-cpupower-fix-manpages-NAME.patch bugfix/all/tools-lib-traceevent-fix-use-of-uninitialized-variables.patch bugfix/all/scripts-fix-x.509-pem-support-in-sign-file.patch +bugfix/x86/revert-sp5100_tco-fix-the-device-check-for-SB800-and.patch