From 3e46011e1078df303e22c1f4fbd8ff7074d99f1f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 18 Jul 2022 17:38:11 +0200 Subject: [PATCH] 5.10-stable patches added patches: tty-serial-samsung_tty-set-dma-burst_size-to-1.patch usb-dwc3-gadget-fix-event-pending-check.patch usb-serial-ftdi_sio-add-belimo-device-ids.patch usb-typec-add-missing-uevent-when-partner-support-pd.patch --- ...the-headset-mic-on-a-xiaomi-s-laptop.patch | 2 +- ...problem-for-a-hp-machine-with-alc671.patch | 2 +- ...ata-races-around-nexthop_compat_mode.patch | 2 +- ...t-print-header-length-mismatch-on-i2.patch | 4 +- queue-5.10/series | 4 ++ ...-samsung_tty-set-dma-burst_size-to-1.patch | 45 ++++++++++++++++ ...-dwc3-gadget-fix-event-pending-check.patch | 51 +++++++++++++++++++ ...erial-ftdi_sio-add-belimo-device-ids.patch | 47 +++++++++++++++++ ...ssing-uevent-when-partner-support-pd.patch | 37 ++++++++++++++ 9 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 queue-5.10/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch create mode 100644 queue-5.10/usb-dwc3-gadget-fix-event-pending-check.patch create mode 100644 queue-5.10/usb-serial-ftdi_sio-add-belimo-device-ids.patch create mode 100644 queue-5.10/usb-typec-add-missing-uevent-when-partner-support-pd.patch diff --git a/queue-5.10/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch b/queue-5.10/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch index 57b5e50fa67..bd4ae9ef042 100644 --- a/queue-5.10/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch +++ b/queue-5.10/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c -@@ -9086,6 +9086,7 @@ static const struct snd_pci_quirk alc269 +@@ -9087,6 +9087,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), diff --git a/queue-5.10/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch b/queue-5.10/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch index 63ce1a8d495..856de50c562 100644 --- a/queue-5.10/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch +++ b/queue-5.10/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c -@@ -10927,6 +10927,7 @@ static const struct snd_pci_quirk alc662 +@@ -10928,6 +10928,7 @@ static const struct snd_pci_quirk alc662 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), diff --git a/queue-5.10/nexthop-fix-data-races-around-nexthop_compat_mode.patch b/queue-5.10/nexthop-fix-data-races-around-nexthop_compat_mode.patch index e36575b09ee..2e363a0b76a 100644 --- a/queue-5.10/nexthop-fix-data-races-around-nexthop_compat_mode.patch +++ b/queue-5.10/nexthop-fix-data-races-around-nexthop_compat_mode.patch @@ -54,7 +54,7 @@ Signed-off-by: Sasha Levin --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -5634,7 +5634,7 @@ static int rt6_fill_node(struct net *net +@@ -5641,7 +5641,7 @@ static int rt6_fill_node(struct net *net if (nexthop_is_blackhole(rt->nh)) rtm->rtm_type = RTN_BLACKHOLE; diff --git a/queue-5.10/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch b/queue-5.10/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch index 7755c3406e8..e67bcad8834 100644 --- a/queue-5.10/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch +++ b/queue-5.10/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch @@ -32,8 +32,8 @@ Signed-off-by: Sasha Levin nfc_err(&client->dev, "Invalid frame length: %u (expected %zu)\n", r, frame_len); -@@ -163,7 +165,9 @@ static int nxp_nci_i2c_nci_read(struct n - skb_put_data(*skb, (void *)&header, NCI_CTRL_HDR_SIZE); +@@ -166,7 +168,9 @@ static int nxp_nci_i2c_nci_read(struct n + return 0; r = i2c_master_recv(client, skb_put(*skb, header.plen), header.plen); - if (r != header.plen) { diff --git a/queue-5.10/series b/queue-5.10/series index faa534acc22..e122a6027b1 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -100,3 +100,7 @@ arm-dts-stm32-use-the-correct-clock-source-for-cec-o.patch revert-can-xilinx_can-limit-canfd-brp-to-2.patch nvme-pci-phison-e16-has-bogus-namespace-ids.patch signal-handling-don-t-use-bug_on-for-debugging.patch +usb-serial-ftdi_sio-add-belimo-device-ids.patch +usb-typec-add-missing-uevent-when-partner-support-pd.patch +usb-dwc3-gadget-fix-event-pending-check.patch +tty-serial-samsung_tty-set-dma-burst_size-to-1.patch diff --git a/queue-5.10/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch b/queue-5.10/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch new file mode 100644 index 00000000000..8270a6f5604 --- /dev/null +++ b/queue-5.10/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch @@ -0,0 +1,45 @@ +From f7e35e4bf1e8dc2c8cbd5e0955dc1bd58558dae0 Mon Sep 17 00:00:00 2001 +From: Chanho Park +Date: Mon, 27 Jun 2022 15:51:13 +0900 +Subject: tty: serial: samsung_tty: set dma burst_size to 1 + +From: Chanho Park + +commit f7e35e4bf1e8dc2c8cbd5e0955dc1bd58558dae0 upstream. + +The src_maxburst and dst_maxburst have been changed to 1 but the settings +of the UCON register aren't changed yet. They should be changed as well +according to the dmaengine slave config. + +Fixes: aa2f80e752c7 ("serial: samsung: fix maxburst parameter for DMA transactions") +Cc: stable +Cc: Marek Szyprowski +Reviewed-by: Krzysztof Kozlowski +Signed-off-by: Chanho Park +Link: https://lore.kernel.org/r/20220627065113.139520-1-chanho61.park@samsung.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/samsung_tty.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/tty/serial/samsung_tty.c ++++ b/drivers/tty/serial/samsung_tty.c +@@ -361,8 +361,7 @@ static void enable_tx_dma(struct s3c24xx + /* Enable tx dma mode */ + ucon = rd_regl(port, S3C2410_UCON); + ucon &= ~(S3C64XX_UCON_TXBURST_MASK | S3C64XX_UCON_TXMODE_MASK); +- ucon |= (dma_get_cache_alignment() >= 16) ? +- S3C64XX_UCON_TXBURST_16 : S3C64XX_UCON_TXBURST_1; ++ ucon |= S3C64XX_UCON_TXBURST_1; + ucon |= S3C64XX_UCON_TXMODE_DMA; + wr_regl(port, S3C2410_UCON, ucon); + +@@ -634,7 +633,7 @@ static void enable_rx_dma(struct s3c24xx + S3C64XX_UCON_DMASUS_EN | + S3C64XX_UCON_TIMEOUT_EN | + S3C64XX_UCON_RXMODE_MASK); +- ucon |= S3C64XX_UCON_RXBURST_16 | ++ ucon |= S3C64XX_UCON_RXBURST_1 | + 0xf << S3C64XX_UCON_TIMEOUT_SHIFT | + S3C64XX_UCON_EMPTYINT_EN | + S3C64XX_UCON_TIMEOUT_EN | diff --git a/queue-5.10/usb-dwc3-gadget-fix-event-pending-check.patch b/queue-5.10/usb-dwc3-gadget-fix-event-pending-check.patch new file mode 100644 index 00000000000..6e4a03be2ba --- /dev/null +++ b/queue-5.10/usb-dwc3-gadget-fix-event-pending-check.patch @@ -0,0 +1,51 @@ +From 7441b273388b9a59d8387a03ffbbca9d5af6348c Mon Sep 17 00:00:00 2001 +From: Thinh Nguyen +Date: Mon, 27 Jun 2022 18:41:19 -0700 +Subject: usb: dwc3: gadget: Fix event pending check + +From: Thinh Nguyen + +commit 7441b273388b9a59d8387a03ffbbca9d5af6348c upstream. + +The DWC3_EVENT_PENDING flag is used to protect against invalid call to +top-half interrupt handler, which can occur when there's a delay in +software detection of the interrupt line deassertion. + +However, the clearing of this flag was done prior to unmasking the +interrupt line, creating opportunity where the top-half handler can +come. This breaks the serialization and creates a race between the +top-half and bottom-half handler, resulting in losing synchronization +between the controller and the driver when processing events. + +To fix this, make sure the clearing of the DWC3_EVENT_PENDING is done at +the end of the bottom-half handler. + +Fixes: d325a1de49d6 ("usb: dwc3: gadget: Prevent losing events in event cache") +Cc: stable@vger.kernel.org +Signed-off-by: Thinh Nguyen +Link: https://lore.kernel.org/r/8670aaf1cf52e7d1e6df2a827af2d77263b93b75.1656380429.git.Thinh.Nguyen@synopsys.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/gadget.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/usb/dwc3/gadget.c ++++ b/drivers/usb/dwc3/gadget.c +@@ -3781,7 +3781,6 @@ static irqreturn_t dwc3_process_event_bu + } + + evt->count = 0; +- evt->flags &= ~DWC3_EVENT_PENDING; + ret = IRQ_HANDLED; + + /* Unmask interrupt */ +@@ -3794,6 +3793,9 @@ static irqreturn_t dwc3_process_event_bu + dwc3_writel(dwc->regs, DWC3_DEV_IMOD(0), dwc->imod_interval); + } + ++ /* Keep the clearing of DWC3_EVENT_PENDING at the end */ ++ evt->flags &= ~DWC3_EVENT_PENDING; ++ + return ret; + } + diff --git a/queue-5.10/usb-serial-ftdi_sio-add-belimo-device-ids.patch b/queue-5.10/usb-serial-ftdi_sio-add-belimo-device-ids.patch new file mode 100644 index 00000000000..ea5f0bd7a8a --- /dev/null +++ b/queue-5.10/usb-serial-ftdi_sio-add-belimo-device-ids.patch @@ -0,0 +1,47 @@ +From 7c239a071d1f04b7137789810807b4108d475c72 Mon Sep 17 00:00:00 2001 +From: Lucien Buchmann +Date: Sat, 25 Jun 2022 02:17:44 +0200 +Subject: USB: serial: ftdi_sio: add Belimo device ids + +From: Lucien Buchmann + +commit 7c239a071d1f04b7137789810807b4108d475c72 upstream. + +Those two product ids are known. + +Signed-off-by: Lucien Buchmann +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/ftdi_sio.c | 3 +++ + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ + 2 files changed, 9 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -1023,6 +1023,9 @@ static const struct usb_device_id id_tab + { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_DISPLAY_PID) }, + { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_LITE_PID) }, + { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_ANALOG_PID) }, ++ /* Belimo Automation devices */ ++ { USB_DEVICE(FTDI_VID, BELIMO_ZTH_PID) }, ++ { USB_DEVICE(FTDI_VID, BELIMO_ZIP_PID) }, + /* ICP DAS I-756xU devices */ + { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, + { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -1569,6 +1569,12 @@ + #define CHETCO_SEASMART_ANALOG_PID 0xA5AF /* SeaSmart Analog Adapter */ + + /* ++ * Belimo Automation ++ */ ++#define BELIMO_ZTH_PID 0x8050 ++#define BELIMO_ZIP_PID 0xC811 ++ ++/* + * Unjo AB + */ + #define UNJO_VID 0x22B7 diff --git a/queue-5.10/usb-typec-add-missing-uevent-when-partner-support-pd.patch b/queue-5.10/usb-typec-add-missing-uevent-when-partner-support-pd.patch new file mode 100644 index 00000000000..36b4e875409 --- /dev/null +++ b/queue-5.10/usb-typec-add-missing-uevent-when-partner-support-pd.patch @@ -0,0 +1,37 @@ +From 6fb9e1d94789e8ee5a258a23bc588693f743fd6c Mon Sep 17 00:00:00 2001 +From: Linyu Yuan +Date: Fri, 1 Jul 2022 16:08:54 +0800 +Subject: usb: typec: add missing uevent when partner support PD + +From: Linyu Yuan + +commit 6fb9e1d94789e8ee5a258a23bc588693f743fd6c upstream. + +System like Android allow user control power role from UI, it is possible +to implement application base on typec uevent to refresh UI, but found +there is chance that UI show different state from typec attribute file. + +In typec_set_pwr_opmode(), when partner support PD, there is no uevent +send to user space which cause the problem. + +Fix it by sending uevent notification when change power mode to PD. + +Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") +Cc: stable@vger.kernel.org +Signed-off-by: Linyu Yuan +Link: https://lore.kernel.org/r/1656662934-10226-1-git-send-email-quic_linyyuan@quicinc.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/typec/class.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/typec/class.c ++++ b/drivers/usb/typec/class.c +@@ -1444,6 +1444,7 @@ void typec_set_pwr_opmode(struct typec_p + partner->usb_pd = 1; + sysfs_notify(&partner_dev->kobj, NULL, + "supports_usb_power_delivery"); ++ kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE); + } + put_device(partner_dev); + } -- 2.47.3