From: David Ober <dober6023@gmail.com>
To: linux-usb@vger.kernel.org, netdev@vger.kernel.org,
davem@davemloft.net, hayeswang@realtek.com,
aaron.ma@canonical.com
Cc: mpearson@lenovo.com, dober@lenovo.com, David Ober <dober6023@gmail.com>
Subject: [PATCH] Additions to the list of devices that can be used for Lenovo Pass-thru feature
Date: Wed, 11 May 2022 05:38:26 -0400 [thread overview]
Message-ID: <20220511093826.245118-1-dober6023@gmail.com> (raw)
net: usb: r8152: Add in new Devices that are supported for Mac-Passthru
Lenovo Thunderbolt 4 Dock, and other Lenovo USB Docks are using the original
Realtek USB ethernet Vendor and Product IDs
If the Network device is Realtek verify that it is on a Lenovo USB hub
before enabling the passthru feature
This also adds in the device IDs for the Lenovo USB Dongle and one other
USB-C dock
Signed-off-by: David Ober <dober6023@gmail.com>
---
drivers/net/usb/r8152.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index c2da3438387c..7d43c772b85d 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -771,6 +771,9 @@ enum rtl8152_flags {
};
#define DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2 0x3082
+#define DEVICE_ID_THINKPAD_THUNDERBOLT4_DOCK_GEN1 0x8153
+#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 0x3062
+#define DEVICE_ID_THINKPAD_USB_C_DONGLE 0x720c
#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387
struct tally_counter {
@@ -9644,10 +9647,19 @@ static int rtl8152_probe(struct usb_interface *intf,
if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO) {
switch (le16_to_cpu(udev->descriptor.idProduct)) {
+ case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3:
+ case DEVICE_ID_THINKPAD_USB_C_DONGLE:
case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2:
case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2:
tp->lenovo_macpassthru = 1;
}
+ }
+ else if ((le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_REALTEK) &&
+ (le16_to_cpu(udev->parent->descriptor.idVendor) == VENDOR_ID_LENOVO)) {
+ switch (le16_to_cpu(udev->descriptor.idProduct)) {
+ case DEVICE_ID_THINKPAD_THUNDERBOLT4_DOCK_GEN1:
+ tp->lenovo_macpassthru = 1;
+ }
}
if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
--
2.30.2
next reply other threads:[~2022-05-11 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 9:38 David Ober [this message]
2022-05-11 11:28 ` [PATCH] Additions to the list of devices that can be used for Lenovo Pass-thru feature Sergey Shtylyov
2022-05-11 23:45 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220511093826.245118-1-dober6023@gmail.com \
--to=dober6023@gmail.com \
--cc=aaron.ma@canonical.com \
--cc=davem@davemloft.net \
--cc=dober@lenovo.com \
--cc=hayeswang@realtek.com \
--cc=linux-usb@vger.kernel.org \
--cc=mpearson@lenovo.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).