Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5252780rdb; Sat, 16 Sep 2023 08:46:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKGqywYrx/ROGmaAo+Om/LKgJP8CserLs7dkl8+lE8+4ZR1AbW9nK2Wyt7hXINqoE9X0ck X-Received: by 2002:a17:902:7081:b0:1c3:2532:ac71 with SMTP id z1-20020a170902708100b001c32532ac71mr4991709plk.31.1694879215155; Sat, 16 Sep 2023 08:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694879215; cv=none; d=google.com; s=arc-20160816; b=gSBVO0q55uKm43yA4t8v9FGJc6hv5WjloWRot+xP9bH8T8HjqxKntncH5JI7MycEAa sezyHhtF4kL2101uN75hJ3uxjfkiZ7rnf7v5P9gkV8ZONsGuugCFf2Wg4JEvuQWtlQek kgrVHE2JK3sf0ShJDpHjM0P6+MP6dGfXpuSg6V5NXA3pc4SMn1a4joH0CgqX0otdZcJE Ak+b24A20gRHQjIY/KGaCL1iZFrX9NWDpC9/6wpT/RZnAQC5AFN8Tvbi4XlzO0YbV/pY Fo2KOCxJXF0P5+gmc/35nAB6Nwpi0w76A/dkOhtkBJI0e27O85fbElJknfZ1Axz7KRav xs1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kKrlL3psbhaCacm+GqwkX8wPmM3l79IE3hZOV3TRBaI=; fh=d78RZJwnl/KvPP6QH1MhsyGMJ9RyGlrlHCH3i55JMq4=; b=qlQXmA9GJ0Th2VAY8LVneky61Ks6NGMmc1me2fVa5B/wqnsRNyThfIJyFXSkO+iyaw aJjc3vXJGr6wkekbP7PabI69yI0B6qBEza/xm4sHcBEpGTAbafChblXiQi3RbwYyX2yn JnCZ3gZvLtGMc6UOa9mHfswx098a43luS7oHDVLLr1waX5ZjJe8fhumV8/EvoCvahvu/ HoGpLQAlgkthniYfYmjpuhPBOUjsw/ZXfuJ2hzqfVd8b9wqKLwO3U7/5GzhtYabwAiKT vDa3kMiFrplQ/Ewq8Uc/xLqz5xyRVeRxct0JtaLUhPlovjV6G1q1+I+HwTtY/5343j+z Y7/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=zEHVhZz4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j1-20020a170902690100b001b9ea5f0feesi5019329plk.453.2023.09.16.08.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 08:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=zEHVhZz4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6442F807CF56; Sat, 16 Sep 2023 07:47:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238134AbjIPOrL (ORCPT + 99 others); Sat, 16 Sep 2023 10:47:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233324AbjIPOqr (ORCPT ); Sat, 16 Sep 2023 10:46:47 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5294218E; Sat, 16 Sep 2023 07:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=kKrlL3psbhaCacm+GqwkX8wPmM3l79IE3hZOV3TRBaI=; b=zE HVhZz4uTqMJMVJcu3KYGmi2MLjVRMMHNyLX6kcjia1n2F2IQc5io9HeXGOfGGKvZH8iRZIPVZcp77 LYzk7HhHXaOsCZo9gQEC4pSqcpkLutxR9IK8JXRLqlbCiDWp1ZE+40PSHsw0ZI0x9t45osDZMRWM0 Cd2D5NLvGyYD+O8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qhWZ9-006dsL-DM; Sat, 16 Sep 2023 16:46:35 +0200 Date: Sat, 16 Sep 2023 16:46:35 +0200 From: Andrew Lunn To: Bagas Sanjaya Cc: Louis-Marie , Linux USB , Linux Networking , Linux Kernel Mailing List , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Greg Kroah-Hartman , Hayes Wang , Simon Horman , Antonio Napolitano , Douglas Anderson , Andrew Gaul , =?iso-8859-1?Q?Bj=F8rn?= Mork , Jean-Francois Le Fillatre , Dennis Wassenberg , Nicolas Dumazet , Mark Pearson , Hannu Hartikainen , =?utf-8?Q?=C5=81ukasz?= Bartosik Subject: Re: Lenovo Hybrid Dock MAC passtrough patch Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 16 Sep 2023 07:47:46 -0700 (PDT) On Sat, Sep 16, 2023 at 07:14:57PM +0700, Bagas Sanjaya wrote: > On Sat, Sep 16, 2023 at 11:41:49AM +0000, Louis-Marie wrote: > > Hi, > > I would like to submit a patch for enabling mac passtrough for the Lenovo Hybrid Dock. > > Tested with Fedora 6.4.12. > > > > > > > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.cindex 0c13d9950cd8..02e6404bf6ea 100644 > > --- a/drivers/net/usb/r8152.c > > +++ b/drivers/net/usb/r8152.c > > @@ -781,6 +781,7 @@ enum rtl8152_flags { > > ?#define DEVICE_ID_THINKPAD_USB_C_DONGLE ? ? ? ? ? ?0x720c > > ?#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 ? ? 0xa387 > > ?#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 ? ? 0x3062 > > +#define DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK ? ? ? 0xa359 > > > > ?struct tally_counter { > > ? ? __le64 ?tx_packets; > > @@ -9583,6 +9584,7 @@ static bool rtl8152_supports_lenovo_macpassthru(struct usb_device *udev) > > ? ? ? ? case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2: > > ? ? ? ? case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2: > > ? ? ? ? case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3: > > + ? ? ? case DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK: > > ? ? ? ? case DEVICE_ID_THINKPAD_USB_C_DONGLE: > > ? ? ? ? ? ? return 1; > > ? ? ? ? } > > @@ -9832,6 +9834,7 @@ static const struct usb_device_id rtl8152_table[] = { > > ? ? { USB_DEVICE(VENDOR_ID_LENOVO, ?0x7214) }, > > ? ? { USB_DEVICE(VENDOR_ID_LENOVO, ?0x721e) }, > > ? ? { USB_DEVICE(VENDOR_ID_LENOVO, ?0xa387) }, > > + ? { USB_DEVICE(VENDOR_ID_LENOVO, ?0xa359) }, > > ? ? { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, > > ? ? { USB_DEVICE(VENDOR_ID_NVIDIA, ?0x09ff) }, > > ? ? { USB_DEVICE(VENDOR_ID_TPLINK, ?0x0601) }, > > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c > > index 15e9bd180a1d..ad98c8ffbc69 100644 > > --- a/drivers/usb/core/quirks.c > > +++ b/drivers/usb/core/quirks.c > > @@ -470,6 +470,9 @@ static const struct usb_device_id usb_quirk_list[] = { > > ? ? /* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */ > > ? ? { USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM }, > > > > + ? /* Lenovo ThinkPad Hydrid USB-C Dock */ > > + ? { USB_DEVICE(0x17ef, 0xa359), .driver_info = USB_QUIRK_NO_LPM }, > > + > > ? ? /* BUILDWIN Photo Frame */ > > ? ? { USB_DEVICE(0x1908, 0x1315), .driver_info = > > ? ? ? ? ? ? USB_QUIRK_HONOR_BNUMINTERFACES }, > > > > Signed-off-by: Louis-Marie Rauline > > > > Can you send above suggestion as formal patch instead? See > Documentation/process/submitting-patches.rst for how to properly submit > patches. And also, use git-send-email(1) when sending them so that patch > corruption (like tabs converting to spaces and line wrapping as in above > diff) doesn't occur. > > Thanks. This appears to do more than MAC passthrough, e.g. adding a quirk for LPM. Please split the patch up. The MAC passthrough part is likely to be rejected, because MAC pass through is a mess, but the quirk part looks O.K. Andrew