]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:45:53 +0000 (12:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:45:53 +0000 (12:45 +0200)
added patches:
r8152-add-pid-for-the-lenovo-onelink-dock.patch

queue-5.15/r8152-add-pid-for-the-lenovo-onelink-dock.patch [new file with mode: 0644]
queue-5.15/series [new file with mode: 0644]

diff --git a/queue-5.15/r8152-add-pid-for-the-lenovo-onelink-dock.patch b/queue-5.15/r8152-add-pid-for-the-lenovo-onelink-dock.patch
new file mode 100644 (file)
index 0000000..e78effd
--- /dev/null
@@ -0,0 +1,72 @@
+From 1bd3a383075c64d638e65d263c9267b08ee7733c Mon Sep 17 00:00:00 2001
+From: Jean-Francois Le Fillatre <jflf_kernel@gmx.com>
+Date: Wed, 24 Aug 2022 21:14:36 +0200
+Subject: r8152: add PID for the Lenovo OneLink+ Dock
+
+From: Jean-Francois Le Fillatre <jflf_kernel@gmx.com>
+
+commit 1bd3a383075c64d638e65d263c9267b08ee7733c upstream.
+
+The Lenovo OneLink+ Dock contains an RTL8153 controller that behaves as
+a broken CDC device by default. Add the custom Lenovo PID to the r8152
+driver to support it properly.
+
+Also, systems compatible with this dock provide a BIOS option to enable
+MAC address passthrough (as per Lenovo document "ThinkPad Docking
+Solutions 2017"). Add the custom PID to the MAC passthrough list too.
+
+Tested on a ThinkPad 13 1st gen with the expected results:
+
+passthrough disabled: Invalid header when reading pass-thru MAC addr
+passthrough enabled:  Using pass-thru MAC addr XX:XX:XX:XX:XX:XX
+
+Signed-off-by: Jean-Francois Le Fillatre <jflf_kernel@gmx.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/cdc_ether.c |    7 +++++++
+ drivers/net/usb/r8152.c     |    3 +++
+ 2 files changed, 10 insertions(+)
+
+--- a/drivers/net/usb/cdc_ether.c
++++ b/drivers/net/usb/cdc_ether.c
+@@ -776,6 +776,13 @@ static const struct usb_device_id produc
+ },
+ #endif
++/* Lenovo ThinkPad OneLink+ Dock (based on Realtek RTL8153) */
++{
++      USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0x3054, USB_CLASS_COMM,
++                      USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
++      .driver_info = 0,
++},
++
+ /* ThinkPad USB-C Dock (based on Realtek RTL8153) */
+ {
+       USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0x3062, USB_CLASS_COMM,
+--- a/drivers/net/usb/r8152.c
++++ b/drivers/net/usb/r8152.c
+@@ -770,6 +770,7 @@ enum rtl8152_flags {
+       RX_EPROTO,
+ };
++#define DEVICE_ID_THINKPAD_ONELINK_PLUS_DOCK          0x3054
+ #define DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2     0x3082
+ #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2            0xa387
+@@ -9651,6 +9652,7 @@ static int rtl8152_probe(struct usb_inte
+       if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO) {
+               switch (le16_to_cpu(udev->descriptor.idProduct)) {
++              case DEVICE_ID_THINKPAD_ONELINK_PLUS_DOCK:
+               case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2:
+               case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2:
+                       tp->lenovo_macpassthru = 1;
+@@ -9809,6 +9811,7 @@ static const struct usb_device_id rtl815
+       REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927),
+       REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101),
+       REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x304f),
++      REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3054),
+       REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3062),
+       REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3069),
+       REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3082),
diff --git a/queue-5.15/series b/queue-5.15/series
new file mode 100644 (file)
index 0000000..a06907b
--- /dev/null
@@ -0,0 +1 @@
+r8152-add-pid-for-the-lenovo-onelink-dock.patch