Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4924038ybl; Tue, 14 Jan 2020 00:05:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwKfvPulxETOCwluIBPilOoH86gQI+O5x5IaVnidh0GfoqG3LG+HzhTgT+7cn3buqJD1Ezg X-Received: by 2002:aca:5795:: with SMTP id l143mr16097087oib.27.1578989110151; Tue, 14 Jan 2020 00:05:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578989110; cv=none; d=google.com; s=arc-20160816; b=ujHTx5JXv+qX/gP+BAVDe1K/PRFhgd05zuJdMGzXbSlUi4fbd/brwxVc/J5dFeuVGe TvdpklJbMo+NrqT8BpOiaObtEGnmQpZEgESIEXSHdPaasFG5H+oGOJhbKDZu1TQ6qLL6 FHyniwnQ/ml4Q2vPeT5u/syGW9FlwKg4GzRsfIDCnYb1w/LkjMxKzLubWi7ZP92ZefAp rFM3MDEF4D1p8H+JkPk+FDzs9bJpqz8ewIttQ+B+0KTjtVP+8JIf7Pi0xuigJg+c/4Rz Q1lsD+922V4WMokn655DGzPz8Bbk8tRoNPF4ROZ8OUWLxZdqDh4bBl8X3tXSVon1E54F z0RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=B09OaSSsVhvh5bePIfpVvNssnZYG6evbUJp/Wudtqmk=; b=UT6Gl6W/FYwQ06fOxxnZjipYpgqCGGlTbNVeGp/jpt2VGR4NqqgE/UIPPJfDuLFu39 +T/rwvTtBTlOca/IEbDE1ZzblSzySipW1TYdMU9Hkk7IxJHfgInbAC45mqneKOIH95u7 c8a/f3F/f3hH+SouoWqFXgaB+CZ81u3xphWS6enmZMSn7REWqwjQyaKr75S4TfEogsGC 4i5BUT4Ym7Qc9UXKf+6QoH/XghtZZH365Y8jpRzi2jScjt2LVIbEgoBMBhI/Ozvu+GCj f7WEYQz1CA9WZcQmok/JcOALAcJL2gsTZ0/9b+0FLSAF/hU4yWSVkCMiIonSK2ChqE1N phaQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si8523191otk.318.2020.01.14.00.04.56; Tue, 14 Jan 2020 00:05:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728901AbgANIEA convert rfc822-to-8bit (ORCPT + 99 others); Tue, 14 Jan 2020 03:04:00 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:39851 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728682AbgANID7 (ORCPT ); Tue, 14 Jan 2020 03:03:59 -0500 Received: from mail-pj1-f71.google.com ([209.85.216.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1irHB5-0006fy-Rr for linux-kernel@vger.kernel.org; Tue, 14 Jan 2020 08:03:56 +0000 Received: by mail-pj1-f71.google.com with SMTP id bg6so7687147pjb.5 for ; Tue, 14 Jan 2020 00:03:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=oyHMiGCOwwLhZ3ql1qP5fClJMPTVAnuOcLkJMOC5WrM=; b=d96i1Tc8bwGvGmCOiuDJ5RSwRNl8nZdZ5Vr+VcjePyFpNiBXLDffWPrOLs0X06ZBe6 fRGfcM4bx/zFhC7ilTmGwTScW/b2WmFMjSmWMiY1mkQ9yrrTTgo4ip5M4I+TqeeEhjSk kM+KgYSIuUVR+ccbV2drQjkouwrHrigclg1QdXQRvyhxbP/2Yo65T9Kn2nAhvaY/73A4 61UbwpAqfz3qPATiKQO+B5GjC8S6qFmAX+MZf6idXWht/bwsLuu8r7T+LJ5pZ5RPoxT7 o7dZaqLzD0ee+2s65p8qhEYBHSIsJK0W9vM4YSsCLw7h4bmFYtltwKr4EeScDv+Ht5ZQ HSmA== X-Gm-Message-State: APjAAAVY+RUiaUoJc9YT5vV0u4R9o6/YxKfcCBYJztzTpZ78tyFzouiR XiqJSjJ9J3fl0bKO19l+SSzaMY5dd/4QmuiidvoZUUp+8inCGFr2bZ+XhWxda7opyRT5/CohxA2 t560yDy7/rWeOHE1vTzlLUP4SIrwe59DRxP43r6LI5g== X-Received: by 2002:a63:ea4c:: with SMTP id l12mr24798748pgk.174.1578989034500; Tue, 14 Jan 2020 00:03:54 -0800 (PST) X-Received: by 2002:a63:ea4c:: with SMTP id l12mr24798706pgk.174.1578989034126; Tue, 14 Jan 2020 00:03:54 -0800 (PST) Received: from 2001-b011-380f-35a3-5d99-e277-e07f-4d26.dynamic-ip6.hinet.net (2001-b011-380f-35a3-5d99-e277-e07f-4d26.dynamic-ip6.hinet.net. [2001:b011:380f:35a3:5d99:e277:e07f:4d26]) by smtp.gmail.com with ESMTPSA id bo19sm15439224pjb.25.2020.01.14.00.03.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2020 00:03:53 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: [PATCH] r8152: Add MAC passthrough support to new device From: Kai-Heng Feng In-Reply-To: Date: Tue, 14 Jan 2020 16:03:50 +0800 Cc: David Miller , Hayes Wang , Jakub Kicinski , Grant Grundler , Mario Limonciello , David Chen , "open list:USB NETWORKING DRIVERS" , "open list:NETWORKING DRIVERS" , open list Content-Transfer-Encoding: 8BIT Message-Id: <14A65209-846C-4C94-9EC3-55605D2528B0@canonical.com> References: <20200114044127.20085-1-kai.heng.feng@canonical.com> To: Prashant Malani X-Mailer: Apple Mail (2.3608.40.2.2.4) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jan 14, 2020, at 15:51, Prashant Malani wrote: > > On Mon, Jan 13, 2020 at 8:41 PM Kai-Heng Feng > wrote: >> >> Device 0xa387 also supports MAC passthrough, therefore add it to the >> whitelst. >> >> BugLink: https://bugs.launchpad.net/bugs/1827961/comments/30 >> Signed-off-by: Kai-Heng Feng >> --- >> drivers/net/usb/r8152.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c >> index c5ebf35d2488..42dcf1442cc0 100644 >> --- a/drivers/net/usb/r8152.c >> +++ b/drivers/net/usb/r8152.c >> @@ -6657,7 +6657,8 @@ static int rtl8152_probe(struct usb_interface *intf, >> } >> >> 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)) > Perhaps we can try to use #define's for these vendor IDs (like > https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L680) > ? We can, but it'll bring some inconsistencies inside of rtl8152_table[], since we don't know idProduct for other devices. Kai-Heng > >> set_bit(LENOVO_MACPASSTHRU, &tp->flags); >> >> if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial && >> -- >> 2.17.1 >>