]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Apr 2023 17:49:54 +0000 (19:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Apr 2023 17:49:54 +0000 (19:49 +0200)
added patches:
alsa-hda-realtek-add-quirk-for-clevo-x370snw.patch
dt-bindings-serial-renesas-scif-fix-4th-irq-for-4-irq-scifs.patch
iio-adc-ti-ads7950-set-can_sleep-flag-for-gpio-chip.patch
iio-dac-cio-dac-fix-max-dac-write-value-check-for-12-bit.patch
iio-light-cm32181-unregister-second-i2c-client-if-present.patch
nilfs2-fix-potential-uaf-of-struct-nilfs_sc_info-in-nilfs_segctor_thread.patch
nilfs2-fix-sysfs-interface-lifetime.patch
tty-serial-fsl_lpuart-avoid-checking-for-transfer-complete-when-uartctrl_sbk-is-asserted-in-lpuart32_tx_empty.patch
tty-serial-sh-sci-fix-rx-on-rz-g2l-sci.patch
tty-serial-sh-sci-fix-transmit-end-interrupt-handler.patch
usb-serial-cp210x-add-silicon-labs-ifs-usb-datacable-ids.patch
usb-serial-option-add-quectel-rm500u-cn-modem.patch
usb-serial-option-add-telit-fe990-compositions.patch
usb-typec-altmodes-displayport-fix-configure-initial-pin-assignment.patch

15 files changed:
queue-5.10/alsa-hda-realtek-add-quirk-for-clevo-x370snw.patch [new file with mode: 0644]
queue-5.10/dt-bindings-serial-renesas-scif-fix-4th-irq-for-4-irq-scifs.patch [new file with mode: 0644]
queue-5.10/iio-adc-ti-ads7950-set-can_sleep-flag-for-gpio-chip.patch [new file with mode: 0644]
queue-5.10/iio-dac-cio-dac-fix-max-dac-write-value-check-for-12-bit.patch [new file with mode: 0644]
queue-5.10/iio-light-cm32181-unregister-second-i2c-client-if-present.patch [new file with mode: 0644]
queue-5.10/nilfs2-fix-potential-uaf-of-struct-nilfs_sc_info-in-nilfs_segctor_thread.patch [new file with mode: 0644]
queue-5.10/nilfs2-fix-sysfs-interface-lifetime.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/tty-serial-fsl_lpuart-avoid-checking-for-transfer-complete-when-uartctrl_sbk-is-asserted-in-lpuart32_tx_empty.patch [new file with mode: 0644]
queue-5.10/tty-serial-sh-sci-fix-rx-on-rz-g2l-sci.patch [new file with mode: 0644]
queue-5.10/tty-serial-sh-sci-fix-transmit-end-interrupt-handler.patch [new file with mode: 0644]
queue-5.10/usb-serial-cp210x-add-silicon-labs-ifs-usb-datacable-ids.patch [new file with mode: 0644]
queue-5.10/usb-serial-option-add-quectel-rm500u-cn-modem.patch [new file with mode: 0644]
queue-5.10/usb-serial-option-add-telit-fe990-compositions.patch [new file with mode: 0644]
queue-5.10/usb-typec-altmodes-displayport-fix-configure-initial-pin-assignment.patch [new file with mode: 0644]

diff --git a/queue-5.10/alsa-hda-realtek-add-quirk-for-clevo-x370snw.patch b/queue-5.10/alsa-hda-realtek-add-quirk-for-clevo-x370snw.patch
new file mode 100644 (file)
index 0000000..1f27806
--- /dev/null
@@ -0,0 +1,31 @@
+From 36d4d213c6d4fffae2645a601e8ae996de4c3645 Mon Sep 17 00:00:00 2001
+From: Jeremy Soller <jeremy@system76.com>
+Date: Fri, 31 Mar 2023 10:23:17 -0600
+Subject: ALSA: hda/realtek: Add quirk for Clevo X370SNW
+
+From: Jeremy Soller <jeremy@system76.com>
+
+commit 36d4d213c6d4fffae2645a601e8ae996de4c3645 upstream.
+
+Fixes speaker output and headset detection on Clevo X370SNW.
+
+Signed-off-by: Jeremy Soller <jeremy@system76.com>
+Signed-off-by: Tim Crawford <tcrawford@system76.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20230331162317.14992-1-tcrawford@system76.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -2632,6 +2632,7 @@ static const struct snd_pci_quirk alc882
+       SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
+       SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
+       SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
++      SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
+       SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
+       SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
+       SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
diff --git a/queue-5.10/dt-bindings-serial-renesas-scif-fix-4th-irq-for-4-irq-scifs.patch b/queue-5.10/dt-bindings-serial-renesas-scif-fix-4th-irq-for-4-irq-scifs.patch
new file mode 100644 (file)
index 0000000..31ef99a
--- /dev/null
@@ -0,0 +1,43 @@
+From 7b21f329ae0ab6361c0aebfc094db95821490cd1 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Fri, 17 Mar 2023 10:46:57 +0100
+Subject: dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit 7b21f329ae0ab6361c0aebfc094db95821490cd1 upstream.
+
+The fourth interrupt on SCIF variants with four interrupts (RZ/A1) is
+the Break interrupt, not the Transmit End interrupt (like on SCI(g)).
+Update the description and interrupt name to fix this.
+
+Fixes: 384d00fae8e51f8f ("dt-bindings: serial: sh-sci: Convert to json-schema")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Link: https://lore.kernel.org/r/719d1582e0ebbe3d674e3a48fc26295e1475a4c3.1679046394.git.geert+renesas@glider.be
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/serial/renesas,scif.yaml |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml
++++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
+@@ -74,7 +74,7 @@ properties:
+           - description: Error interrupt
+           - description: Receive buffer full interrupt
+           - description: Transmit buffer empty interrupt
+-          - description: Transmit End interrupt
++          - description: Break interrupt
+       - items:
+           - description: Error interrupt
+           - description: Receive buffer full interrupt
+@@ -89,7 +89,7 @@ properties:
+           - const: eri
+           - const: rxi
+           - const: txi
+-          - const: tei
++          - const: bri
+       - items:
+           - const: eri
+           - const: rxi
diff --git a/queue-5.10/iio-adc-ti-ads7950-set-can_sleep-flag-for-gpio-chip.patch b/queue-5.10/iio-adc-ti-ads7950-set-can_sleep-flag-for-gpio-chip.patch
new file mode 100644 (file)
index 0000000..2aecfc4
--- /dev/null
@@ -0,0 +1,37 @@
+From 363c7dc72f79edd55bf1c4380e0fbf7f1bbc2c86 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Sun, 12 Mar 2023 14:09:33 -0700
+Subject: iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit 363c7dc72f79edd55bf1c4380e0fbf7f1bbc2c86 upstream.
+
+The ads7950 uses a mutex as well as SPI transfers in its GPIO callbacks.
+This means these callbacks can sleep and the `can_sleep` flag should be
+set.
+
+Having the flag set will make sure that warnings are generated when calling
+any of the callbacks from a potentially non-sleeping context.
+
+Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Acked-by: David Lechner <david@lechnology.com>
+Link: https://lore.kernel.org/r/20230312210933.2275376-1-lars@metafoo.de
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/adc/ti-ads7950.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/iio/adc/ti-ads7950.c
++++ b/drivers/iio/adc/ti-ads7950.c
+@@ -634,6 +634,7 @@ static int ti_ads7950_probe(struct spi_d
+       st->chip.label = dev_name(&st->spi->dev);
+       st->chip.parent = &st->spi->dev;
+       st->chip.owner = THIS_MODULE;
++      st->chip.can_sleep = true;
+       st->chip.base = -1;
+       st->chip.ngpio = TI_ADS7950_NUM_GPIOS;
+       st->chip.get_direction = ti_ads7950_get_direction;
diff --git a/queue-5.10/iio-dac-cio-dac-fix-max-dac-write-value-check-for-12-bit.patch b/queue-5.10/iio-dac-cio-dac-fix-max-dac-write-value-check-for-12-bit.patch
new file mode 100644 (file)
index 0000000..866ca04
--- /dev/null
@@ -0,0 +1,38 @@
+From c3701185ee1973845db088d8b0fc443397ab0eb2 Mon Sep 17 00:00:00 2001
+From: William Breathitt Gray <william.gray@linaro.org>
+Date: Fri, 10 Mar 2023 19:22:48 -0500
+Subject: iio: dac: cio-dac: Fix max DAC write value check for 12-bit
+
+From: William Breathitt Gray <william.gray@linaro.org>
+
+commit c3701185ee1973845db088d8b0fc443397ab0eb2 upstream.
+
+The CIO-DAC series of devices only supports DAC values up to 12-bit
+rather than 16-bit. Trying to write a 16-bit value results in only the
+lower 12 bits affecting the DAC output which is not what the user
+expects. Instead, adjust the DAC write value check to reject values
+larger than 12-bit so that they fail explicitly as invalid for the user.
+
+Fixes: 3b8df5fd526e ("iio: Add IIO support for the Measurement Computing CIO-DAC family")
+Cc: stable@vger.kernel.org
+Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
+Link: https://lore.kernel.org/r/20230311002248.8548-1-william.gray@linaro.org
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/dac/cio-dac.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/iio/dac/cio-dac.c
++++ b/drivers/iio/dac/cio-dac.c
+@@ -66,8 +66,8 @@ static int cio_dac_write_raw(struct iio_
+       if (mask != IIO_CHAN_INFO_RAW)
+               return -EINVAL;
+-      /* DAC can only accept up to a 16-bit value */
+-      if ((unsigned int)val > 65535)
++      /* DAC can only accept up to a 12-bit value */
++      if ((unsigned int)val > 4095)
+               return -EINVAL;
+       priv->chan_out_states[chan->channel] = val;
diff --git a/queue-5.10/iio-light-cm32181-unregister-second-i2c-client-if-present.patch b/queue-5.10/iio-light-cm32181-unregister-second-i2c-client-if-present.patch
new file mode 100644 (file)
index 0000000..0d151cb
--- /dev/null
@@ -0,0 +1,56 @@
+From 099cc90a5a62e68b2fe3a42da011ab929b98bf73 Mon Sep 17 00:00:00 2001
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Date: Thu, 23 Feb 2023 10:00:59 +0800
+Subject: iio: light: cm32181: Unregister second I2C client if present
+
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+
+commit 099cc90a5a62e68b2fe3a42da011ab929b98bf73 upstream.
+
+If a second dummy client that talks to the actual I2C address was
+created in probe(), there should be a proper cleanup on driver and
+device removal to avoid leakage.
+
+So unregister the dummy client via another callback.
+
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Suggested-by: Hans de Goede <hdegoede@redhat.com>
+Fixes: c1e62062ff54 ("iio: light: cm32181: Handle CM3218 ACPI devices with 2 I2C resources")
+Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2152281
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Link: https://lore.kernel.org/r/20230223020059.2013993-1-kai.heng.feng@canonical.com
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/light/cm32181.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/iio/light/cm32181.c
++++ b/drivers/iio/light/cm32181.c
+@@ -429,6 +429,14 @@ static const struct iio_info cm32181_inf
+       .attrs                  = &cm32181_attribute_group,
+ };
++static void cm32181_unregister_dummy_client(void *data)
++{
++      struct i2c_client *client = data;
++
++      /* Unregister the dummy client */
++      i2c_unregister_device(client);
++}
++
+ static int cm32181_probe(struct i2c_client *client)
+ {
+       struct device *dev = &client->dev;
+@@ -458,6 +466,10 @@ static int cm32181_probe(struct i2c_clie
+               client = i2c_acpi_new_device(dev, 1, &board_info);
+               if (IS_ERR(client))
+                       return PTR_ERR(client);
++
++              ret = devm_add_action_or_reset(dev, cm32181_unregister_dummy_client, client);
++              if (ret)
++                      return ret;
+       }
+       cm32181 = iio_priv(indio_dev);
diff --git a/queue-5.10/nilfs2-fix-potential-uaf-of-struct-nilfs_sc_info-in-nilfs_segctor_thread.patch b/queue-5.10/nilfs2-fix-potential-uaf-of-struct-nilfs_sc_info-in-nilfs_segctor_thread.patch
new file mode 100644 (file)
index 0000000..8018025
--- /dev/null
@@ -0,0 +1,55 @@
+From 6be49d100c22ffea3287a4b19d7639d259888e33 Mon Sep 17 00:00:00 2001
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Date: Tue, 28 Mar 2023 02:53:18 +0900
+Subject: nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread()
+
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+
+commit 6be49d100c22ffea3287a4b19d7639d259888e33 upstream.
+
+The finalization of nilfs_segctor_thread() can race with
+nilfs_segctor_kill_thread() which terminates that thread, potentially
+causing a use-after-free BUG as KASAN detected.
+
+At the end of nilfs_segctor_thread(), it assigns NULL to "sc_task" member
+of "struct nilfs_sc_info" to indicate the thread has finished, and then
+notifies nilfs_segctor_kill_thread() of this using waitqueue
+"sc_wait_task" on the struct nilfs_sc_info.
+
+However, here, immediately after the NULL assignment to "sc_task", it is
+possible that nilfs_segctor_kill_thread() will detect it and return to
+continue the deallocation, freeing the nilfs_sc_info structure before the
+thread does the notification.
+
+This fixes the issue by protecting the NULL assignment to "sc_task" and
+its notification, with spinlock "sc_state_lock" of the struct
+nilfs_sc_info.  Since nilfs_segctor_kill_thread() does a final check to
+see if "sc_task" is NULL with "sc_state_lock" locked, this can eliminate
+the race.
+
+Link: https://lkml.kernel.org/r/20230327175318.8060-1-konishi.ryusuke@gmail.com
+Reported-by: syzbot+b08ebcc22f8f3e6be43a@syzkaller.appspotmail.com
+Link: https://lkml.kernel.org/r/00000000000000660d05f7dfa877@google.com
+Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/nilfs2/segment.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/fs/nilfs2/segment.c
++++ b/fs/nilfs2/segment.c
+@@ -2614,11 +2614,10 @@ static int nilfs_segctor_thread(void *ar
+       goto loop;
+  end_thread:
+-      spin_unlock(&sci->sc_state_lock);
+-
+       /* end sync. */
+       sci->sc_task = NULL;
+       wake_up(&sci->sc_wait_task); /* for nilfs_segctor_kill_thread() */
++      spin_unlock(&sci->sc_state_lock);
+       return 0;
+ }
diff --git a/queue-5.10/nilfs2-fix-sysfs-interface-lifetime.patch b/queue-5.10/nilfs2-fix-sysfs-interface-lifetime.patch
new file mode 100644 (file)
index 0000000..1a07ef2
--- /dev/null
@@ -0,0 +1,118 @@
+From 42560f9c92cc43dce75dbf06cc0d840dced39b12 Mon Sep 17 00:00:00 2001
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Date: Fri, 31 Mar 2023 05:55:15 +0900
+Subject: nilfs2: fix sysfs interface lifetime
+
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+
+commit 42560f9c92cc43dce75dbf06cc0d840dced39b12 upstream.
+
+The current nilfs2 sysfs support has issues with the timing of creation
+and deletion of sysfs entries, potentially leading to null pointer
+dereferences, use-after-free, and lockdep warnings.
+
+Some of the sysfs attributes for nilfs2 per-filesystem instance refer to
+metadata file "cpfile", "sufile", or "dat", but
+nilfs_sysfs_create_device_group that creates those attributes is executed
+before the inodes for these metadata files are loaded, and
+nilfs_sysfs_delete_device_group which deletes these sysfs entries is
+called after releasing their metadata file inodes.
+
+Therefore, access to some of these sysfs attributes may occur outside of
+the lifetime of these metadata files, resulting in inode NULL pointer
+dereferences or use-after-free.
+
+In addition, the call to nilfs_sysfs_create_device_group() is made during
+the locking period of the semaphore "ns_sem" of nilfs object, so the
+shrinker call caused by the memory allocation for the sysfs entries, may
+derive lock dependencies "ns_sem" -> (shrinker) -> "locks acquired in
+nilfs_evict_inode()".
+
+Since nilfs2 may acquire "ns_sem" deep in the call stack holding other
+locks via its error handler __nilfs_error(), this causes lockdep to report
+circular locking.  This is a false positive and no circular locking
+actually occurs as no inodes exist yet when
+nilfs_sysfs_create_device_group() is called.  Fortunately, the lockdep
+warnings can be resolved by simply moving the call to
+nilfs_sysfs_create_device_group() out of "ns_sem".
+
+This fixes these sysfs issues by revising where the device's sysfs
+interface is created/deleted and keeping its lifetime within the lifetime
+of the metadata files above.
+
+Link: https://lkml.kernel.org/r/20230330205515.6167-1-konishi.ryusuke@gmail.com
+Fixes: dd70edbde262 ("nilfs2: integrate sysfs support into driver")
+Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Reported-by: syzbot+979fa7f9c0d086fdc282@syzkaller.appspotmail.com
+  Link: https://lkml.kernel.org/r/0000000000003414b505f7885f7e@google.com
+Reported-by: syzbot+5b7d542076d9bddc3c6a@syzkaller.appspotmail.com
+  Link: https://lkml.kernel.org/r/0000000000006ac86605f5f44eb9@google.com
+Cc: Viacheslav Dubeyko <slava@dubeyko.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/nilfs2/super.c     |    2 ++
+ fs/nilfs2/the_nilfs.c |   12 +++++++-----
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+--- a/fs/nilfs2/super.c
++++ b/fs/nilfs2/super.c
+@@ -482,6 +482,7 @@ static void nilfs_put_super(struct super
+               up_write(&nilfs->ns_sem);
+       }
++      nilfs_sysfs_delete_device_group(nilfs);
+       iput(nilfs->ns_sufile);
+       iput(nilfs->ns_cpfile);
+       iput(nilfs->ns_dat);
+@@ -1105,6 +1106,7 @@ nilfs_fill_super(struct super_block *sb,
+       nilfs_put_root(fsroot);
+  failed_unload:
++      nilfs_sysfs_delete_device_group(nilfs);
+       iput(nilfs->ns_sufile);
+       iput(nilfs->ns_cpfile);
+       iput(nilfs->ns_dat);
+--- a/fs/nilfs2/the_nilfs.c
++++ b/fs/nilfs2/the_nilfs.c
+@@ -87,7 +87,6 @@ void destroy_nilfs(struct the_nilfs *nil
+ {
+       might_sleep();
+       if (nilfs_init(nilfs)) {
+-              nilfs_sysfs_delete_device_group(nilfs);
+               brelse(nilfs->ns_sbh[0]);
+               brelse(nilfs->ns_sbh[1]);
+       }
+@@ -305,6 +304,10 @@ int load_nilfs(struct the_nilfs *nilfs,
+               goto failed;
+       }
++      err = nilfs_sysfs_create_device_group(sb);
++      if (unlikely(err))
++              goto sysfs_error;
++
+       if (valid_fs)
+               goto skip_recovery;
+@@ -366,6 +369,9 @@ int load_nilfs(struct the_nilfs *nilfs,
+       goto failed;
+  failed_unload:
++      nilfs_sysfs_delete_device_group(nilfs);
++
++ sysfs_error:
+       iput(nilfs->ns_cpfile);
+       iput(nilfs->ns_sufile);
+       iput(nilfs->ns_dat);
+@@ -697,10 +703,6 @@ int init_nilfs(struct the_nilfs *nilfs,
+       if (err)
+               goto failed_sbh;
+-      err = nilfs_sysfs_create_device_group(sb);
+-      if (err)
+-              goto failed_sbh;
+-
+       set_nilfs_init(nilfs);
+       err = 0;
+  out:
index ed6a4de7ca69a0b5bad138e9545fecedb3d80cd5..346fd565afaece8d84e6d57981ade28b96a09e07 100644 (file)
@@ -18,3 +18,17 @@ sunrpc-only-free-unix-grouplist-after-rcu-settles.patch
 nfsd-callback-request-does-not-use-correct-credentia.patch
 usb-xhci-tegra-fix-sleep-in-atomic-call.patch
 xhci-also-avoid-the-xhci_zero_64b_regs-quirk-with-a-passthrough-iommu.patch
+usb-serial-cp210x-add-silicon-labs-ifs-usb-datacable-ids.patch
+usb-typec-altmodes-displayport-fix-configure-initial-pin-assignment.patch
+usb-serial-option-add-telit-fe990-compositions.patch
+usb-serial-option-add-quectel-rm500u-cn-modem.patch
+iio-adc-ti-ads7950-set-can_sleep-flag-for-gpio-chip.patch
+iio-dac-cio-dac-fix-max-dac-write-value-check-for-12-bit.patch
+iio-light-cm32181-unregister-second-i2c-client-if-present.patch
+tty-serial-sh-sci-fix-transmit-end-interrupt-handler.patch
+tty-serial-sh-sci-fix-rx-on-rz-g2l-sci.patch
+tty-serial-fsl_lpuart-avoid-checking-for-transfer-complete-when-uartctrl_sbk-is-asserted-in-lpuart32_tx_empty.patch
+nilfs2-fix-potential-uaf-of-struct-nilfs_sc_info-in-nilfs_segctor_thread.patch
+nilfs2-fix-sysfs-interface-lifetime.patch
+dt-bindings-serial-renesas-scif-fix-4th-irq-for-4-irq-scifs.patch
+alsa-hda-realtek-add-quirk-for-clevo-x370snw.patch
diff --git a/queue-5.10/tty-serial-fsl_lpuart-avoid-checking-for-transfer-complete-when-uartctrl_sbk-is-asserted-in-lpuart32_tx_empty.patch b/queue-5.10/tty-serial-fsl_lpuart-avoid-checking-for-transfer-complete-when-uartctrl_sbk-is-asserted-in-lpuart32_tx_empty.patch
new file mode 100644 (file)
index 0000000..8f6f66d
--- /dev/null
@@ -0,0 +1,48 @@
+From 9425914f3de6febbd6250395f56c8279676d9c3c Mon Sep 17 00:00:00 2001
+From: Sherry Sun <sherry.sun@nxp.com>
+Date: Thu, 23 Mar 2023 13:44:15 +0800
+Subject: tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty
+
+From: Sherry Sun <sherry.sun@nxp.com>
+
+commit 9425914f3de6febbd6250395f56c8279676d9c3c upstream.
+
+According to LPUART RM, Transmission Complete Flag becomes 0 if queuing
+a break character by writing 1 to CTRL[SBK], so here need to avoid
+checking for transmission complete when UARTCTRL_SBK is asserted,
+otherwise the lpuart32_tx_empty may never get TIOCSER_TEMT.
+
+Commit 2411fd94ceaa("tty: serial: fsl_lpuart: skip waiting for
+transmission complete when UARTCTRL_SBK is asserted") only fix it in
+lpuart32_set_termios(), here also fix it in lpuart32_tx_empty().
+
+Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
+Link: https://lore.kernel.org/r/20230323054415.20363-1-sherry.sun@nxp.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/fsl_lpuart.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/fsl_lpuart.c
++++ b/drivers/tty/serial/fsl_lpuart.c
+@@ -809,11 +809,17 @@ static unsigned int lpuart32_tx_empty(st
+                       struct lpuart_port, port);
+       unsigned long stat = lpuart32_read(port, UARTSTAT);
+       unsigned long sfifo = lpuart32_read(port, UARTFIFO);
++      unsigned long ctrl = lpuart32_read(port, UARTCTRL);
+       if (sport->dma_tx_in_progress)
+               return 0;
+-      if (stat & UARTSTAT_TC && sfifo & UARTFIFO_TXEMPT)
++      /*
++       * LPUART Transmission Complete Flag may never be set while queuing a break
++       * character, so avoid checking for transmission complete when UARTCTRL_SBK
++       * is asserted.
++       */
++      if ((stat & UARTSTAT_TC && sfifo & UARTFIFO_TXEMPT) || ctrl & UARTCTRL_SBK)
+               return TIOCSER_TEMT;
+       return 0;
diff --git a/queue-5.10/tty-serial-sh-sci-fix-rx-on-rz-g2l-sci.patch b/queue-5.10/tty-serial-sh-sci-fix-rx-on-rz-g2l-sci.patch
new file mode 100644 (file)
index 0000000..32c81f3
--- /dev/null
@@ -0,0 +1,33 @@
+From f92ed0cd9328aed918ebb0ebb64d259eccbcc6e7 Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Tue, 21 Mar 2023 11:47:50 +0000
+Subject: tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit f92ed0cd9328aed918ebb0ebb64d259eccbcc6e7 upstream.
+
+SCI IP on RZ/G2L alike SoCs do not need regshift compared to other SCI
+IPs on the SH platform. Currently, it does regshift and configuring Rx
+wrongly. Drop adding regshift for RZ/G2L alike SoCs.
+
+Fixes: dfc80387aefb ("serial: sh-sci: Compute the regshift value for SCI ports")
+Cc: stable@vger.kernel.org
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Link: https://lore.kernel.org/r/20230321114753.75038-3-biju.das.jz@bp.renesas.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/sh-sci.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/sh-sci.c
++++ b/drivers/tty/serial/sh-sci.c
+@@ -2996,7 +2996,7 @@ static int sci_init_single(struct platfo
+       port->flags             = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
+       port->fifosize          = sci_port->params->fifosize;
+-      if (port->type == PORT_SCI) {
++      if (port->type == PORT_SCI && !dev->dev.of_node) {
+               if (sci_port->reg_size >= 0x20)
+                       port->regshift = 2;
+               else
diff --git a/queue-5.10/tty-serial-sh-sci-fix-transmit-end-interrupt-handler.patch b/queue-5.10/tty-serial-sh-sci-fix-transmit-end-interrupt-handler.patch
new file mode 100644 (file)
index 0000000..463cb52
--- /dev/null
@@ -0,0 +1,47 @@
+From b43a18647f03c87e77d50d6fe74904b61b96323e Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Fri, 17 Mar 2023 15:04:03 +0000
+Subject: tty: serial: sh-sci: Fix transmit end interrupt handler
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit b43a18647f03c87e77d50d6fe74904b61b96323e upstream.
+
+The fourth interrupt on SCI port is transmit end interrupt compared to
+the break interrupt on other port types. So, shuffle the interrupts to fix
+the transmit end interrupt handler.
+
+Fixes: e1d0be616186 ("sh-sci: Add h8300 SCI")
+Cc: stable <stable@kernel.org>
+Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Link: https://lore.kernel.org/r/20230317150403.154094-1-biju.das.jz@bp.renesas.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/sh-sci.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/tty/serial/sh-sci.c
++++ b/drivers/tty/serial/sh-sci.c
+@@ -31,6 +31,7 @@
+ #include <linux/ioport.h>
+ #include <linux/ktime.h>
+ #include <linux/major.h>
++#include <linux/minmax.h>
+ #include <linux/module.h>
+ #include <linux/mm.h>
+ #include <linux/of.h>
+@@ -2923,6 +2924,13 @@ static int sci_init_single(struct platfo
+                       sci_port->irqs[i] = platform_get_irq(dev, i);
+       }
++      /*
++       * The fourth interrupt on SCI port is transmit end interrupt, so
++       * shuffle the interrupts.
++       */
++      if (p->type == PORT_SCI)
++              swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]);
++
+       /* The SCI generates several interrupts. They can be muxed together or
+        * connected to different interrupt lines. In the muxed case only one
+        * interrupt resource is specified as there is only one interrupt ID.
diff --git a/queue-5.10/usb-serial-cp210x-add-silicon-labs-ifs-usb-datacable-ids.patch b/queue-5.10/usb-serial-cp210x-add-silicon-labs-ifs-usb-datacable-ids.patch
new file mode 100644 (file)
index 0000000..613fa99
--- /dev/null
@@ -0,0 +1,31 @@
+From 71f8afa2b66e356f435b6141b4a9ccf953e18356 Mon Sep 17 00:00:00 2001
+From: Kees Jan Koster <kjkoster@kjkoster.org>
+Date: Sat, 18 Feb 2023 15:18:30 +0100
+Subject: USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs
+
+From: Kees Jan Koster <kjkoster@kjkoster.org>
+
+commit 71f8afa2b66e356f435b6141b4a9ccf953e18356 upstream.
+
+The Silicon Labs IFS-USB-DATACABLE is used in conjunction with for example
+the Quint UPSes. It is used to enable Modbus communication with the UPS to
+query configuration, power and battery status.
+
+Signed-off-by: Kees Jan Koster <kjkoster@kjkoster.org>
+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/cp210x.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -124,6 +124,7 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */
+       { USB_DEVICE(0x10C4, 0x8281) }, /* Nanotec Plug & Drive */
+       { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */
++      { USB_DEVICE(0x10C4, 0x82AA) }, /* Silicon Labs IFS-USB-DATACABLE used with Quint UPS */
+       { USB_DEVICE(0x10C4, 0x82EF) }, /* CESINEL FALCO 6105 AC Power Supply */
+       { USB_DEVICE(0x10C4, 0x82F1) }, /* CESINEL MEDCAL EFD Earth Fault Detector */
+       { USB_DEVICE(0x10C4, 0x82F2) }, /* CESINEL MEDCAL ST Network Analyzer */
diff --git a/queue-5.10/usb-serial-option-add-quectel-rm500u-cn-modem.patch b/queue-5.10/usb-serial-option-add-quectel-rm500u-cn-modem.patch
new file mode 100644 (file)
index 0000000..06c9766
--- /dev/null
@@ -0,0 +1,132 @@
+From 7708a3858e69db91a8b69487994f33b96d20192a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Tue, 28 Mar 2023 20:41:31 +0200
+Subject: USB: serial: option: add Quectel RM500U-CN modem
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 7708a3858e69db91a8b69487994f33b96d20192a upstream.
+
+This modem supports several modes with a class network function
+and a number of serial functions, all using ff/00/00
+
+The device ID is the same in all modes.
+
+RNDIS mode
+----------
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
+D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=2c7c ProdID=0900 Rev= 4.04
+S:  Manufacturer=Quectel
+S:  Product=RM500U-CN
+S:  SerialNumber=0123456789ABCDEF
+C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
+A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
+E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
+E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+
+ECM mode
+--------
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
+D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=2c7c ProdID=0900 Rev= 4.04
+S:  Manufacturer=Quectel
+S:  Product=RM500U-CN
+S:  SerialNumber=0123456789ABCDEF
+C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
+A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
+E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
+I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
+I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
+E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+
+NCM mode
+--------
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480  MxCh= 0
+D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=2c7c ProdID=0900 Rev= 4.04
+S:  Manufacturer=Quectel
+S:  Product=RM500U-CN
+S:  SerialNumber=0123456789ABCDEF
+C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
+A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm
+E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
+I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
+I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
+E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+
+Reported-by: Andrew Green <askgreen@gmail.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/option.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1198,6 +1198,8 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0xff, 0x30) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0x40) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) },
++      { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0900, 0xff, 0, 0), /* RM500U-CN */
++        .driver_info = ZLP },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
diff --git a/queue-5.10/usb-serial-option-add-telit-fe990-compositions.patch b/queue-5.10/usb-serial-option-add-telit-fe990-compositions.patch
new file mode 100644 (file)
index 0000000..3d952ec
--- /dev/null
@@ -0,0 +1,42 @@
+From 773e8e7d07b753474b2ccd605ff092faaa9e65b9 Mon Sep 17 00:00:00 2001
+From: Enrico Sau <enrico.sau@gmail.com>
+Date: Tue, 14 Mar 2023 10:00:59 +0100
+Subject: USB: serial: option: add Telit FE990 compositions
+
+From: Enrico Sau <enrico.sau@gmail.com>
+
+commit 773e8e7d07b753474b2ccd605ff092faaa9e65b9 upstream.
+
+Add the following Telit FE990 compositions:
+
+0x1080: tty, adb, rmnet, tty, tty, tty, tty
+0x1081: tty, adb, mbim, tty, tty, tty, tty
+0x1082: rndis, tty, adb, tty, tty, tty, tty
+0x1083: tty, adb, ecm, tty, tty, tty, tty
+
+Signed-off-by: Enrico Sau <enrico.sau@gmail.com>
+Link: https://lore.kernel.org/r/20230314090059.77876-1-enrico.sau@gmail.com
+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/option.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1300,6 +1300,14 @@ static const struct usb_device_id option
+         .driver_info = NCTRL(0) | RSVD(1) },
+       { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff),    /* Telit FN990 (PCIe) */
+         .driver_info = RSVD(0) },
++      { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff),    /* Telit FE990 (rmnet) */
++        .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
++      { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff),    /* Telit FE990 (MBIM) */
++        .driver_info = NCTRL(0) | RSVD(1) },
++      { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1082, 0xff),    /* Telit FE990 (RNDIS) */
++        .driver_info = NCTRL(2) | RSVD(3) },
++      { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1083, 0xff),    /* Telit FE990 (ECM) */
++        .driver_info = NCTRL(0) | RSVD(1) },
+       { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
+         .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
+       { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
diff --git a/queue-5.10/usb-typec-altmodes-displayport-fix-configure-initial-pin-assignment.patch b/queue-5.10/usb-typec-altmodes-displayport-fix-configure-initial-pin-assignment.patch
new file mode 100644 (file)
index 0000000..bc8f6bf
--- /dev/null
@@ -0,0 +1,45 @@
+From eddebe39602efe631b83ff8d03f26eba12cfd760 Mon Sep 17 00:00:00 2001
+From: RD Babiera <rdbabiera@google.com>
+Date: Wed, 29 Mar 2023 21:51:59 +0000
+Subject: usb: typec: altmodes/displayport: Fix configure initial pin assignment
+
+From: RD Babiera <rdbabiera@google.com>
+
+commit eddebe39602efe631b83ff8d03f26eba12cfd760 upstream.
+
+While determining the initial pin assignment to be sent in the configure
+message, using the DP_PIN_ASSIGN_DP_ONLY_MASK mask causes the DFP_U to
+send both Pin Assignment C and E when both are supported by the DFP_U and
+UFP_U. The spec (Table 5-7 DFP_U Pin Assignment Selection Mandates,
+VESA DisplayPort Alt Mode Standard v2.0) indicates that the DFP_U never
+selects Pin Assignment E when Pin Assignment C is offered.
+
+Update the DP_PIN_ASSIGN_DP_ONLY_MASK conditional to intially select only
+Pin Assignment C if it is available.
+
+Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
+Cc: stable@vger.kernel.org
+Signed-off-by: RD Babiera <rdbabiera@google.com>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20230329215159.2046932-1-rdbabiera@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/altmodes/displayport.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/typec/altmodes/displayport.c
++++ b/drivers/usb/typec/altmodes/displayport.c
+@@ -101,8 +101,12 @@ static int dp_altmode_configure(struct d
+               if (dp->data.status & DP_STATUS_PREFER_MULTI_FUNC &&
+                   pin_assign & DP_PIN_ASSIGN_MULTI_FUNC_MASK)
+                       pin_assign &= DP_PIN_ASSIGN_MULTI_FUNC_MASK;
+-              else if (pin_assign & DP_PIN_ASSIGN_DP_ONLY_MASK)
++              else if (pin_assign & DP_PIN_ASSIGN_DP_ONLY_MASK) {
+                       pin_assign &= DP_PIN_ASSIGN_DP_ONLY_MASK;
++                      /* Default to pin assign C if available */
++                      if (pin_assign & BIT(DP_PIN_ASSIGN_C))
++                              pin_assign = BIT(DP_PIN_ASSIGN_C);
++              }
+               if (!pin_assign)
+                       return -EINVAL;