Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6120976ybl; Tue, 14 Jan 2020 22:20:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxt4dmjWAnQMUM3Jt5LG7utY42nZhBk1EarrWZs86Q4E+nmbvf/n3X230lOJpUrL9p1DCZz X-Received: by 2002:aca:50cd:: with SMTP id e196mr19791919oib.178.1579069250187; Tue, 14 Jan 2020 22:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579069250; cv=none; d=google.com; s=arc-20160816; b=x/DP1DLirFM1EEQ8albkERD7+Zib6UrVBgRYarpnbMx3T8ESedfMMSHXwpbPM80eDp RRkPzn0ZVWlssg4L+Pl1p+LdClbF4KbA+iNjVAGcAIZ6rFqGgF0z4Aqa7jZPSjiwaPvo T97EvoupcwLiL1VBq/ob4JLZFmruFt06aMnZpUPzcFbixVd06feSEuqYAwisJFtNCL5j 3XxT2Wge/Cu4CCPhGrkKHvfl3zs5TS2DA7wRVJyLnACPj7b6xu5mmaGHAlMgysKDUYZM /IVUnjrhUPCXRRIC4ep/gH+Qcosqt3AWi3kZlJ9VCtiziXPPVSll9OVroKItkQilZlSI eVpw== 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=YEXwS6rYoZ4u0kMuOlNA5+TKki9wVIBK8BUshc3Ho0w=; b=sGqGhdzrCnvYc1AVjfY5pnHnV5Khh4RUmXz4OvfTgTgPdd9CpBGH10O0HR2KtNqmaB UDkN1KFpBywPmsadT9UAkL/IYEivnUfOcj7dR606JaGf5WaUEgb4feK/ZHlqKxdYH5oC xxW4CKkrTglpeevNx1Tov5QU+fhjrEbqsgxxr8ifYvSbi3rcXjblh1NAMCdD0eu9A4AE yVcQ95yvtm/BMa5XdZ8sEItWjuEljk60177M4r9ZB7BooxTG7ugoq+M/x9caLMmoj2V4 pM6p8UayfoOK5L9Ov469qKt9HtqH27OV81S6LUNcBSn6KtkwelsV4wDyuLwOLM+PmLAk deQA== 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 l84si8314762oig.5.2020.01.14.22.20.34; Tue, 14 Jan 2020 22:20:50 -0800 (PST) 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 S1728909AbgAOGTZ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 15 Jan 2020 01:19:25 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:59415 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbgAOGTZ (ORCPT ); Wed, 15 Jan 2020 01:19:25 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID 00F6J4nI010830, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id 00F6J4nI010830 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 Jan 2020 14:19:05 +0800 Received: from RTEXMB03.realtek.com.tw (172.21.6.96) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server (TLS) id 14.3.468.0; Wed, 15 Jan 2020 14:19:04 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXMB03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Wed, 15 Jan 2020 14:19:04 +0800 Received: from RTEXMB04.realtek.com.tw ([fe80::d9c5:a079:495e:b999]) by RTEXMB04.realtek.com.tw ([fe80::d9c5:a079:495e:b999%6]) with mapi id 15.01.1779.005; Wed, 15 Jan 2020 14:19:04 +0800 From: Hayes Wang To: Kai-Heng Feng , "davem@davemloft.net" CC: Jakub Kicinski , Prashant Malani , Grant Grundler , "Mario Limonciello" , David Chen , "open list:USB NETWORKING DRIVERS" , "open list:NETWORKING DRIVERS" , open list Subject: RE: [PATCH] r8152: Add MAC passthrough support to new device Thread-Topic: [PATCH] r8152: Add MAC passthrough support to new device Thread-Index: AQHVypTrvWsj1nE3Z02rCzrvB8fQNKfrP9uQ Date: Wed, 15 Jan 2020 06:19:04 +0000 Message-ID: <383516f7b54247bda694bf2a999e68f7@realtek.com> References: <20200114044127.20085-1-kai.heng.feng@canonical.com> In-Reply-To: <20200114044127.20085-1-kai.heng.feng@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: Tuesday, January 14, 2020 12:41 PM [...] > if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO && > - le16_to_cpu(udev->descriptor.idProduct) == 0x3082) > + (le16_to_cpu(udev->descriptor.idProduct) == 0x3082 || > + le16_to_cpu(udev->descriptor.idProduct) == 0xa387)) How about using switch (le16_to_cpu(udev->descriptor.idProduct)) { ... } > set_bit(LENOVO_MACPASSTHRU, &tp->flags); > > if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial > && > -- > 2.17.1 Best Regards, Hayes