From: Greg Kroah-Hartman Date: Mon, 18 Jul 2022 15:37:47 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.9.324~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5813bed49d51e8da1a77653c65bce34b93d3d0c4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-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 --- diff --git a/queue-4.19/alsa-hda-add-fixup-for-dell-latitidue-e5430.patch b/queue-4.19/alsa-hda-add-fixup-for-dell-latitidue-e5430.patch index 99b02285bf3..8ad9c0bddc2 100644 --- a/queue-4.19/alsa-hda-add-fixup-for-dell-latitidue-e5430.patch +++ b/queue-4.19/alsa-hda-add-fixup-for-dell-latitidue-e5430.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 -@@ -7028,6 +7028,7 @@ static const struct snd_pci_quirk alc269 +@@ -7029,6 +7029,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), diff --git a/queue-4.19/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc221.patch b/queue-4.19/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc221.patch index 0ea0679e6d3..d07be6ed7d9 100644 --- a/queue-4.19/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc221.patch +++ b/queue-4.19/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc221.patch @@ -23,7 +23,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c -@@ -5843,6 +5843,7 @@ enum { +@@ -5844,6 +5844,7 @@ enum { ALC298_FIXUP_LENOVO_SPK_VOLUME, ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, ALC269_FIXUP_ATIV_BOOK_8, @@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman ALC221_FIXUP_HP_MIC_NO_PRESENCE, ALC256_FIXUP_ASUS_HEADSET_MODE, ALC256_FIXUP_ASUS_MIC, -@@ -6641,6 +6642,16 @@ static const struct hda_fixup alc269_fix +@@ -6642,6 +6643,16 @@ static const struct hda_fixup alc269_fix .chained = true, .chain_id = ALC269_FIXUP_NO_SHUTUP }, @@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl[]) { -@@ -7135,6 +7146,7 @@ static const struct snd_pci_quirk alc269 +@@ -7136,6 +7147,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), diff --git a/queue-4.19/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch b/queue-4.19/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch index 01633337c1c..ca1dc50f0e7 100644 --- a/queue-4.19/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch +++ b/queue-4.19/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); -@@ -179,7 +181,9 @@ static int nxp_nci_i2c_nci_read(struct n - skb_put_data(*skb, (void *)&header, NCI_CTRL_HDR_SIZE); +@@ -182,7 +184,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-4.19/series b/queue-4.19/series index a6d279f592d..0865105baae 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -38,3 +38,7 @@ irqchip-or1k-pic-undefine-mask_ack-for-level-trigger.patch x86-clear-.brk-area-at-early-boot.patch arm-dts-stm32-use-the-correct-clock-source-for-cec-o.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-4.19/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch b/queue-4.19/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch new file mode 100644 index 00000000000..e539134fb26 --- /dev/null +++ b/queue-4.19/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.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/tty/serial/samsung.c ++++ b/drivers/tty/serial/samsung.c +@@ -238,8 +238,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); + +@@ -512,7 +511,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-4.19/usb-dwc3-gadget-fix-event-pending-check.patch b/queue-4.19/usb-dwc3-gadget-fix-event-pending-check.patch new file mode 100644 index 00000000000..c92f4d3d0bf --- /dev/null +++ b/queue-4.19/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 +@@ -3187,7 +3187,6 @@ static irqreturn_t dwc3_process_event_bu + } + + evt->count = 0; +- evt->flags &= ~DWC3_EVENT_PENDING; + ret = IRQ_HANDLED; + + /* Unmask interrupt */ +@@ -3200,6 +3199,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-4.19/usb-serial-ftdi_sio-add-belimo-device-ids.patch b/queue-4.19/usb-serial-ftdi_sio-add-belimo-device-ids.patch new file mode 100644 index 00000000000..19320be4754 --- /dev/null +++ b/queue-4.19/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 +@@ -1013,6 +1013,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-4.19/usb-typec-add-missing-uevent-when-partner-support-pd.patch b/queue-4.19/usb-typec-add-missing-uevent-when-partner-support-pd.patch new file mode 100644 index 00000000000..0851d60c28a --- /dev/null +++ b/queue-4.19/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 +@@ -1377,6 +1377,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); + }