]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jul 2022 15:38:11 +0000 (17:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jul 2022 15:38:11 +0000 (17:38 +0200)
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

queue-5.10/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch
queue-5.10/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch
queue-5.10/nexthop-fix-data-races-around-nexthop_compat_mode.patch
queue-5.10/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch
queue-5.10/series
queue-5.10/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch [new file with mode: 0644]
queue-5.10/usb-dwc3-gadget-fix-event-pending-check.patch [new file with mode: 0644]
queue-5.10/usb-serial-ftdi_sio-add-belimo-device-ids.patch [new file with mode: 0644]
queue-5.10/usb-typec-add-missing-uevent-when-partner-support-pd.patch [new file with mode: 0644]

index 57b5e50fa675cc1d0a3105a007aa17a3114b4508..bd4ae9ef042b5e3f2996eab048df3107b2b14e68 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- 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),
index 63ce1a8d49564127a8d574e60bb668800f6380d2..856de50c56293823152dd70147afedaffeb34ec9 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- 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),
index e36575b09eed49ca1c7d7c5f8131a46ea8def9c2..2e363a0b76a593a3b1e84b946838336cf434f747 100644 (file)
@@ -54,7 +54,7 @@ Signed-off-by: Sasha Levin <sashal@kernel.org>
  
 --- 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;
  
index 7755c3406e8a58c351717c6831d3a7f709dea120..e67bcad8834371e503b70756b58a45b58192478a 100644 (file)
@@ -32,8 +32,8 @@ Signed-off-by: Sasha Levin <sashal@kernel.org>
                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) {
index faa534acc22af266fc18a1697128ae2ad0280d92..e122a6027b18c6282abfad17dba62d2162248fbe 100644 (file)
@@ -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 (file)
index 0000000..8270a6f
--- /dev/null
@@ -0,0 +1,45 @@
+From f7e35e4bf1e8dc2c8cbd5e0955dc1bd58558dae0 Mon Sep 17 00:00:00 2001
+From: Chanho Park <chanho61.park@samsung.com>
+Date: Mon, 27 Jun 2022 15:51:13 +0900
+Subject: tty: serial: samsung_tty: set dma burst_size to 1
+
+From: Chanho Park <chanho61.park@samsung.com>
+
+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 <stable@kernel.org>
+Cc: Marek Szyprowski <m.szyprowski@samsung.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Signed-off-by: Chanho Park <chanho61.park@samsung.com>
+Link: https://lore.kernel.org/r/20220627065113.139520-1-chanho61.park@samsung.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..6e4a03b
--- /dev/null
@@ -0,0 +1,51 @@
+From 7441b273388b9a59d8387a03ffbbca9d5af6348c Mon Sep 17 00:00:00 2001
+From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Date: Mon, 27 Jun 2022 18:41:19 -0700
+Subject: usb: dwc3: gadget: Fix event pending check
+
+From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+
+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 <Thinh.Nguyen@synopsys.com>
+Link: https://lore.kernel.org/r/8670aaf1cf52e7d1e6df2a827af2d77263b93b75.1656380429.git.Thinh.Nguyen@synopsys.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..ea5f0bd
--- /dev/null
@@ -0,0 +1,47 @@
+From 7c239a071d1f04b7137789810807b4108d475c72 Mon Sep 17 00:00:00 2001
+From: Lucien Buchmann <lucien.buchmann@gmx.net>
+Date: Sat, 25 Jun 2022 02:17:44 +0200
+Subject: USB: serial: ftdi_sio: add Belimo device ids
+
+From: Lucien Buchmann <lucien.buchmann@gmx.net>
+
+commit 7c239a071d1f04b7137789810807b4108d475c72 upstream.
+
+Those two product ids are known.
+
+Signed-off-by: Lucien Buchmann <lucien.buchmann@gmx.net>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..36b4e87
--- /dev/null
@@ -0,0 +1,37 @@
+From 6fb9e1d94789e8ee5a258a23bc588693f743fd6c Mon Sep 17 00:00:00 2001
+From: Linyu Yuan <quic_linyyuan@quicinc.com>
+Date: Fri, 1 Jul 2022 16:08:54 +0800
+Subject: usb: typec: add missing uevent when partner support PD
+
+From: Linyu Yuan <quic_linyyuan@quicinc.com>
+
+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 <quic_linyyuan@quicinc.com>
+Link: https://lore.kernel.org/r/1656662934-10226-1-git-send-email-quic_linyyuan@quicinc.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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);
+       }