Re: [PATCH] Additions to the list of devices that can be used for Lenovo Pass-thru feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On 5/11/22 12:38 PM, David Ober wrote:

> net: usb: r8152: Add in new Devices that are supported for Mac-Passthru

   This should be in the subject.

> 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@xxxxxxxxx>
> ---
>  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
[...]
> @@ -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;
>  		}
> +        }

   Indent with tabs please.

> +	else if ((le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_REALTEK) &&

   The preceding } should be on the same line.

> +                 (le16_to_cpu(udev->parent->descriptor.idVendor) == VENDOR_ID_LENOVO)) {

   Indent with tabs please.

[...]

MBR, Sergey



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux