]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch from 5.5 and 5.4
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2020 17:57:20 +0000 (18:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2020 17:57:20 +0000 (18:57 +0100)
queue-5.4/i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch [deleted file]
queue-5.4/series
queue-5.5/i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch [deleted file]
queue-5.5/series

diff --git a/queue-5.4/i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch b/queue-5.4/i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch
deleted file mode 100644 (file)
index bff47cf..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-From 04bbb97d1b732b2d197f103c5818f5c214a4cf81 Mon Sep 17 00:00:00 2001
-From: Mika Westerberg <mika.westerberg@linux.intel.com>
-Date: Wed, 26 Feb 2020 16:21:22 +0300
-Subject: i2c: i801: Do not add ICH_RES_IO_SMI for the iTCO_wdt device
-
-From: Mika Westerberg <mika.westerberg@linux.intel.com>
-
-commit 04bbb97d1b732b2d197f103c5818f5c214a4cf81 upstream.
-
-Martin noticed that nct6775 driver does not load properly on his system
-in v5.4+ kernels. The issue was bisected to commit b84398d6d7f9 ("i2c:
-i801: Use iTCO version 6 in Cannon Lake PCH and beyond") but it is
-likely not the culprit because the faulty code has been in the driver
-already since commit 9424693035a5 ("i2c: i801: Create iTCO device on
-newer Intel PCHs"). So more likely some commit that added PCI IDs of
-recent chipsets made the driver to create the iTCO_wdt device on Martins
-system.
-
-The issue was debugged to be PCI configuration access to the PMC device
-that is not present. This returns all 1's when read and this caused the
-iTCO_wdt driver to accidentally request resourses used by nct6775.
-
-It turns out that the SMI resource is only required for some ancient
-systems, not the ones supported by this driver. For this reason do not
-populate the SMI resource at all and drop all the related code. The
-driver now always populates the main I/O resource and only in case of SPT
-(Intel Sunrisepoint) compatible devices it adds another resource for the
-NO_REBOOT bit. These two resources are of different types so
-platform_get_resource() used by the iTCO_wdt driver continues to find
-the both resources at index 0.
-
-Link: https://lore.kernel.org/linux-hwmon/CAM1AHpQ4196tyD=HhBu-2donSsuogabkfP03v1YF26Q7_BgvgA@mail.gmail.com/
-Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")
-[wsa: complete fix needs all of http://patchwork.ozlabs.org/project/linux-i2c/list/?series=160959&state=*]
-Reported-by: Martin Volf <martin.volf.42@gmail.com>
-Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/i2c/busses/i2c-i801.c |   45 +++++++++++-------------------------------
- 1 file changed, 12 insertions(+), 33 deletions(-)
-
---- a/drivers/i2c/busses/i2c-i801.c
-+++ b/drivers/i2c/busses/i2c-i801.c
-@@ -129,11 +129,6 @@
- #define TCOBASE               0x050
- #define TCOCTL                0x054
--#define ACPIBASE              0x040
--#define ACPIBASE_SMI_OFF      0x030
--#define ACPICTRL              0x044
--#define ACPICTRL_EN           0x080
--
- #define SBREG_BAR             0x10
- #define SBREG_SMBCTRL         0xc6000c
- #define SBREG_SMBCTRL_DNV     0xcf000c
-@@ -1544,7 +1539,7 @@ i801_add_tco_spt(struct i801_priv *priv,
-               pci_bus_write_config_byte(pci_dev->bus, devfn, 0xe1, hidden);
-       spin_unlock(&p2sb_spinlock);
--      res = &tco_res[ICH_RES_MEM_OFF];
-+      res = &tco_res[1];
-       if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS)
-               res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL_DNV;
-       else
-@@ -1554,7 +1549,7 @@ i801_add_tco_spt(struct i801_priv *priv,
-       res->flags = IORESOURCE_MEM;
-       return platform_device_register_resndata(&pci_dev->dev, "iTCO_wdt", -1,
--                                      tco_res, 3, &spt_tco_platform_data,
-+                                      tco_res, 2, &spt_tco_platform_data,
-                                       sizeof(spt_tco_platform_data));
- }
-@@ -1567,17 +1562,16 @@ static struct platform_device *
- i801_add_tco_cnl(struct i801_priv *priv, struct pci_dev *pci_dev,
-                struct resource *tco_res)
- {
--      return platform_device_register_resndata(&pci_dev->dev, "iTCO_wdt", -1,
--                                      tco_res, 2, &cnl_tco_platform_data,
--                                      sizeof(cnl_tco_platform_data));
-+      return platform_device_register_resndata(&pci_dev->dev,
-+                      "iTCO_wdt", -1, tco_res, 1, &cnl_tco_platform_data,
-+                      sizeof(cnl_tco_platform_data));
- }
- static void i801_add_tco(struct i801_priv *priv)
- {
--      u32 base_addr, tco_base, tco_ctl, ctrl_val;
-       struct pci_dev *pci_dev = priv->pci_dev;
--      struct resource tco_res[3], *res;
--      unsigned int devfn;
-+      struct resource tco_res[2], *res;
-+      u32 tco_base, tco_ctl;
-       /* If we have ACPI based watchdog use that instead */
-       if (acpi_has_watchdog())
-@@ -1592,30 +1586,15 @@ static void i801_add_tco(struct i801_pri
-               return;
-       memset(tco_res, 0, sizeof(tco_res));
--
--      res = &tco_res[ICH_RES_IO_TCO];
--      res->start = tco_base & ~1;
--      res->end = res->start + 32 - 1;
--      res->flags = IORESOURCE_IO;
--
-       /*
--       * Power Management registers.
-+       * Always populate the main iTCO IO resource here. The second entry
-+       * for NO_REBOOT MMIO is filled by the SPT specific function.
-        */
--      devfn = PCI_DEVFN(PCI_SLOT(pci_dev->devfn), 2);
--      pci_bus_read_config_dword(pci_dev->bus, devfn, ACPIBASE, &base_addr);
--
--      res = &tco_res[ICH_RES_IO_SMI];
--      res->start = (base_addr & ~1) + ACPIBASE_SMI_OFF;
--      res->end = res->start + 3;
-+      res = &tco_res[0];
-+      res->start = tco_base & ~1;
-+      res->end = res->start + 32 - 1;
-       res->flags = IORESOURCE_IO;
--      /*
--       * Enable the ACPI I/O space.
--       */
--      pci_bus_read_config_dword(pci_dev->bus, devfn, ACPICTRL, &ctrl_val);
--      ctrl_val |= ACPICTRL_EN;
--      pci_bus_write_config_dword(pci_dev->bus, devfn, ACPICTRL, ctrl_val);
--
-       if (priv->features & FEATURE_TCO_CNL)
-               priv->tco_pdev = i801_add_tco_cnl(priv, pci_dev, tco_res);
-       else
index 390d033cef5ccda0b7e0c5c95abe81c7b853cb68..d9086107deb132f56a29779325fc1b41f5f9acc4 100644 (file)
@@ -99,7 +99,6 @@ clk-imx8mn-fix-incorrect-clock-defines.patch
 pinctrl-meson-gxl-fix-gpiox-sdio-pins.patch
 pinctrl-imx-scu-align-imx-sc-msg-structs-to-4.patch
 virtio_ring-fix-mem-leak-with-vring_new_virtqueue.patch
-i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch
 drm-i915-gvt-fix-dma-buf-display-blur-issue-on-cfl.patch
 pinctrl-core-remove-extra-kref_get-which-blocks-hogs-being-freed.patch
 drm-i915-gvt-fix-unnecessary-schedule-timer-when-no-vgpu-exits.patch
diff --git a/queue-5.5/i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch b/queue-5.5/i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch
deleted file mode 100644 (file)
index b9f1b7f..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-From 04bbb97d1b732b2d197f103c5818f5c214a4cf81 Mon Sep 17 00:00:00 2001
-From: Mika Westerberg <mika.westerberg@linux.intel.com>
-Date: Wed, 26 Feb 2020 16:21:22 +0300
-Subject: i2c: i801: Do not add ICH_RES_IO_SMI for the iTCO_wdt device
-
-From: Mika Westerberg <mika.westerberg@linux.intel.com>
-
-commit 04bbb97d1b732b2d197f103c5818f5c214a4cf81 upstream.
-
-Martin noticed that nct6775 driver does not load properly on his system
-in v5.4+ kernels. The issue was bisected to commit b84398d6d7f9 ("i2c:
-i801: Use iTCO version 6 in Cannon Lake PCH and beyond") but it is
-likely not the culprit because the faulty code has been in the driver
-already since commit 9424693035a5 ("i2c: i801: Create iTCO device on
-newer Intel PCHs"). So more likely some commit that added PCI IDs of
-recent chipsets made the driver to create the iTCO_wdt device on Martins
-system.
-
-The issue was debugged to be PCI configuration access to the PMC device
-that is not present. This returns all 1's when read and this caused the
-iTCO_wdt driver to accidentally request resourses used by nct6775.
-
-It turns out that the SMI resource is only required for some ancient
-systems, not the ones supported by this driver. For this reason do not
-populate the SMI resource at all and drop all the related code. The
-driver now always populates the main I/O resource and only in case of SPT
-(Intel Sunrisepoint) compatible devices it adds another resource for the
-NO_REBOOT bit. These two resources are of different types so
-platform_get_resource() used by the iTCO_wdt driver continues to find
-the both resources at index 0.
-
-Link: https://lore.kernel.org/linux-hwmon/CAM1AHpQ4196tyD=HhBu-2donSsuogabkfP03v1YF26Q7_BgvgA@mail.gmail.com/
-Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")
-[wsa: complete fix needs all of http://patchwork.ozlabs.org/project/linux-i2c/list/?series=160959&state=*]
-Reported-by: Martin Volf <martin.volf.42@gmail.com>
-Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/i2c/busses/i2c-i801.c |   45 +++++++++++-------------------------------
- 1 file changed, 12 insertions(+), 33 deletions(-)
-
---- a/drivers/i2c/busses/i2c-i801.c
-+++ b/drivers/i2c/busses/i2c-i801.c
-@@ -131,11 +131,6 @@
- #define TCOBASE               0x050
- #define TCOCTL                0x054
--#define ACPIBASE              0x040
--#define ACPIBASE_SMI_OFF      0x030
--#define ACPICTRL              0x044
--#define ACPICTRL_EN           0x080
--
- #define SBREG_BAR             0x10
- #define SBREG_SMBCTRL         0xc6000c
- #define SBREG_SMBCTRL_DNV     0xcf000c
-@@ -1550,7 +1545,7 @@ i801_add_tco_spt(struct i801_priv *priv,
-               pci_bus_write_config_byte(pci_dev->bus, devfn, 0xe1, hidden);
-       spin_unlock(&p2sb_spinlock);
--      res = &tco_res[ICH_RES_MEM_OFF];
-+      res = &tco_res[1];
-       if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS)
-               res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL_DNV;
-       else
-@@ -1560,7 +1555,7 @@ i801_add_tco_spt(struct i801_priv *priv,
-       res->flags = IORESOURCE_MEM;
-       return platform_device_register_resndata(&pci_dev->dev, "iTCO_wdt", -1,
--                                      tco_res, 3, &spt_tco_platform_data,
-+                                      tco_res, 2, &spt_tco_platform_data,
-                                       sizeof(spt_tco_platform_data));
- }
-@@ -1573,17 +1568,16 @@ static struct platform_device *
- i801_add_tco_cnl(struct i801_priv *priv, struct pci_dev *pci_dev,
-                struct resource *tco_res)
- {
--      return platform_device_register_resndata(&pci_dev->dev, "iTCO_wdt", -1,
--                                      tco_res, 2, &cnl_tco_platform_data,
--                                      sizeof(cnl_tco_platform_data));
-+      return platform_device_register_resndata(&pci_dev->dev,
-+                      "iTCO_wdt", -1, tco_res, 1, &cnl_tco_platform_data,
-+                      sizeof(cnl_tco_platform_data));
- }
- static void i801_add_tco(struct i801_priv *priv)
- {
--      u32 base_addr, tco_base, tco_ctl, ctrl_val;
-       struct pci_dev *pci_dev = priv->pci_dev;
--      struct resource tco_res[3], *res;
--      unsigned int devfn;
-+      struct resource tco_res[2], *res;
-+      u32 tco_base, tco_ctl;
-       /* If we have ACPI based watchdog use that instead */
-       if (acpi_has_watchdog())
-@@ -1598,30 +1592,15 @@ static void i801_add_tco(struct i801_pri
-               return;
-       memset(tco_res, 0, sizeof(tco_res));
--
--      res = &tco_res[ICH_RES_IO_TCO];
--      res->start = tco_base & ~1;
--      res->end = res->start + 32 - 1;
--      res->flags = IORESOURCE_IO;
--
-       /*
--       * Power Management registers.
-+       * Always populate the main iTCO IO resource here. The second entry
-+       * for NO_REBOOT MMIO is filled by the SPT specific function.
-        */
--      devfn = PCI_DEVFN(PCI_SLOT(pci_dev->devfn), 2);
--      pci_bus_read_config_dword(pci_dev->bus, devfn, ACPIBASE, &base_addr);
--
--      res = &tco_res[ICH_RES_IO_SMI];
--      res->start = (base_addr & ~1) + ACPIBASE_SMI_OFF;
--      res->end = res->start + 3;
-+      res = &tco_res[0];
-+      res->start = tco_base & ~1;
-+      res->end = res->start + 32 - 1;
-       res->flags = IORESOURCE_IO;
--      /*
--       * Enable the ACPI I/O space.
--       */
--      pci_bus_read_config_dword(pci_dev->bus, devfn, ACPICTRL, &ctrl_val);
--      ctrl_val |= ACPICTRL_EN;
--      pci_bus_write_config_dword(pci_dev->bus, devfn, ACPICTRL, ctrl_val);
--
-       if (priv->features & FEATURE_TCO_CNL)
-               priv->tco_pdev = i801_add_tco_cnl(priv, pci_dev, tco_res);
-       else
index 87ecde2573b9d84b0369407f27e6eefa25de73f5..4869337b75488723cc72406daa1b1f7df9b6b58b 100644 (file)
@@ -127,7 +127,6 @@ pinctrl-meson-gxl-fix-gpiox-sdio-pins.patch
 pinctrl-imx-scu-align-imx-sc-msg-structs-to-4.patch
 virtio_ring-fix-mem-leak-with-vring_new_virtqueue.patch
 x86-mce-therm_throt-undo-thermal-polling-properly-on-cpu-offline.patch
-i2c-i801-do-not-add-ich_res_io_smi-for-the-itco_wdt-device.patch
 drm-i915-gvt-fix-dma-buf-display-blur-issue-on-cfl.patch
 pinctrl-core-remove-extra-kref_get-which-blocks-hogs-being-freed.patch
 drm-i915-gvt-fix-unnecessary-schedule-timer-when-no-vgpu-exits.patch