From: Greg Kroah-Hartman Date: Mon, 20 Jun 2022 08:15:23 +0000 (+0200) Subject: 5.18-stable patches X-Git-Tag: v5.4.200~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6317a143ded38ae1e69906b2b988d65112d2d017;p=thirdparty%2Fkernel%2Fstable-queue.git 5.18-stable patches added patches: comedi-vmk80xx-fix-expression-for-tx-buffer-size.patch mei-hbm-drop-capability-response-on-early-shutdown.patch mei-me-add-raptor-lake-point-s-did.patch --- diff --git a/queue-5.18/comedi-vmk80xx-fix-expression-for-tx-buffer-size.patch b/queue-5.18/comedi-vmk80xx-fix-expression-for-tx-buffer-size.patch new file mode 100644 index 00000000000..b2bf1d0479d --- /dev/null +++ b/queue-5.18/comedi-vmk80xx-fix-expression-for-tx-buffer-size.patch @@ -0,0 +1,35 @@ +From 242439f7e279d86b3f73b5de724bc67b2f8aeb07 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 7 Jun 2022 18:18:19 +0100 +Subject: comedi: vmk80xx: fix expression for tx buffer size + +From: Ian Abbott + +commit 242439f7e279d86b3f73b5de724bc67b2f8aeb07 upstream. + +The expression for setting the size of the allocated bulk TX buffer +(`devpriv->usb_tx_buf`) is calling `usb_endpoint_maxp(devpriv->ep_rx)`, +which is using the wrong endpoint (should be `devpriv->ep_tx`). Fix it. + +Fixes: a23461c47482 ("comedi: vmk80xx: fix transfer-buffer overflow") +Cc: Johan Hovold +Cc: stable@vger.kernel.org # 4.9+ +Reviewed-by: Johan Hovold +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20220607171819.4121-1-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +--- + drivers/comedi/drivers/vmk80xx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/comedi/drivers/vmk80xx.c ++++ b/drivers/comedi/drivers/vmk80xx.c +@@ -684,7 +684,7 @@ static int vmk80xx_alloc_usb_buffers(str + if (!devpriv->usb_rx_buf) + return -ENOMEM; + +- size = max(usb_endpoint_maxp(devpriv->ep_rx), MIN_BUF_SIZE); ++ size = max(usb_endpoint_maxp(devpriv->ep_tx), MIN_BUF_SIZE); + devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL); + if (!devpriv->usb_tx_buf) + return -ENOMEM; diff --git a/queue-5.18/mei-hbm-drop-capability-response-on-early-shutdown.patch b/queue-5.18/mei-hbm-drop-capability-response-on-early-shutdown.patch new file mode 100644 index 00000000000..3439830f55f --- /dev/null +++ b/queue-5.18/mei-hbm-drop-capability-response-on-early-shutdown.patch @@ -0,0 +1,40 @@ +From 68553650bc9c57c7e530c84e5b2945e9dfe1a560 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Mon, 6 Jun 2022 17:42:24 +0300 +Subject: mei: hbm: drop capability response on early shutdown + +From: Alexander Usyskin + +commit 68553650bc9c57c7e530c84e5b2945e9dfe1a560 upstream. + +Drop HBM responses also in the early shutdown phase where +the usual traffic is allowed. +Extend the rule that drop HBM responses received during the shutdown +phase by also in MEI_DEV_POWERING_DOWN state. +This resolves the stall if the driver is stopping in the middle +of the link initialization or link reset. + +Drop the capabilities response on early shutdown. + +Fixes: 6d7163f2c49f ("mei: hbm: drop hbm responses on early shutdown") +Cc: +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Link: https://lore.kernel.org/r/20220606144225.282375-2-tomas.winkler@intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/misc/mei/hbm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/misc/mei/hbm.c ++++ b/drivers/misc/mei/hbm.c +@@ -1351,7 +1351,8 @@ int mei_hbm_dispatch(struct mei_device * + + if (dev->dev_state != MEI_DEV_INIT_CLIENTS || + dev->hbm_state != MEI_HBM_CAP_SETUP) { +- if (dev->dev_state == MEI_DEV_POWER_DOWN) { ++ if (dev->dev_state == MEI_DEV_POWER_DOWN || ++ dev->dev_state == MEI_DEV_POWERING_DOWN) { + dev_dbg(dev->dev, "hbm: capabilities response: on shutdown, ignoring\n"); + return 0; + } diff --git a/queue-5.18/mei-me-add-raptor-lake-point-s-did.patch b/queue-5.18/mei-me-add-raptor-lake-point-s-did.patch new file mode 100644 index 00000000000..d6e862d6daf --- /dev/null +++ b/queue-5.18/mei-me-add-raptor-lake-point-s-did.patch @@ -0,0 +1,43 @@ +From 3ed8c7d39cfef831fe508fc1308f146912fa72e6 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Mon, 6 Jun 2022 17:42:25 +0300 +Subject: mei: me: add raptor lake point S DID + +From: Alexander Usyskin + +commit 3ed8c7d39cfef831fe508fc1308f146912fa72e6 upstream. + +Add Raptor (Point) Lake S device id. + +Cc: +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Link: https://lore.kernel.org/r/20220606144225.282375-3-tomas.winkler@intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/misc/mei/hw-me-regs.h | 2 ++ + drivers/misc/mei/pci-me.c | 2 ++ + 2 files changed, 4 insertions(+) + +--- a/drivers/misc/mei/hw-me-regs.h ++++ b/drivers/misc/mei/hw-me-regs.h +@@ -109,6 +109,8 @@ + #define MEI_DEV_ID_ADP_P 0x51E0 /* Alder Lake Point P */ + #define MEI_DEV_ID_ADP_N 0x54E0 /* Alder Lake Point N */ + ++#define MEI_DEV_ID_RPL_S 0x7A68 /* Raptor Lake Point S */ ++ + /* + * MEI HW Section + */ +--- a/drivers/misc/mei/pci-me.c ++++ b/drivers/misc/mei/pci-me.c +@@ -116,6 +116,8 @@ static const struct pci_device_id mei_me + {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)}, + ++ {MEI_PCI_DEVICE(MEI_DEV_ID_RPL_S, MEI_ME_PCH15_CFG)}, ++ + /* required last entry */ + {0, } + }; diff --git a/queue-5.18/series b/queue-5.18/series index 9009c6527ec..badc75865e9 100644 --- a/queue-5.18/series +++ b/queue-5.18/series @@ -97,3 +97,6 @@ irqchip-realtek-rtl-fix-refcount-leak-in-map_interru.patch sched-fix-balance_push-vs-__sched_setscheduler.patch i2c-designware-use-standard-optional-ref-clock-imple.patch i2c-mediatek-fix-an-error-handling-path-in-mtk_i2c_p.patch +mei-hbm-drop-capability-response-on-early-shutdown.patch +mei-me-add-raptor-lake-point-s-did.patch +comedi-vmk80xx-fix-expression-for-tx-buffer-size.patch