Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10C28C433F5 for ; Sun, 28 Nov 2021 09:52:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357159AbhK1Jzq (ORCPT ); Sun, 28 Nov 2021 04:55:46 -0500 Received: from mxout01.lancloud.ru ([45.84.86.81]:58056 "EHLO mxout01.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357016AbhK1Jxp (ORCPT ); Sun, 28 Nov 2021 04:53:45 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 2FBA120DD7D0 Received: from LanCloud Received: from LanCloud Received: from LanCloud Message-ID: Date: Sun, 28 Nov 2021 12:50:23 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH AUTOSEL 5.15 23/39] net: usb: r8152: Add MAC passthrough support for more Lenovo Docks Content-Language: en-US From: Sergey Shtylyov To: Sasha Levin , , CC: Aaron Ma , "David S . Miller" , , , , , References: <20211126023156.441292-1-sashal@kernel.org> <20211126023156.441292-23-sashal@kernel.org> Organization: Open Mobile Platform In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.11.2021 12:49, Sergey Shtylyov wrote: >> From: Aaron Ma >> >> [ Upstream commit f77b83b5bbab53d2be339184838b19ed2c62c0a5 ] >> >> Like ThinkaPad Thunderbolt 4 Dock, more Lenovo docks start to use the original >> Realtek USB ethernet chip ID 0bda:8153. >> >> Lenovo Docks always use their own IDs for usb hub, even for older Docks. >> If parent hub is from Lenovo, then r8152 should try MAC passthrough. >> Verified on Lenovo TBT3 dock too. >> >> Signed-off-by: Aaron Ma >> Signed-off-by: David S. Miller >> Signed-off-by: Sasha Levin >> --- >>   drivers/net/usb/r8152.c | 9 +++------ >>   1 file changed, 3 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c >> index f329e39100a7d..d3da350777a4d 100644 >> --- a/drivers/net/usb/r8152.c >> +++ b/drivers/net/usb/r8152.c >> @@ -9603,12 +9603,9 @@ static int rtl8152_probe(struct usb_interface *intf, >>           netdev->hw_features &= ~NETIF_F_RXCSUM; >>       } >> -    if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO) { >> -        switch (le16_to_cpu(udev->descriptor.idProduct)) { >> -        case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2: >> -        case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2: >> -            tp->lenovo_macpassthru = 1; >> -        } >> +    if (udev->parent && >> +            le16_to_cpu(udev->parent->descriptor.idVendor) == >> VENDOR_ID_LENOVO) { >> +        tp->lenovo_macpassthru = 1; >>       } > >    {} not needed anymore, please remove 'em. Oops, sorry didn't notice that this is a stable patch. :-) > [...] MBR, Sergey