]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Nov 2016 09:26:34 +0000 (10:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Nov 2016 09:26:34 +0000 (10:26 +0100)
added patches:
mei-fix-return-value-on-disconnection.patch
mei-me-disable-driver-on-spt-sps-firmware.patch
mei-me-fix-place-for-kaby-point-device-ids.patch

queue-4.4/mei-fix-return-value-on-disconnection.patch [new file with mode: 0644]
queue-4.4/mei-me-disable-driver-on-spt-sps-firmware.patch [new file with mode: 0644]
queue-4.4/mei-me-fix-place-for-kaby-point-device-ids.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/mei-fix-return-value-on-disconnection.patch b/queue-4.4/mei-fix-return-value-on-disconnection.patch
new file mode 100644 (file)
index 0000000..64b3a17
--- /dev/null
@@ -0,0 +1,42 @@
+From 2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266a Mon Sep 17 00:00:00 2001
+From: Tomas Winkler <tomas.winkler@intel.com>
+Date: Thu, 23 Jun 2016 00:25:31 +0300
+Subject: mei: fix return value on disconnection
+
+From: Tomas Winkler <tomas.winkler@intel.com>
+
+commit 2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266a upstream.
+
+Correct errno on client disconnection is -ENODEV not -EBUSY
+
+Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
+Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/mei/bus.c  |    2 +-
+ drivers/misc/mei/main.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/misc/mei/bus.c
++++ b/drivers/misc/mei/bus.c
+@@ -144,7 +144,7 @@ ssize_t __mei_cl_recv(struct mei_cl *cl,
+               mutex_lock(&bus->device_lock);
+               if (!mei_cl_is_connected(cl)) {
+-                      rets = -EBUSY;
++                      rets = -ENODEV;
+                       goto out;
+               }
+       }
+--- a/drivers/misc/mei/main.c
++++ b/drivers/misc/mei/main.c
+@@ -207,7 +207,7 @@ static ssize_t mei_read(struct file *fil
+               mutex_lock(&dev->device_lock);
+               if (!mei_cl_is_connected(cl)) {
+-                      rets = -EBUSY;
++                      rets = -ENODEV;
+                       goto out;
+               }
+       }
diff --git a/queue-4.4/mei-me-disable-driver-on-spt-sps-firmware.patch b/queue-4.4/mei-me-disable-driver-on-spt-sps-firmware.patch
new file mode 100644 (file)
index 0000000..aaac469
--- /dev/null
@@ -0,0 +1,56 @@
+From 8c57cac1457f3125a5d13dc03635c0708c61bff0 Mon Sep 17 00:00:00 2001
+From: Tomas Winkler <tomas.winkler@intel.com>
+Date: Wed, 20 Jul 2016 10:24:02 +0300
+Subject: mei: me: disable driver on SPT SPS firmware
+
+From: Tomas Winkler <tomas.winkler@intel.com>
+
+commit 8c57cac1457f3125a5d13dc03635c0708c61bff0 upstream.
+
+Sunrise Point PCH with SPS Firmware doesn't expose working
+MEI interface, we need to quirk it out.
+The SPS Firmware is identifiable only on the first PCI function
+of the device.
+
+Tested-by: Sujith Pandel <sujith_pandel@dell.com>
+Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/misc/mei/hw-me.c  |   10 ++++++++--
+ drivers/misc/mei/pci-me.c |    4 ++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+--- a/drivers/misc/mei/hw-me.c
++++ b/drivers/misc/mei/hw-me.c
+@@ -1258,8 +1258,14 @@ static bool mei_me_fw_type_nm(struct pci
+ static bool mei_me_fw_type_sps(struct pci_dev *pdev)
+ {
+       u32 reg;
+-      /* Read ME FW Status check for SPS Firmware */
+-      pci_read_config_dword(pdev, PCI_CFG_HFS_1, &reg);
++      unsigned int devfn;
++
++      /*
++       * Read ME FW Status register to check for SPS Firmware
++       * The SPS FW is only signaled in pci function 0
++       */
++      devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0);
++      pci_bus_read_config_dword(pdev->bus, devfn, PCI_CFG_HFS_1, &reg);
+       /* if bits [19:16] = 15, running SPS Firmware */
+       return (reg & 0xf0000) == 0xf0000;
+ }
+--- a/drivers/misc/mei/pci-me.c
++++ b/drivers/misc/mei/pci-me.c
+@@ -84,8 +84,8 @@ static const struct pci_device_id mei_me
+       {MEI_PCI_DEVICE(MEI_DEV_ID_SPT, mei_me_pch8_cfg)},
+       {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_2, mei_me_pch8_cfg)},
+-      {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, mei_me_pch8_cfg)},
+-      {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, mei_me_pch8_cfg)},
++      {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, mei_me_pch8_sps_cfg)},
++      {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, mei_me_pch8_sps_cfg)},
+       {MEI_PCI_DEVICE(MEI_DEV_ID_KBP, mei_me_pch8_cfg)},
+       {MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, mei_me_pch8_cfg)},
diff --git a/queue-4.4/mei-me-fix-place-for-kaby-point-device-ids.patch b/queue-4.4/mei-me-fix-place-for-kaby-point-device-ids.patch
new file mode 100644 (file)
index 0000000..840c3da
--- /dev/null
@@ -0,0 +1,45 @@
+From tomas.winkler@intel.com  Wed Nov 30 10:22:36 2016
+From: Tomas Winkler <tomas.winkler@intel.com>
+Date: Tue, 29 Nov 2016 14:44:45 +0200
+Subject: mei: me: fix place for kaby point device ids.
+To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: linux-kernel@vger.kernel.org, Alexander Usyskin <alexander.usyskin@intel.com>
+Message-ID: <1480423486-32307-2-git-send-email-tomas.winkler@intel.com>
+
+From: Tomas Winkler <tomas.winkler@intel.com>
+
+This is fix of the backported patch only, it places
+KBL DIDs on correct place to easy on backporting of
+further DIDs.
+
+Fixes: 5c99f32c461c ('mei: me: add kaby point device ids')
+Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/mei/hw-me-regs.h |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/misc/mei/hw-me-regs.h
++++ b/drivers/misc/mei/hw-me-regs.h
+@@ -66,9 +66,6 @@
+ #ifndef _MEI_HW_MEI_REGS_H_
+ #define _MEI_HW_MEI_REGS_H_
+-#define MEI_DEV_ID_KBP        0xA2BA  /* Kaby Point */
+-#define MEI_DEV_ID_KBP_2      0xA2BB  /* Kaby Point 2 */
+-
+ /*
+  * MEI device IDs
+  */
+@@ -124,6 +121,10 @@
+ #define MEI_DEV_ID_SPT_2      0x9D3B  /* Sunrise Point 2 */
+ #define MEI_DEV_ID_SPT_H      0xA13A  /* Sunrise Point H */
+ #define MEI_DEV_ID_SPT_H_2    0xA13B  /* Sunrise Point H 2 */
++
++#define MEI_DEV_ID_KBP        0xA2BA  /* Kaby Point */
++#define MEI_DEV_ID_KBP_2      0xA2BB  /* Kaby Point 2 */
++
+ /*
+  * MEI HW Section
+  */
index d5e7fba74f4c5142472e6d3c8cd7aca12c701a82..eb3a8aa59c5a69e8bc2e4cb1e13214f19f03742a 100644 (file)
@@ -16,3 +16,6 @@ parisc-fix-race-in-pci-dma.c.patch
 parisc-also-flush-data-tlb-in-flush_icache_page_asm.patch
 mpi-fix-null-ptr-dereference-in-mpi_powm.patch
 drm-radeon-ensure-vblank-interrupt-is-enabled-on-dpms-transition-to-on.patch
+mei-me-disable-driver-on-spt-sps-firmware.patch
+mei-me-fix-place-for-kaby-point-device-ids.patch
+mei-fix-return-value-on-disconnection.patch