Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3725950ybg; Mon, 28 Oct 2019 18:10:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOIBq71lFZ3tPUaH9O0ZF/aX99TOllnUIEqL0HPKbLOSmkKeIVYrH85DMyhzvplq5ORswl X-Received: by 2002:a17:906:1c97:: with SMTP id g23mr793109ejh.66.1572311439657; Mon, 28 Oct 2019 18:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572311439; cv=none; d=google.com; s=arc-20160816; b=Hb9HD31krfev4o391KW+EXwUzlGbBBDwU6Dao2zhq1vvS4T2/FnfXiIae5brzt0Gq2 JO0eFTLO5C+Ssnh/7DDGqt0WMP2aOindfszmTf0vyyUhArNWoHH6ixpTp6ScXfFNpsiG RtNKm/ft66I7dBXy+JfPTwFcp54KP5VLH1jQpJp/k4rAky6CqE/fLk2VcjLODy7Fl990 lQ3Ea2xXeRtp5vV2If0DTI3sJxZnlPWYwTKGWhrkF2bD1Jm1Js4Vlgzf0j4gxiBfp2jR xkdxqG3W1B7zgjynlg5iXXxmCwywFs1FrYsAB9NRCnh2+QL6MWeFr79aIiG4bo/Va3V8 eDuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=FqParBkK3RZ/PSpAYXSHti+CvD72c+BZKpiRmNLn9tY=; b=SdDOpPh+VRNPbVazxHhxRu8Cq3vn1LAjeV5aJIjVXUtjB4/469v4x/XYdJK/O6KDc5 hF43gVFufXtQ+Tm59Wmba6nSWJRAjZCEpbzcE6iGy11/3PTBEJSmQ5WttKLpee37o27s SB9U9LMWY1qu8k3ywQac87L6jdmVeG2Uh4VXRiazRWv89WpBUzbWe3ow6SnGX4ZARAKn U/h8l8k94WGn26PlzvY2/UwsNiZkKTAVkYs1IVYN7dSvEsCtaqA6tbJtYOB1n1nBbiZv z269cKL/Oz7woFSGxbJnHLXkT2krvLkrCMboSIVZCI3Z1t/+mD0nZMGuJYIvsIvipIJV 3u2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si7270668ejc.428.2019.10.28.18.10.15; Mon, 28 Oct 2019 18:10:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731951AbfJ1JWA convert rfc822-to-8bit (ORCPT + 99 others); Mon, 28 Oct 2019 05:22:00 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:54491 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728941AbfJ1JV7 (ORCPT ); Mon, 28 Oct 2019 05:21:59 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x9S9LbRM014005, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV02.realtek.com.tw[172.21.6.19]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x9S9LbRM014005 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 28 Oct 2019 17:21:41 +0800 Received: from RTITMBSVM03.realtek.com.tw ([fe80::e1fe:b2c1:57ec:f8e1]) by RTITCASV02.realtek.com.tw ([::1]) with mapi id 14.03.0468.000; Mon, 28 Oct 2019 17:21:29 +0800 From: Hayes Wang To: Kai-Heng Feng CC: "davem@davemloft.net" , "oliver@neukum.org" , "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , nic_swsd Subject: RE: [PATCH 2/2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2 Thread-Topic: [PATCH 2/2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2 Thread-Index: AQHViyNIwWDKAImfZESSShiKae+s26dvaNpQ//+TW4CAAMxToA== Date: Mon, 28 Oct 2019 09:21:28 +0000 Message-ID: <0835B3720019904CB8F7AA43166CEEB2F18EF17F@RTITMBSVM03.realtek.com.tw> References: <20191025105919.689-1-kai.heng.feng@canonical.com> <20191025105919.689-2-kai.heng.feng@canonical.com> <0835B3720019904CB8F7AA43166CEEB2F18EEE4D@RTITMBSVM03.realtek.com.tw> <3980F066-6783-45A6-9B34-1D838C2C1A2C@canonical.com> In-Reply-To: <3980F066-6783-45A6-9B34-1D838C2C1A2C@canonical.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.177.214] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kai-Heng Feng [mailto:kai.heng.feng@canonical.com] > Sent: Monday, October 28, 2019 12:58 PM [...] > >> @@ -6754,6 +6779,8 @@ static const struct usb_device_id rtl8152_table[] > = { > >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f, 0)}, > >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062, 0)}, > >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3069, 0)}, > >> + {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3082, > >> + R8152_QUIRK_LENOVO_MACPASSTHRU)}, > > > > This limits the usage of driver_info. For example, I couldn't > > use it to store a pointer address anymore. > > But will the driver ever use .driver_info for pointers? > There are many driver use it for quirks and quirks only. I prefer to keep .driver_info empty, even though it is not used currently. The R8152_QUIRK_LENOVO_MACPASSTHRU is only used to set the flag of LENOVO_MACPASSTHRU in probe(), and it is used only once. Besides, it could be replaced by checking the vendor ID and product ID. Therefore, I don't think it is necessary to use driver_info , unless there are more devices needing it. Best Regards, Hayes