From fd6ca2064e834883a588522d8c6c2ca0e5bc8ec0 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 15 Sep 2022 08:32:00 -0400 Subject: [PATCH] Fixes for 4.14 Signed-off-by: Sasha Levin --- .../drm-msm-rd-fix-fifo-full-deadlock.patch | 39 +++++++++ ...ienthid-ishtp-hid-client-fix-comment.patch | 34 ++++++++ ...2154-cc2520-add-rc-code-in-cc2520_tx.patch | 35 ++++++++ ...r-wmi-acer-aspire-one-aod270-packard.patch | 59 +++++++++++++ queue-4.14/series | 5 ++ ...device-on-system-reboot-to-avoid-tri.patch | 83 +++++++++++++++++++ 6 files changed, 255 insertions(+) create mode 100644 queue-4.14/drm-msm-rd-fix-fifo-full-deadlock.patch create mode 100644 queue-4.14/hid-ishtp-hid-clienthid-ishtp-hid-client-fix-comment.patch create mode 100644 queue-4.14/ieee802154-cc2520-add-rc-code-in-cc2520_tx.patch create mode 100644 queue-4.14/platform-x86-acer-wmi-acer-aspire-one-aod270-packard.patch create mode 100644 queue-4.14/series create mode 100644 queue-4.14/tg3-disable-tg3-device-on-system-reboot-to-avoid-tri.patch diff --git a/queue-4.14/drm-msm-rd-fix-fifo-full-deadlock.patch b/queue-4.14/drm-msm-rd-fix-fifo-full-deadlock.patch new file mode 100644 index 00000000000..b9c4f9c0e6b --- /dev/null +++ b/queue-4.14/drm-msm-rd-fix-fifo-full-deadlock.patch @@ -0,0 +1,39 @@ +From a7aac83c67f901ac2cee5ee675c49fa69d4d9146 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 7 Aug 2022 09:09:01 -0700 +Subject: drm/msm/rd: Fix FIFO-full deadlock + +From: Rob Clark + +[ Upstream commit 174974d8463b77c2b4065e98513adb204e64de7d ] + +If the previous thing cat'ing $debugfs/rd left the FIFO full, then +subsequent open could deadlock in rd_write() (because open is blocked, +not giving a chance for read() to consume any data in the FIFO). Also +it is generally a good idea to clear out old data from the FIFO. + +Signed-off-by: Rob Clark +Patchwork: https://patchwork.freedesktop.org/patch/496706/ +Link: https://lore.kernel.org/r/20220807160901.2353471-2-robdclark@gmail.com +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/msm/msm_rd.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c +index bdce1c9434c6c..54891cbf4f50f 100644 +--- a/drivers/gpu/drm/msm/msm_rd.c ++++ b/drivers/gpu/drm/msm/msm_rd.c +@@ -193,6 +193,9 @@ static int rd_open(struct inode *inode, struct file *file) + file->private_data = rd; + rd->open = true; + ++ /* Reset fifo to clear any previously unread data: */ ++ rd->fifo.head = rd->fifo.tail = 0; ++ + /* the parsing tools need to know gpu-id to know which + * register database to load. + */ +-- +2.35.1 + diff --git a/queue-4.14/hid-ishtp-hid-clienthid-ishtp-hid-client-fix-comment.patch b/queue-4.14/hid-ishtp-hid-clienthid-ishtp-hid-client-fix-comment.patch new file mode 100644 index 00000000000..4f010559c26 --- /dev/null +++ b/queue-4.14/hid-ishtp-hid-clienthid-ishtp-hid-client-fix-comment.patch @@ -0,0 +1,34 @@ +From c157e30e5fb4e20038e0628723d88c874a376542 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 4 Aug 2022 08:58:14 +0800 +Subject: HID: ishtp-hid-clientHID: ishtp-hid-client: Fix comment typo + +From: Jason Wang + +[ Upstream commit 94553f8a218540d676efbf3f7827ed493d1057cf ] + +The double `like' is duplicated in the comment, remove one. + +Signed-off-by: Jason Wang +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + drivers/hid/intel-ish-hid/ishtp-hid.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.h b/drivers/hid/intel-ish-hid/ishtp-hid.h +index f5c7eb79b7b53..fa16983007f60 100644 +--- a/drivers/hid/intel-ish-hid/ishtp-hid.h ++++ b/drivers/hid/intel-ish-hid/ishtp-hid.h +@@ -118,7 +118,7 @@ struct report_list { + * @multi_packet_cnt: Count of fragmented packet count + * + * This structure is used to store completion flags and per client data like +- * like report description, number of HID devices etc. ++ * report description, number of HID devices etc. + */ + struct ishtp_cl_data { + /* completion flags */ +-- +2.35.1 + diff --git a/queue-4.14/ieee802154-cc2520-add-rc-code-in-cc2520_tx.patch b/queue-4.14/ieee802154-cc2520-add-rc-code-in-cc2520_tx.patch new file mode 100644 index 00000000000..368bf31a094 --- /dev/null +++ b/queue-4.14/ieee802154-cc2520-add-rc-code-in-cc2520_tx.patch @@ -0,0 +1,35 @@ +From c9a9ec5b87ac3410abe27018b79e3e54f17b5aaa Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 29 Aug 2022 15:12:59 +0800 +Subject: ieee802154: cc2520: add rc code in cc2520_tx() + +From: Li Qiong + +[ Upstream commit ffd7bdddaab193c38416fd5dd416d065517d266e ] + +The rc code is 0 at the error path "status & CC2520_STATUS_TX_UNDERFLOW". +Assign rc code with '-EINVAL' at this error path to fix it. + +Signed-off-by: Li Qiong +Link: https://lore.kernel.org/r/20220829071259.18330-1-liqiong@nfschina.com +Signed-off-by: Stefan Schmidt +Signed-off-by: Sasha Levin +--- + drivers/net/ieee802154/cc2520.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c +index d50add705a79a..436cf2007138a 100644 +--- a/drivers/net/ieee802154/cc2520.c ++++ b/drivers/net/ieee802154/cc2520.c +@@ -512,6 +512,7 @@ cc2520_tx(struct ieee802154_hw *hw, struct sk_buff *skb) + goto err_tx; + + if (status & CC2520_STATUS_TX_UNDERFLOW) { ++ rc = -EINVAL; + dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n"); + goto err_tx; + } +-- +2.35.1 + diff --git a/queue-4.14/platform-x86-acer-wmi-acer-aspire-one-aod270-packard.patch b/queue-4.14/platform-x86-acer-wmi-acer-aspire-one-aod270-packard.patch new file mode 100644 index 00000000000..22b3daa8c03 --- /dev/null +++ b/queue-4.14/platform-x86-acer-wmi-acer-aspire-one-aod270-packard.patch @@ -0,0 +1,59 @@ +From dc24acafbefee35f2f107a07771dee17b0e9a848 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 29 Aug 2022 18:35:44 +0200 +Subject: platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot + keymap fixes + +From: Hans de Goede + +[ Upstream commit c3b82d26bc85f5fc2fef5ec8cce17c89633a55a8 ] + +2 keymap fixes for the Acer Aspire One AOD270 and the same hardware +rebranded as Packard Bell Dot SC: + +1. The F2 key is marked with a big '?' symbol on the Packard Bell Dot SC, +this sends WMID_HOTKEY_EVENTs with a scancode of 0x27 add a mapping +for this. + +2. Scancode 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate +input event with the "Video Bus" input device events. But on these devices +the "Video Bus" does not send events for this key. Map 0x61 to KEY_UNKNOWN +instead of using KE_IGNORE so that udev/hwdb can override it on these devs. + +Signed-off-by: Hans de Goede +Link: https://lore.kernel.org/r/20220829163544.5288-1-hdegoede@redhat.com +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/acer-wmi.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c +index 5ddc359135a85..8b4af118ff94b 100644 +--- a/drivers/platform/x86/acer-wmi.c ++++ b/drivers/platform/x86/acer-wmi.c +@@ -106,6 +106,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { + {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ + {KE_KEY, 0x23, {KEY_PROG3} }, /* P_Key */ + {KE_KEY, 0x24, {KEY_PROG4} }, /* Social networking_Key */ ++ {KE_KEY, 0x27, {KEY_HELP} }, + {KE_KEY, 0x29, {KEY_PROG3} }, /* P_Key for TM8372 */ + {KE_IGNORE, 0x41, {KEY_MUTE} }, + {KE_IGNORE, 0x42, {KEY_PREVIOUSSONG} }, +@@ -119,7 +120,13 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { + {KE_IGNORE, 0x48, {KEY_VOLUMEUP} }, + {KE_IGNORE, 0x49, {KEY_VOLUMEDOWN} }, + {KE_IGNORE, 0x4a, {KEY_VOLUMEDOWN} }, +- {KE_IGNORE, 0x61, {KEY_SWITCHVIDEOMODE} }, ++ /* ++ * 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event ++ * with the "Video Bus" input device events. But sometimes it is not ++ * a dup. Map it to KEY_UNKNOWN instead of using KE_IGNORE so that ++ * udev/hwdb can override it on systems where it is not a dup. ++ */ ++ {KE_KEY, 0x61, {KEY_UNKNOWN} }, + {KE_IGNORE, 0x62, {KEY_BRIGHTNESSUP} }, + {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, + {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */ +-- +2.35.1 + diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..32e0f2a8fee --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1,5 @@ +drm-msm-rd-fix-fifo-full-deadlock.patch +hid-ishtp-hid-clienthid-ishtp-hid-client-fix-comment.patch +tg3-disable-tg3-device-on-system-reboot-to-avoid-tri.patch +ieee802154-cc2520-add-rc-code-in-cc2520_tx.patch +platform-x86-acer-wmi-acer-aspire-one-aod270-packard.patch diff --git a/queue-4.14/tg3-disable-tg3-device-on-system-reboot-to-avoid-tri.patch b/queue-4.14/tg3-disable-tg3-device-on-system-reboot-to-avoid-tri.patch new file mode 100644 index 00000000000..51e55362bcb --- /dev/null +++ b/queue-4.14/tg3-disable-tg3-device-on-system-reboot-to-avoid-tri.patch @@ -0,0 +1,83 @@ +From c2960903edf52c325ff8fe4718475eb56736605a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 26 Aug 2022 08:25:30 +0800 +Subject: tg3: Disable tg3 device on system reboot to avoid triggering AER + +From: Kai-Heng Feng + +[ Upstream commit 2ca1c94ce0b65a2ce7512b718f3d8a0fe6224bca ] + +Commit d60cd06331a3 ("PM: ACPI: reboot: Use S5 for reboot") caused a +reboot hang on one Dell servers so the commit was reverted. + +Someone managed to collect the AER log and it's caused by MSI: +[ 148.762067] ACPI: Preparing to enter system sleep state S5 +[ 148.794638] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 5 +[ 148.803731] {1}[Hardware Error]: event severity: recoverable +[ 148.810191] {1}[Hardware Error]: Error 0, type: fatal +[ 148.816088] {1}[Hardware Error]: section_type: PCIe error +[ 148.822391] {1}[Hardware Error]: port_type: 0, PCIe end point +[ 148.829026] {1}[Hardware Error]: version: 3.0 +[ 148.834266] {1}[Hardware Error]: command: 0x0006, status: 0x0010 +[ 148.841140] {1}[Hardware Error]: device_id: 0000:04:00.0 +[ 148.847309] {1}[Hardware Error]: slot: 0 +[ 148.852077] {1}[Hardware Error]: secondary_bus: 0x00 +[ 148.857876] {1}[Hardware Error]: vendor_id: 0x14e4, device_id: 0x165f +[ 148.865145] {1}[Hardware Error]: class_code: 020000 +[ 148.870845] {1}[Hardware Error]: aer_uncor_status: 0x00100000, aer_uncor_mask: 0x00010000 +[ 148.879842] {1}[Hardware Error]: aer_uncor_severity: 0x000ef030 +[ 148.886575] {1}[Hardware Error]: TLP Header: 40000001 0000030f 90028090 00000000 +[ 148.894823] tg3 0000:04:00.0: AER: aer_status: 0x00100000, aer_mask: 0x00010000 +[ 148.902795] tg3 0000:04:00.0: AER: [20] UnsupReq (First) +[ 148.910234] tg3 0000:04:00.0: AER: aer_layer=Transaction Layer, aer_agent=Requester ID +[ 148.918806] tg3 0000:04:00.0: AER: aer_uncor_severity: 0x000ef030 +[ 148.925558] tg3 0000:04:00.0: AER: TLP Header: 40000001 0000030f 90028090 00000000 + +The MSI is probably raised by incoming packets, so power down the device +and disable bus mastering to stop the traffic, as user confirmed this +approach works. + +In addition to that, be extra safe and cancel reset task if it's running. + +Cc: Josef Bacik +Link: https://lore.kernel.org/all/b8db79e6857c41dab4ef08bdf826ea7c47e3bafc.1615947283.git.josef@toxicpanda.com/ +BugLink: https://bugs.launchpad.net/bugs/1917471 +Signed-off-by: Kai-Heng Feng +Reviewed-by: Michael Chan +Link: https://lore.kernel.org/r/20220826002530.1153296-1-kai.heng.feng@canonical.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/broadcom/tg3.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c +index 480179ddc45b6..3279a6e48f3b4 100644 +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -18157,16 +18157,20 @@ static void tg3_shutdown(struct pci_dev *pdev) + struct net_device *dev = pci_get_drvdata(pdev); + struct tg3 *tp = netdev_priv(dev); + ++ tg3_reset_task_cancel(tp); ++ + rtnl_lock(); ++ + netif_device_detach(dev); + + if (netif_running(dev)) + dev_close(dev); + +- if (system_state == SYSTEM_POWER_OFF) +- tg3_power_down(tp); ++ tg3_power_down(tp); + + rtnl_unlock(); ++ ++ pci_disable_device(pdev); + } + + /** +-- +2.35.1 + -- 2.47.3