--- /dev/null
+From 99248c8902f505ec064cf2b0f74629016f2f4c82 Mon Sep 17 00:00:00 2001
+From: Max McCarthy <mmccarthy@mcintoshlabs.com>
+Date: Tue, 24 Oct 2023 12:30:19 +0000
+Subject: ALSA: usb-audio: add quirk flag to enable native DSD for McIntosh devices
+
+From: Max McCarthy <mmccarthy@mcintoshlabs.com>
+
+commit 99248c8902f505ec064cf2b0f74629016f2f4c82 upstream.
+
+McIntosh devices supporting native DSD require the feature to be
+explicitly exposed. Add a flag that fixes an issue where DSD audio was
+defaulting to DSD over PCM instead of delivering raw DSD data.
+
+Signed-off-by: Max McCarthy <mmccarthy@mcintoshlabs.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/BL0PR13MB4433226005162D186A8DFF4AD6DFA@BL0PR13MB4433.namprd13.prod.outlook.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/quirks.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -2220,6 +2220,8 @@ static const struct usb_audio_quirk_flag
+ QUIRK_FLAG_DSD_RAW),
+ VENDOR_FLG(0x2ab6, /* T+A devices */
+ QUIRK_FLAG_DSD_RAW),
++ VENDOR_FLG(0x2afd, /* McIntosh Laboratory, Inc. */
++ QUIRK_FLAG_DSD_RAW),
+ VENDOR_FLG(0x2d87, /* Cayin device */
+ QUIRK_FLAG_DSD_RAW),
+ VENDOR_FLG(0x3336, /* HEM devices */
--- /dev/null
+From 41e9cdea9c4ab6606ca462ff4ec901a82d022c05 Mon Sep 17 00:00:00 2001
+From: Janne Grunau <j@jannau.net>
+Date: Mon, 16 Oct 2023 09:13:08 +0200
+Subject: Bluetooth: hci_bcm4377: Mark bcm4378/bcm4387 as BROKEN_LE_CODED
+
+From: Janne Grunau <j@jannau.net>
+
+commit 41e9cdea9c4ab6606ca462ff4ec901a82d022c05 upstream.
+
+bcm4378 and bcm4387 claim to support LE Coded PHY but fail to pair
+(reliably) with BLE devices if it is enabled.
+On bcm4378 pairing usually succeeds after 2-3 tries. On bcm4387
+pairing appears to be completely broken.
+
+Cc: stable@vger.kernel.org # 6.4.y+
+Link: https://discussion.fedoraproject.org/t/mx-master-3-bluetooth-mouse-doesnt-connect/87072/33
+Link: https://github.com/AsahiLinux/linux/issues/177
+Fixes: 288c90224eec ("Bluetooth: Enable all supported LE PHY by default")
+Signed-off-by: Janne Grunau <j@jannau.net>
+Reviewed-by: Eric Curtin <ecurtin@redhat.com>
+Reviewed-by: Neal Gompa <neal@gompa.dev>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/hci_bcm4377.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
+index 19ad0e788646..a61757835695 100644
+--- a/drivers/bluetooth/hci_bcm4377.c
++++ b/drivers/bluetooth/hci_bcm4377.c
+@@ -512,6 +512,7 @@ struct bcm4377_hw {
+ unsigned long disable_aspm : 1;
+ unsigned long broken_ext_scan : 1;
+ unsigned long broken_mws_transport_config : 1;
++ unsigned long broken_le_coded : 1;
+
+ int (*send_calibration)(struct bcm4377_data *bcm4377);
+ int (*send_ptb)(struct bcm4377_data *bcm4377,
+@@ -2372,6 +2373,8 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ set_bit(HCI_QUIRK_BROKEN_MWS_TRANSPORT_CONFIG, &hdev->quirks);
+ if (bcm4377->hw->broken_ext_scan)
+ set_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &hdev->quirks);
++ if (bcm4377->hw->broken_le_coded)
++ set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
+
+ pci_set_drvdata(pdev, bcm4377);
+ hci_set_drvdata(hdev, bcm4377);
+@@ -2461,6 +2464,7 @@ static const struct bcm4377_hw bcm4377_hw_variants[] = {
+ .bar0_core2_window2 = 0x18107000,
+ .has_bar0_core2_window2 = true,
+ .broken_mws_transport_config = true,
++ .broken_le_coded = true,
+ .send_calibration = bcm4378_send_calibration,
+ .send_ptb = bcm4378_send_ptb,
+ },
+@@ -2474,6 +2478,7 @@ static const struct bcm4377_hw bcm4377_hw_variants[] = {
+ .has_bar0_core2_window2 = true,
+ .clear_pciecfg_subsystem_ctrl_bit19 = true,
+ .broken_mws_transport_config = true,
++ .broken_le_coded = true,
+ .send_calibration = bcm4387_send_calibration,
+ .send_ptb = bcm4378_send_ptb,
+ },
+--
+2.42.0
+
--- /dev/null
+From 0c01b20fb50ba63c03841aa83070dc59c3b1b02f Mon Sep 17 00:00:00 2001
+From: Francesco Dolcini <francesco.dolcini@toradex.com>
+Date: Thu, 19 Oct 2023 17:48:34 +0200
+Subject: dt-bindings: serial: rs485: Add rs485-rts-active-high
+
+From: Francesco Dolcini <francesco.dolcini@toradex.com>
+
+commit 0c01b20fb50ba63c03841aa83070dc59c3b1b02f upstream.
+
+Add rs485-rts-active-high property, this is a legacy property
+used by 8250_omap.
+
+This fixes the following make dt_binding_check warning:
+
+Documentation/devicetree/bindings/serial/8250_omap.yaml:
+rs485-rts-active-high: missing type definition
+
+Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Closes: https://lore.kernel.org/all/CAMuHMdUkPiA=o_QLyuwsTYW7y1ksCjHAqyNSHFx2QZ-dP-HGsQ@mail.gmail.com/
+Fixes: 403e97d6ab2c ("dt-bindings: serial: 8250_omap: add rs485-rts-active-high")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Link: https://lore.kernel.org/r/20231019154834.41721-1-francesco@dolcini.it
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/serial/rs485.yaml | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Documentation/devicetree/bindings/serial/rs485.yaml b/Documentation/devicetree/bindings/serial/rs485.yaml
+index 303a443d9e29..9418fd66a8e9 100644
+--- a/Documentation/devicetree/bindings/serial/rs485.yaml
++++ b/Documentation/devicetree/bindings/serial/rs485.yaml
+@@ -29,6 +29,10 @@ properties:
+ default: 0
+ maximum: 100
+
++ rs485-rts-active-high:
++ description: drive RTS high when sending (this is the default).
++ $ref: /schemas/types.yaml#/definitions/flag
++
+ rs485-rts-active-low:
+ description: drive RTS low when sending (default is high).
+ $ref: /schemas/types.yaml#/definitions/flag
+--
+2.42.0
+
--- /dev/null
+From 8293703a492ae97c86af27c75b76e6239ec86483 Mon Sep 17 00:00:00 2001
+From: Siddharth Vadapalli <s-vadapalli@ti.com>
+Date: Fri, 20 Oct 2023 17:32:48 +0530
+Subject: misc: pci_endpoint_test: Add deviceID for J721S2 PCIe EP device support
+
+From: Siddharth Vadapalli <s-vadapalli@ti.com>
+
+commit 8293703a492ae97c86af27c75b76e6239ec86483 upstream.
+
+Add DEVICE_ID for J721S2 and enable support for endpoints configured
+with this DEVICE_ID in the pci_endpoint_test driver.
+
+Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
+Cc: stable <stable@kernel.org>
+Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+Link: https://lore.kernel.org/r/20231020120248.3168406-1-s-vadapalli@ti.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/pci_endpoint_test.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/misc/pci_endpoint_test.c
++++ b/drivers/misc/pci_endpoint_test.c
+@@ -71,6 +71,7 @@
+ #define PCI_DEVICE_ID_TI_AM654 0xb00c
+ #define PCI_DEVICE_ID_TI_J7200 0xb00f
+ #define PCI_DEVICE_ID_TI_AM64 0xb010
++#define PCI_DEVICE_ID_TI_J721S2 0xb013
+ #define PCI_DEVICE_ID_LS1088A 0x80c0
+ #define PCI_DEVICE_ID_IMX8 0x0808
+
+@@ -999,6 +1000,9 @@ static const struct pci_device_id pci_en
+ { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_AM64),
+ .driver_data = (kernel_ulong_t)&j721e_data,
+ },
++ { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_J721S2),
++ .driver_data = (kernel_ulong_t)&j721e_data,
++ },
+ { }
+ };
+ MODULE_DEVICE_TABLE(pci, pci_endpoint_test_tbl);
--- /dev/null
+From 7e6f3b6d2c352b5fde37ce3fed83bdf6172eebd4 Mon Sep 17 00:00:00 2001
+From: Vicki Pfau <vi@endrift.com>
+Date: Wed, 27 Sep 2023 13:22:12 -0700
+Subject: PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
+
+From: Vicki Pfau <vi@endrift.com>
+
+commit 7e6f3b6d2c352b5fde37ce3fed83bdf6172eebd4 upstream.
+
+The AMD VanGogh SoC contains a DesignWare USB3 Dual-Role Device that can be
+operated as either a USB Host or a USB Device, similar to on the AMD Nolan
+platform.
+
+be6646bfbaec ("PCI: Prevent xHCI driver from claiming AMD Nolan USB3 DRD
+device") added a quirk to let the dwc3 driver claim the Nolan device since
+it provides more specific support.
+
+Extend that quirk to include the VanGogh SoC USB3 device.
+
+Link: https://lore.kernel.org/r/20230927202212.2388216-1-vi@endrift.com
+Signed-off-by: Vicki Pfau <vi@endrift.com>
+[bhelgaas: include be6646bfbaec reference, add stable tag]
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Cc: stable@vger.kernel.org # v3.19+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pci/quirks.c | 8 +++++---
+ include/linux/pci_ids.h | 1 +
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -688,7 +688,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
+ /*
+ * In the AMD NL platform, this device ([1022:7912]) has a class code of
+ * PCI_CLASS_SERIAL_USB_XHCI (0x0c0330), which means the xhci driver will
+- * claim it.
++ * claim it. The same applies on the VanGogh platform device ([1022:163a]).
+ *
+ * But the dwc3 driver is a more specific driver for this device, and we'd
+ * prefer to use it instead of xhci. To prevent xhci from claiming the
+@@ -696,7 +696,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
+ * defines as "USB device (not host controller)". The dwc3 driver can then
+ * claim it based on its Vendor and Device ID.
+ */
+-static void quirk_amd_nl_class(struct pci_dev *pdev)
++static void quirk_amd_dwc_class(struct pci_dev *pdev)
+ {
+ u32 class = pdev->class;
+
+@@ -706,7 +706,9 @@ static void quirk_amd_nl_class(struct pc
+ class, pdev->class);
+ }
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB,
+- quirk_amd_nl_class);
++ quirk_amd_dwc_class);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VANGOGH_USB,
++ quirk_amd_dwc_class);
+
+ /*
+ * Synopsys USB 3.x host HAPS platform has a class code of
+--- a/include/linux/pci_ids.h
++++ b/include/linux/pci_ids.h
+@@ -579,6 +579,7 @@
+ #define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3
+ #define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb
+ #define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
++#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a
+ #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
+ #define PCI_DEVICE_ID_AMD_LANCE 0x2000
+ #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
+++ /dev/null
-From 06754e6088e2a23706931b2142218aa90b409cfa Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 20 Oct 2023 14:06:58 -0700
-Subject: r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE
-
-From: Douglas Anderson <dianders@chromium.org>
-
-[ Upstream commit 715f67f33af45ce2cc3a5b1ef133cc8c8e7787b0 ]
-
-Whenever the RTL8152_UNPLUG is set that just tells the driver that all
-accesses will fail and we should just immediately bail. A future patch
-will use this same concept at a time when the driver hasn't actually
-been unplugged but is about to be reset. Rename the flag in
-preparation for the future patch.
-
-This is a no-op change and just a search and replace.
-
-Signed-off-by: Douglas Anderson <dianders@chromium.org>
-Reviewed-by: Grant Grundler <grundler@chromium.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/usb/r8152.c | 96 ++++++++++++++++++++---------------------
- 1 file changed, 48 insertions(+), 48 deletions(-)
-
-diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
-index b64df36fbb115..212043db5cbe5 100644
---- a/drivers/net/usb/r8152.c
-+++ b/drivers/net/usb/r8152.c
-@@ -764,7 +764,7 @@ enum rtl_register_content {
-
- /* rtl8152 flags */
- enum rtl8152_flags {
-- RTL8152_UNPLUG = 0,
-+ RTL8152_INACCESSIBLE = 0,
- RTL8152_SET_RX_MODE,
- WORK_ENABLE,
- RTL8152_LINK_CHG,
-@@ -1245,7 +1245,7 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
- static void rtl_set_unplug(struct r8152 *tp)
- {
- if (tp->udev->state == USB_STATE_NOTATTACHED) {
-- set_bit(RTL8152_UNPLUG, &tp->flags);
-+ set_bit(RTL8152_INACCESSIBLE, &tp->flags);
- smp_mb__after_atomic();
- }
- }
-@@ -1256,7 +1256,7 @@ static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size,
- u16 limit = 64;
- int ret = 0;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- /* both size and indix must be 4 bytes align */
-@@ -1300,7 +1300,7 @@ static int generic_ocp_write(struct r8152 *tp, u16 index, u16 byteen,
- u16 byteen_start, byteen_end, byen;
- u16 limit = 512;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- /* both size and indix must be 4 bytes align */
-@@ -1530,7 +1530,7 @@ static int read_mii_word(struct net_device *netdev, int phy_id, int reg)
- struct r8152 *tp = netdev_priv(netdev);
- int ret;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- if (phy_id != R8152_PHY_ID)
-@@ -1546,7 +1546,7 @@ void write_mii_word(struct net_device *netdev, int phy_id, int reg, int val)
- {
- struct r8152 *tp = netdev_priv(netdev);
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- if (phy_id != R8152_PHY_ID)
-@@ -1751,7 +1751,7 @@ static void read_bulk_callback(struct urb *urb)
- if (!tp)
- return;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- if (!test_bit(WORK_ENABLE, &tp->flags))
-@@ -1843,7 +1843,7 @@ static void write_bulk_callback(struct urb *urb)
- if (!test_bit(WORK_ENABLE, &tp->flags))
- return;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- if (!skb_queue_empty(&tp->tx_queue))
-@@ -1864,7 +1864,7 @@ static void intr_callback(struct urb *urb)
- if (!test_bit(WORK_ENABLE, &tp->flags))
- return;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- switch (status) {
-@@ -2608,7 +2608,7 @@ static void bottom_half(struct tasklet_struct *t)
- {
- struct r8152 *tp = from_tasklet(tp, t, tx_tl);
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- if (!test_bit(WORK_ENABLE, &tp->flags))
-@@ -2651,7 +2651,7 @@ int r8152_submit_rx(struct r8152 *tp, struct rx_agg *agg, gfp_t mem_flags)
- int ret;
-
- /* The rx would be stopped, so skip submitting */
-- if (test_bit(RTL8152_UNPLUG, &tp->flags) ||
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags) ||
- !test_bit(WORK_ENABLE, &tp->flags) || !netif_carrier_ok(tp->netdev))
- return 0;
-
-@@ -3051,7 +3051,7 @@ static int rtl_enable(struct r8152 *tp)
-
- static int rtl8152_enable(struct r8152 *tp)
- {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- set_tx_qlen(tp);
-@@ -3138,7 +3138,7 @@ static int rtl8153_enable(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- set_tx_qlen(tp);
-@@ -3170,7 +3170,7 @@ static void rtl_disable(struct r8152 *tp)
- u32 ocp_data;
- int i;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) {
- rtl_drop_queued_tx(tp);
- return;
- }
-@@ -3624,7 +3624,7 @@ static u16 r8153_phy_status(struct r8152 *tp, u16 desired)
- }
-
- msleep(20);
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- break;
- }
-
-@@ -3656,7 +3656,7 @@ static void r8153b_ups_en(struct r8152 *tp, bool enable)
- int i;
-
- for (i = 0; i < 500; i++) {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
- if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) &
- AUTOLOAD_DONE)
-@@ -3698,7 +3698,7 @@ static void r8153c_ups_en(struct r8152 *tp, bool enable)
- int i;
-
- for (i = 0; i < 500; i++) {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
- if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) &
- AUTOLOAD_DONE)
-@@ -4063,8 +4063,8 @@ static int rtl_phy_patch_request(struct r8152 *tp, bool request, bool wait)
- for (i = 0; wait && i < 5000; i++) {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-- break;
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
-+ return -ENODEV;
-
- usleep_range(1000, 2000);
- ocp_data = ocp_reg_read(tp, OCP_PHY_PATCH_STAT);
-@@ -6027,7 +6027,7 @@ static int rtl8156_enable(struct r8152 *tp)
- u32 ocp_data;
- u16 speed;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- r8156_fc_parameter(tp);
-@@ -6085,7 +6085,7 @@ static int rtl8156b_enable(struct r8152 *tp)
- u32 ocp_data;
- u16 speed;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- set_tx_qlen(tp);
-@@ -6271,7 +6271,7 @@ static int rtl8152_set_speed(struct r8152 *tp, u8 autoneg, u32 speed, u8 duplex,
-
- static void rtl8152_up(struct r8152 *tp)
- {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8152_aldps_en(tp, false);
-@@ -6281,7 +6281,7 @@ static void rtl8152_up(struct r8152 *tp)
-
- static void rtl8152_down(struct r8152 *tp)
- {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) {
- rtl_drop_queued_tx(tp);
- return;
- }
-@@ -6296,7 +6296,7 @@ static void rtl8153_up(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153_u1u2en(tp, false);
-@@ -6336,7 +6336,7 @@ static void rtl8153_down(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) {
- rtl_drop_queued_tx(tp);
- return;
- }
-@@ -6357,7 +6357,7 @@ static void rtl8153b_up(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153b_u1u2en(tp, false);
-@@ -6381,7 +6381,7 @@ static void rtl8153b_down(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) {
- rtl_drop_queued_tx(tp);
- return;
- }
-@@ -6418,7 +6418,7 @@ static void rtl8153c_up(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153b_u1u2en(tp, false);
-@@ -6499,7 +6499,7 @@ static void rtl8156_up(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153b_u1u2en(tp, false);
-@@ -6572,7 +6572,7 @@ static void rtl8156_down(struct r8152 *tp)
- {
- u32 ocp_data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) {
- rtl_drop_queued_tx(tp);
- return;
- }
-@@ -6710,7 +6710,7 @@ static void rtl_work_func_t(struct work_struct *work)
- /* If the device is unplugged or !netif_running(), the workqueue
- * doesn't need to wake the device, and could return directly.
- */
-- if (test_bit(RTL8152_UNPLUG, &tp->flags) || !netif_running(tp->netdev))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags) || !netif_running(tp->netdev))
- return;
-
- if (usb_autopm_get_interface(tp->intf) < 0)
-@@ -6749,7 +6749,7 @@ static void rtl_hw_phy_work_func_t(struct work_struct *work)
- {
- struct r8152 *tp = container_of(work, struct r8152, hw_phy_work.work);
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- if (usb_autopm_get_interface(tp->intf) < 0)
-@@ -6876,7 +6876,7 @@ static int rtl8152_close(struct net_device *netdev)
- netif_stop_queue(netdev);
-
- res = usb_autopm_get_interface(tp->intf);
-- if (res < 0 || test_bit(RTL8152_UNPLUG, &tp->flags)) {
-+ if (res < 0 || test_bit(RTL8152_INACCESSIBLE, &tp->flags)) {
- rtl_drop_queued_tx(tp);
- rtl_stop_rx(tp);
- } else {
-@@ -6909,7 +6909,7 @@ static void r8152b_init(struct r8152 *tp)
- u32 ocp_data;
- u16 data;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- data = r8152_mdio_read(tp, MII_BMCR);
-@@ -6953,7 +6953,7 @@ static void r8153_init(struct r8152 *tp)
- u16 data;
- int i;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153_u1u2en(tp, false);
-@@ -6964,7 +6964,7 @@ static void r8153_init(struct r8152 *tp)
- break;
-
- msleep(20);
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- break;
- }
-
-@@ -7093,7 +7093,7 @@ static void r8153b_init(struct r8152 *tp)
- u16 data;
- int i;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153b_u1u2en(tp, false);
-@@ -7104,7 +7104,7 @@ static void r8153b_init(struct r8152 *tp)
- break;
-
- msleep(20);
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- break;
- }
-
-@@ -7175,7 +7175,7 @@ static void r8153c_init(struct r8152 *tp)
- u16 data;
- int i;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153b_u1u2en(tp, false);
-@@ -7195,7 +7195,7 @@ static void r8153c_init(struct r8152 *tp)
- break;
-
- msleep(20);
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
- }
-
-@@ -8024,7 +8024,7 @@ static void r8156_init(struct r8152 *tp)
- u16 data;
- int i;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_ECM_OP);
-@@ -8045,7 +8045,7 @@ static void r8156_init(struct r8152 *tp)
- break;
-
- msleep(20);
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
- }
-
-@@ -8120,7 +8120,7 @@ static void r8156b_init(struct r8152 *tp)
- u16 data;
- int i;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_ECM_OP);
-@@ -8154,7 +8154,7 @@ static void r8156b_init(struct r8152 *tp)
- break;
-
- msleep(20);
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
- }
-
-@@ -9183,7 +9183,7 @@ static int rtl8152_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
- struct mii_ioctl_data *data = if_mii(rq);
- int res;
-
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return -ENODEV;
-
- res = usb_autopm_get_interface(tp->intf);
-@@ -9285,7 +9285,7 @@ static const struct net_device_ops rtl8152_netdev_ops = {
-
- static void rtl8152_unload(struct r8152 *tp)
- {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- if (tp->version != RTL_VER_01)
-@@ -9294,7 +9294,7 @@ static void rtl8152_unload(struct r8152 *tp)
-
- static void rtl8153_unload(struct r8152 *tp)
- {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153_power_cut_en(tp, false);
-@@ -9302,7 +9302,7 @@ static void rtl8153_unload(struct r8152 *tp)
-
- static void rtl8153b_unload(struct r8152 *tp)
- {
-- if (test_bit(RTL8152_UNPLUG, &tp->flags))
-+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
- return;
-
- r8153b_power_cut_en(tp, false);
---
-2.42.0
-
net-chelsio-cxgb4-add-an-error-code-check-in-t4_load.patch
r8152-check-for-unplug-in-rtl_phy_patch_request.patch
r8152-check-for-unplug-in-r8153b_ups_en-r8153c_ups_e.patch
-r8152-rename-rtl8152_unplug-to-rtl8152_inaccessible.patch
powerpc-mm-fix-boot-crash-with-flatmem.patch
io_uring-kiocb_done-should-not-trust-ki_pos-if-read-.patch
ceph_wait_on_conflict_unlink-grab-reference-before-d.patch
perf-evlist-avoid-frequency-mode-for-the-dummy-event.patch
mmap-fix-vma_iterator-in-error-path-of-vma_merge.patch
mmap-fix-error-paths-with-dup_anon_vma.patch
+alsa-usb-audio-add-quirk-flag-to-enable-native-dsd-for-mcintosh-devices.patch
+pci-prevent-xhci-driver-from-claiming-amd-vangogh-usb3-drd-device.patch
+usb-storage-set-1.50-as-the-lower-bcddevice-for-older-super-top-compatibility.patch
+usb-typec-tcpm-add-additional-checks-for-contaminant.patch
+usb-typec-tcpm-fix-null-pointer-dereference-in-tcpm_pd_svdm.patch
+usb-raw-gadget-properly-handle-interrupted-requests.patch
+bluetooth-hci_bcm4377-mark-bcm4378-bcm4387-as-broken_le_coded.patch
+tty-n_gsm-fix-race-condition-in-status-line-change-on-dead-connections.patch
+tty-8250-remove-uc-257-and-uc-431.patch
+tty-8250-add-support-for-additional-brainboxes-uc-cards.patch
+tty-8250-add-support-for-brainboxes-up-cards.patch
+tty-8250-add-support-for-intashield-is-100.patch
+tty-8250-fix-port-count-of-px-257.patch
+tty-8250-fix-up-px-803-px-857.patch
+tty-8250-add-support-for-additional-brainboxes-px-cards.patch
+tty-8250-add-support-for-intashield-ix-cards.patch
+tty-8250-add-brainboxes-oxford-semiconductor-based-quirks.patch
+dt-bindings-serial-rs485-add-rs485-rts-active-high.patch
+misc-pci_endpoint_test-add-deviceid-for-j721s2-pcie-ep-device-support.patch
--- /dev/null
+From e4876dacaca46a1b09f9b417480924ab12019a5b Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:17 +0100
+Subject: tty: 8250: Add Brainboxes Oxford Semiconductor-based quirks
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit e4876dacaca46a1b09f9b417480924ab12019a5b upstream.
+
+Some of the later revisions of the Brainboxes PX cards are based
+on the Oxford Semiconductor chipset. Due to the chip's unique setup
+these cards need to be initialised.
+Previously these were tested against a reference card with the same broken
+baudrate on another PC, cancelling out the effect. With this patch they
+work and can transfer/receive find against an FTDI-based device.
+
+Add all of the cards which require this setup to the quirks table.
+Thanks to Maciej W. Rozycki for clarification on this chip.
+
+Fixes: ef5a03a26c87 ("tty: 8250: Add support for Brainboxes PX cards.")
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB7899D222A4AB2A4E8C57108FC4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 147 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 147 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -2427,6 +2427,153 @@ static struct pci_serial_quirk pci_seria
+ .init = pci_oxsemi_tornado_init,
+ .setup = pci_oxsemi_tornado_setup,
+ },
++ /*
++ * Brainboxes devices - all Oxsemi based
++ */
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4027,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4028,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4029,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4019,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4016,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4015,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x400A,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x400E,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x400C,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x400B,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x400F,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4010,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4011,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x401D,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x401E,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4013,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4017,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_INTASHIELD,
++ .device = 0x4018,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .init = pci_oxsemi_tornado_init,
++ .setup = pci_oxsemi_tornado_setup,
++ },
+ {
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .device = 0x8811,
--- /dev/null
+From 9604884e592cd04ead024c9737c67a77f175cab9 Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:15 +0100
+Subject: tty: 8250: Add support for additional Brainboxes PX cards
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit 9604884e592cd04ead024c9737c67a77f175cab9 upstream.
+
+Add support for some more of the Brainboxes PX (PCIe) range
+of serial cards, namely
+PX-275/PX-279, PX-475 (serial port, not LPT), PX-820,
+PX-803/PX-857 (additional ID).
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB78996BEC353FB346FC35444BC4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -5187,6 +5187,13 @@ static const struct pci_device_id serial
+ 0, 0,
+ pbn_oxsemi_4_15625000 },
+ /*
++ * Brainboxes PX-275/279
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0E41,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_8_115200 },
++ /*
+ * Brainboxes PX-310
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x400E,
+@@ -5233,17 +5240,39 @@ static const struct pci_device_id serial
+ 0, 0,
+ pbn_oxsemi_4_15625000 },
+ /*
++ * Brainboxes PX-475
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x401D,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_oxsemi_1_15625000 },
++ /*
+ * Brainboxes PX-803/PX-857
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x4009,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+ pbn_b0_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x4018,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_oxsemi_2_15625000 },
+ { PCI_VENDOR_ID_INTASHIELD, 0x401E,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+ pbn_oxsemi_2_15625000 },
+ /*
++ * Brainboxes PX-820
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x4002,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b0_4_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x4013,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_oxsemi_4_15625000 },
++ /*
+ * Brainboxes PX-846
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x4008,
--- /dev/null
+From c563db486db7d245c0e2f319443417ae8e692f7f Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:09 +0100
+Subject: tty: 8250: Add support for additional Brainboxes UC cards
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit c563db486db7d245c0e2f319443417ae8e692f7f upstream.
+
+Add device IDs for some more Brainboxes UC cards, namely
+UC-235/UC-246, UC-253/UC-734, UC-302, UC-313, UC-346, UC-357,
+UC-607 and UC-836.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB789969998A6C3FAFCD95C85DC4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 57 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 57 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -4938,6 +4938,17 @@ static const struct pci_device_id serial
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+ pbn_b2_1_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0AA2,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_1_115200 },
++ /*
++ * Brainboxes UC-253/UC-734
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0CA1,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
+ /*
+ * Brainboxes UC-260/271/701/756
+ */
+@@ -4970,6 +4981,14 @@ static const struct pci_device_id serial
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x08E2,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x08E3,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
+ /*
+ * Brainboxes UC-310
+ */
+@@ -4980,6 +4999,14 @@ static const struct pci_device_id serial
+ /*
+ * Brainboxes UC-313
+ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x08A1,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x08A2,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
+ { PCI_VENDOR_ID_INTASHIELD, 0x08A3,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+@@ -4994,6 +5021,10 @@ static const struct pci_device_id serial
+ /*
+ * Brainboxes UC-346
+ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0B01,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_4_115200 },
+ { PCI_VENDOR_ID_INTASHIELD, 0x0B02,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+@@ -5005,6 +5036,10 @@ static const struct pci_device_id serial
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0A82,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
+ { PCI_VENDOR_ID_INTASHIELD, 0x0A83,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+@@ -5023,6 +5058,28 @@ static const struct pci_device_id serial
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+ pbn_b2_4_115200 },
++ /*
++ * Brainboxes UC-607
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x09A1,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x09A2,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x09A3,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ /*
++ * Brainboxes UC-836
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0D41,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_4_115200 },
+ /*
+ * Brainboxes PX-101
+ */
--- /dev/null
+From 2c6fec1e1532f15350be7e14ba6b88a39d289fe4 Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:10 +0100
+Subject: tty: 8250: Add support for Brainboxes UP cards
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit 2c6fec1e1532f15350be7e14ba6b88a39d289fe4 upstream.
+
+Add support for the Brainboxes UP (powered PCI) range of
+cards, namely UP-189, UP-200, UP-869 and UP-880.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB7899B5B59FF3D8587E88C117C4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 60 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 60 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -5081,6 +5081,66 @@ static const struct pci_device_id serial
+ 0, 0,
+ pbn_b2_4_115200 },
+ /*
++ * Brainboxes UP-189
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0AC1,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0AC2,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0AC3,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ /*
++ * Brainboxes UP-200
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0B21,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0B22,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0B23,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ /*
++ * Brainboxes UP-869
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0C01,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0C02,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0C03,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ /*
++ * Brainboxes UP-880
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0C21,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0C22,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ { PCI_VENDOR_ID_INTASHIELD, 0x0C23,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_b2_2_115200 },
++ /*
+ * Brainboxes PX-101
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x4005,
--- /dev/null
+From 4d994e3cf1b541ff32dfb03fbbc60eea68f9645b Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:11 +0100
+Subject: tty: 8250: Add support for Intashield IS-100
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit 4d994e3cf1b541ff32dfb03fbbc60eea68f9645b upstream.
+
+Add support for the Intashield IS-100 1 port serial card.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB7899A0E0CDAA505AF5A874CDC4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -4912,6 +4912,12 @@ static const struct pci_device_id serial
+ pbn_b1_bt_1_115200 },
+
+ /*
++ * IntaShield IS-100
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x0D60,
++ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ pbn_b2_1_115200 },
++ /*
+ * IntaShield IS-200
+ */
+ { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
--- /dev/null
+From 62d2ec2ded278c7512d91ca7bf8eb9bac46baf90 Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:16 +0100
+Subject: tty: 8250: Add support for Intashield IX cards
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit 62d2ec2ded278c7512d91ca7bf8eb9bac46baf90 upstream.
+
+Add support for the IX-100, IX-200 and IX-400 serial cards.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB7899614E5837E82A03272A4BC4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -4929,6 +4929,27 @@ static const struct pci_device_id serial
+ { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */
+ pbn_b2_4_115200 },
++ /*
++ * IntaShield IX-100
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x4027,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_oxsemi_1_15625000 },
++ /*
++ * IntaShield IX-200
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x4028,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_oxsemi_2_15625000 },
++ /*
++ * IntaShield IX-400
++ */
++ { PCI_VENDOR_ID_INTASHIELD, 0x4029,
++ PCI_ANY_ID, PCI_ANY_ID,
++ 0, 0,
++ pbn_oxsemi_4_15625000 },
+ /* Brainboxes Devices */
+ /*
+ * Brainboxes UC-101
--- /dev/null
+From d0ff5b24c2f112f29dea4c38b3bac9597b1be9ba Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:12 +0100
+Subject: tty: 8250: Fix port count of PX-257
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit d0ff5b24c2f112f29dea4c38b3bac9597b1be9ba upstream.
+
+The port count of the PX-257 Rev3 is actually 2, not 4.
+
+Fixes: ef5a03a26c87 ("tty: 8250: Add support for Brainboxes PX cards.")
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB7899C804D9F04E727B5A0E8FC4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -5178,7 +5178,7 @@ static const struct pci_device_id serial
+ { PCI_VENDOR_ID_INTASHIELD, 0x4015,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+- pbn_oxsemi_4_15625000 },
++ pbn_oxsemi_2_15625000 },
+ /*
+ * Brainboxes PX-260/PX-701
+ */
--- /dev/null
+From ee61337b934c99c2611e0a945d592019b2e00c82 Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:13 +0100
+Subject: tty: 8250: Fix up PX-803/PX-857
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit ee61337b934c99c2611e0a945d592019b2e00c82 upstream.
+
+The PX-803/PX-857 are variants of each other, add a note.
+Additionally fix up the port counts for the card (2, not 1).
+
+Fixes: ef5a03a26c87 ("tty: 8250: Add support for Brainboxes PX cards.")
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB789978C8ED872FB4B014E132C4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -5233,16 +5233,16 @@ static const struct pci_device_id serial
+ 0, 0,
+ pbn_oxsemi_4_15625000 },
+ /*
+- * Brainboxes PX-803
++ * Brainboxes PX-803/PX-857
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x4009,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+- pbn_b0_1_115200 },
++ pbn_b0_2_115200 },
+ { PCI_VENDOR_ID_INTASHIELD, 0x401E,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0,
+- pbn_oxsemi_1_15625000 },
++ pbn_oxsemi_2_15625000 },
+ /*
+ * Brainboxes PX-846
+ */
--- /dev/null
+From 33092fb3af51deb80849e90a17bada44bbcde6b3 Mon Sep 17 00:00:00 2001
+From: Cameron Williams <cang1@live.co.uk>
+Date: Fri, 20 Oct 2023 17:03:08 +0100
+Subject: tty: 8250: Remove UC-257 and UC-431
+
+From: Cameron Williams <cang1@live.co.uk>
+
+commit 33092fb3af51deb80849e90a17bada44bbcde6b3 upstream.
+
+The UC-257 is a serial + LPT card, so remove it from this driver.
+A patch has been submitted to add it to parport_serial instead.
+
+Additionaly, the UC-431 does not use this card ID, only the UC-420
+does. The 431 is a 3-port card and there is no generic 3-port configuration
+available, so remove reference to it from this driver.
+
+Fixes: 152d1afa834c ("tty: Add support for Brainboxes UC cards.")
+Cc: stable@vger.kernel.org
+Signed-off-by: Cameron Williams <cang1@live.co.uk>
+Link: https://lore.kernel.org/r/DU0PR02MB78995ADF7394C74AD4CF3357C4DBA@DU0PR02MB7899.eurprd02.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_pci.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -4939,13 +4939,6 @@ static const struct pci_device_id serial
+ 0, 0,
+ pbn_b2_1_115200 },
+ /*
+- * Brainboxes UC-257
+- */
+- { PCI_VENDOR_ID_INTASHIELD, 0x0861,
+- PCI_ANY_ID, PCI_ANY_ID,
+- 0, 0,
+- pbn_b2_2_115200 },
+- /*
+ * Brainboxes UC-260/271/701/756
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x0D21,
+@@ -5024,7 +5017,7 @@ static const struct pci_device_id serial
+ 0, 0,
+ pbn_b2_4_115200 },
+ /*
+- * Brainboxes UC-420/431
++ * Brainboxes UC-420
+ */
+ { PCI_VENDOR_ID_INTASHIELD, 0x0921,
+ PCI_ANY_ID, PCI_ANY_ID,
--- /dev/null
+From 3a75b205de43365f80a33b98ec9289785da56243 Mon Sep 17 00:00:00 2001
+From: Daniel Starke <daniel.starke@siemens.com>
+Date: Thu, 26 Oct 2023 07:58:43 +0200
+Subject: tty: n_gsm: fix race condition in status line change on dead connections
+
+From: Daniel Starke <daniel.starke@siemens.com>
+
+commit 3a75b205de43365f80a33b98ec9289785da56243 upstream.
+
+gsm_cleanup_mux() cleans up the gsm by closing all DLCIs, stopping all
+timers, removing the virtual tty devices and clearing the data queues.
+This procedure, however, may cause subsequent changes of the virtual modem
+status lines of a DLCI. More data is being added the outgoing data queue
+and the deleted kick timer is restarted to handle this. At this point many
+resources have already been removed by the cleanup procedure. Thus, a
+kernel panic occurs.
+
+Fix this by proving in gsm_modem_update() that the cleanup procedure has
+not been started and the mux is still alive.
+
+Note that writing to a virtual tty is already protected by checks against
+the DLCI specific connection state.
+
+Fixes: c568f7086c6e ("tty: n_gsm: fix missing timer to handle stalled links")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
+Link: https://lore.kernel.org/r/20231026055844.3127-1-daniel.starke@siemens.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/n_gsm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/tty/n_gsm.c
++++ b/drivers/tty/n_gsm.c
+@@ -4058,6 +4058,8 @@ static int gsm_modem_upd_via_msc(struct
+
+ static int gsm_modem_update(struct gsm_dlci *dlci, u8 brk)
+ {
++ if (dlci->gsm->dead)
++ return -EL2HLT;
+ if (dlci->adaption == 2) {
+ /* Send convergence layer type 2 empty data frame. */
+ gsm_modem_upd_via_data(dlci, brk);
--- /dev/null
+From e8033bde451eddfb9b1bbd6e2d848c1b5c277222 Mon Sep 17 00:00:00 2001
+From: Andrey Konovalov <andreyknvl@gmail.com>
+Date: Thu, 26 Oct 2023 22:01:12 +0200
+Subject: usb: raw-gadget: properly handle interrupted requests
+
+From: Andrey Konovalov <andreyknvl@gmail.com>
+
+commit e8033bde451eddfb9b1bbd6e2d848c1b5c277222 upstream.
+
+Currently, if a USB request that was queued by Raw Gadget is interrupted
+(via a signal), wait_for_completion_interruptible returns -ERESTARTSYS.
+Raw Gadget then attempts to propagate this value to userspace as a return
+value from its ioctls. However, when -ERESTARTSYS is returned by a syscall
+handler, the kernel internally restarts the syscall.
+
+This doesn't allow userspace applications to interrupt requests queued by
+Raw Gadget (which is required when the emulated device is asked to switch
+altsettings). It also violates the implied interface of Raw Gadget that a
+single ioctl must only queue a single USB request.
+
+Instead, make Raw Gadget do what GadgetFS does: check whether the request
+was interrupted (dequeued with status == -ECONNRESET) and report -EINTR to
+userspace.
+
+Fixes: f2c2e717642c ("usb: gadget: add raw-gadget interface")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
+Link: https://lore.kernel.org/r/0db45b1d7cc466e3d4d1ab353f61d63c977fbbc5.1698350424.git.andreyknvl@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/legacy/raw_gadget.c | 26 ++++++++++++++++----------
+ 1 file changed, 16 insertions(+), 10 deletions(-)
+
+--- a/drivers/usb/gadget/legacy/raw_gadget.c
++++ b/drivers/usb/gadget/legacy/raw_gadget.c
+@@ -663,12 +663,12 @@ static int raw_process_ep0_io(struct raw
+ if (WARN_ON(in && dev->ep0_out_pending)) {
+ ret = -ENODEV;
+ dev->state = STATE_DEV_FAILED;
+- goto out_done;
++ goto out_unlock;
+ }
+ if (WARN_ON(!in && dev->ep0_in_pending)) {
+ ret = -ENODEV;
+ dev->state = STATE_DEV_FAILED;
+- goto out_done;
++ goto out_unlock;
+ }
+
+ dev->req->buf = data;
+@@ -683,7 +683,7 @@ static int raw_process_ep0_io(struct raw
+ "fail, usb_ep_queue returned %d\n", ret);
+ spin_lock_irqsave(&dev->lock, flags);
+ dev->state = STATE_DEV_FAILED;
+- goto out_done;
++ goto out_queue_failed;
+ }
+
+ ret = wait_for_completion_interruptible(&dev->ep0_done);
+@@ -692,13 +692,16 @@ static int raw_process_ep0_io(struct raw
+ usb_ep_dequeue(dev->gadget->ep0, dev->req);
+ wait_for_completion(&dev->ep0_done);
+ spin_lock_irqsave(&dev->lock, flags);
+- goto out_done;
++ if (dev->ep0_status == -ECONNRESET)
++ dev->ep0_status = -EINTR;
++ goto out_interrupted;
+ }
+
+ spin_lock_irqsave(&dev->lock, flags);
+- ret = dev->ep0_status;
+
+-out_done:
++out_interrupted:
++ ret = dev->ep0_status;
++out_queue_failed:
+ dev->ep0_urb_queued = false;
+ out_unlock:
+ spin_unlock_irqrestore(&dev->lock, flags);
+@@ -1067,7 +1070,7 @@ static int raw_process_ep_io(struct raw_
+ "fail, usb_ep_queue returned %d\n", ret);
+ spin_lock_irqsave(&dev->lock, flags);
+ dev->state = STATE_DEV_FAILED;
+- goto out_done;
++ goto out_queue_failed;
+ }
+
+ ret = wait_for_completion_interruptible(&done);
+@@ -1076,13 +1079,16 @@ static int raw_process_ep_io(struct raw_
+ usb_ep_dequeue(ep->ep, ep->req);
+ wait_for_completion(&done);
+ spin_lock_irqsave(&dev->lock, flags);
+- goto out_done;
++ if (ep->status == -ECONNRESET)
++ ep->status = -EINTR;
++ goto out_interrupted;
+ }
+
+ spin_lock_irqsave(&dev->lock, flags);
+- ret = ep->status;
+
+-out_done:
++out_interrupted:
++ ret = ep->status;
++out_queue_failed:
+ ep->urb_queued = false;
+ out_unlock:
+ spin_unlock_irqrestore(&dev->lock, flags);
--- /dev/null
+From 0e3139e6543b241b3e65956a55c712333bef48ac Mon Sep 17 00:00:00 2001
+From: LihaSika <lihasika@gmail.com>
+Date: Fri, 27 Oct 2023 20:28:04 +0300
+Subject: usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
+
+From: LihaSika <lihasika@gmail.com>
+
+commit 0e3139e6543b241b3e65956a55c712333bef48ac upstream.
+
+Change lower bcdDevice value for "Super Top USB 2.0 SATA BRIDGE" to match
+1.50. I have such an older device with bcdDevice=1.50 and it will not work
+otherwise.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Liha Sikanen <lihasika@gmail.com>
+Link: https://lore.kernel.org/r/ccf7d12a-8362-4916-b3e0-f4150f54affd@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/storage/unusual_cypress.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/storage/unusual_cypress.h
++++ b/drivers/usb/storage/unusual_cypress.h
+@@ -19,7 +19,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x
+ "Cypress ISD-300LP",
+ USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
+
+-UNUSUAL_DEV( 0x14cd, 0x6116, 0x0160, 0x0160,
++UNUSUAL_DEV( 0x14cd, 0x6116, 0x0150, 0x0160,
+ "Super Top",
+ "USB 2.0 SATA BRIDGE",
+ USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
--- /dev/null
+From 1a4a2df07c1f087704c24282cebe882268e38146 Mon Sep 17 00:00:00 2001
+From: Badhri Jagan Sridharan <badhri@google.com>
+Date: Sun, 15 Oct 2023 05:31:08 +0000
+Subject: usb: typec: tcpm: Add additional checks for contaminant
+
+From: Badhri Jagan Sridharan <badhri@google.com>
+
+commit 1a4a2df07c1f087704c24282cebe882268e38146 upstream.
+
+When transitioning from SNK_DEBOUNCED to unattached, its worthwhile to
+check for contaminant to mitigate wakeups.
+
+```
+[81334.219571] Start toggling
+[81334.228220] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
+[81334.305147] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected]
+[81334.305162] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
+[81334.305187] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
+[81334.475515] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
+[81334.486480] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_DEBOUNCED, polarity 0, disconnected]
+[81334.486495] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS]
+[81334.486515] pending state change SNK_DEBOUNCED -> SNK_UNATTACHED @ 20 ms [rev3 NONE_AMS]
+[81334.506621] state change SNK_DEBOUNCED -> SNK_UNATTACHED [delayed 20 ms]
+[81334.506640] Start toggling
+[81334.516972] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
+[81334.592759] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected]
+[81334.592773] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
+[81334.592792] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
+[81334.762940] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
+[81334.773557] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_DEBOUNCED, polarity 0, disconnected]
+[81334.773570] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS]
+[81334.773588] pending state change SNK_DEBOUNCED -> SNK_UNATTACHED @ 20 ms [rev3 NONE_AMS]
+[81334.793672] state change SNK_DEBOUNCED -> SNK_UNATTACHED [delayed 20 ms]
+[81334.793681] Start toggling
+[81334.801840] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
+[81334.878655] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected]
+[81334.878672] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
+[81334.878696] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
+[81335.048968] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
+[81335.060684] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_DEBOUNCED, polarity 0, disconnected]
+[81335.060754] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS]
+[81335.060775] pending state change SNK_DEBOUNCED -> SNK_UNATTACHED @ 20 ms [rev3 NONE_AMS]
+[81335.080884] state change SNK_DEBOUNCED -> SNK_UNATTACHED [delayed 20 ms]
+[81335.080900] Start toggling
+```
+
+Cc: stable@vger.kernel.org
+Fixes: 599f008c257d ("usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant")
+Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
+Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20231015053108.2349570-1-badhri@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/tcpm/tcpm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/typec/tcpm/tcpm.c
++++ b/drivers/usb/typec/tcpm/tcpm.c
+@@ -3970,6 +3970,8 @@ static void run_state_machine(struct tcp
+ port->potential_contaminant = ((port->enter_state == SRC_ATTACH_WAIT &&
+ port->state == SRC_UNATTACHED) ||
+ (port->enter_state == SNK_ATTACH_WAIT &&
++ port->state == SNK_UNATTACHED) ||
++ (port->enter_state == SNK_DEBOUNCED &&
+ port->state == SNK_UNATTACHED));
+
+ port->enter_state = port->state;
--- /dev/null
+From 4987daf86c152ff882d51572d154ad12e4ff3a4b Mon Sep 17 00:00:00 2001
+From: Jimmy Hu <hhhuuu@google.com>
+Date: Fri, 20 Oct 2023 01:21:32 +0000
+Subject: usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm()
+
+From: Jimmy Hu <hhhuuu@google.com>
+
+commit 4987daf86c152ff882d51572d154ad12e4ff3a4b upstream.
+
+It is possible that typec_register_partner() returns ERR_PTR on failure.
+When port->partner is an error, a NULL pointer dereference may occur as
+shown below.
+
+[91222.095236][ T319] typec port0: failed to register partner (-17)
+...
+[91225.061491][ T319] Unable to handle kernel NULL pointer dereference
+at virtual address 000000000000039f
+[91225.274642][ T319] pc : tcpm_pd_data_request+0x310/0x13fc
+[91225.274646][ T319] lr : tcpm_pd_data_request+0x298/0x13fc
+[91225.308067][ T319] Call trace:
+[91225.308070][ T319] tcpm_pd_data_request+0x310/0x13fc
+[91225.308073][ T319] tcpm_pd_rx_handler+0x100/0x9e8
+[91225.355900][ T319] kthread_worker_fn+0x178/0x58c
+[91225.355902][ T319] kthread+0x150/0x200
+[91225.355905][ T319] ret_from_fork+0x10/0x30
+
+Add a check for port->partner to avoid dereferencing a NULL pointer.
+
+Fixes: 5e1d4c49fbc8 ("usb: typec: tcpm: Determine common SVDM Version")
+Cc: stable@vger.kernel.org
+Signed-off-by: Jimmy Hu <hhhuuu@google.com>
+Link: https://lore.kernel.org/r/20231020012132.100960-1-hhhuuu@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/tcpm/tcpm.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/typec/tcpm/tcpm.c
++++ b/drivers/usb/typec/tcpm/tcpm.c
+@@ -1625,6 +1625,9 @@ static int tcpm_pd_svdm(struct tcpm_port
+ if (PD_VDO_VID(p[0]) != USB_SID_PD)
+ break;
+
++ if (IS_ERR_OR_NULL(port->partner))
++ break;
++
+ if (PD_VDO_SVDM_VER(p[0]) < svdm_version) {
+ typec_partner_set_svdm_version(port->partner,
+ PD_VDO_SVDM_VER(p[0]));