Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4914731ybl; Mon, 13 Jan 2020 23:53:35 -0800 (PST) X-Google-Smtp-Source: APXvYqy1aWPoS4GLlxBPUf3BoOktN6Cg3SUTRhibDl0KczhG6psK6faw7uvBmhyT1ScUmxTa7Dcg X-Received: by 2002:a9d:649a:: with SMTP id g26mr7034497otl.214.1578988415627; Mon, 13 Jan 2020 23:53:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578988415; cv=none; d=google.com; s=arc-20160816; b=pGryI8qSS49GMvVnNNwZ4sFfwg7vdnzfRcWdSGbmhRPaaSE1/5oH0KbciSF9Uu3wcT bVTOEXcvtJRJwANuYvDmC4LZMrPI6XZv7yLxVzy3cbwE5MZgxCJNTdJkKwUehz2BRUOB nNaFd8AVx+o7HGjOiooJlffBKY7bADX+cVeH/uUg+hefyhs3Ixn4yhqp9NAKpisJ3fpX vw6rJ/x++0GrXsVnOFLYcy2aiOFAuFoaBCxY6tMs7a6NZoAKn7D5ujoCjoEGveL8vxC8 LkANH3LrYhV4wHh7kFDl0DiBAL/FKJ2nAnle6xsc/1Mafdn+gy3jIj+8LJA8ysXAXeEu Xwsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rhT+e3kmyPDqgmQXDlJ4XsnZWAFBKtN4akZdNapdz4g=; b=cYSOy7qnurD2Ihipn6AEFkvnCpvlmH3DHrU/fGu0tU4EoKCZ7tppJHqYVXws6LuLz6 bQOehsaIaa3jT1E1h6rF52/tMSk/pJ8kNy4o61eVWUbEsFH4nBK/9+7gyWtrO6lUUqmX NNJTz3XDgKywIx1eSesX+EwAh6fpLcpRczQrpf4A2rdl3UWArk0yoAn0yLSQ0TFv8hgR UfVw86dzofj8ZMDU4UelBG86MoZsrxGHA4+ZLF4pa1LeSPo2q3m/WU22zuKK/RZpTFh0 sWnwSyXCHrh5aEF3Gtv27OVHAftr30n1QiTNcSSniVUu+hYyBgruZUHnfBlN/4sSQ5JB rO8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="WZsk/3S9"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si7107273oix.197.2020.01.13.23.53.22; Mon, 13 Jan 2020 23:53:35 -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; dkim=pass header.i=@chromium.org header.s=google header.b="WZsk/3S9"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729027AbgANHv7 (ORCPT + 99 others); Tue, 14 Jan 2020 02:51:59 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:42829 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbgANHv4 (ORCPT ); Tue, 14 Jan 2020 02:51:56 -0500 Received: by mail-qt1-f195.google.com with SMTP id j5so11645650qtq.9 for ; Mon, 13 Jan 2020 23:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rhT+e3kmyPDqgmQXDlJ4XsnZWAFBKtN4akZdNapdz4g=; b=WZsk/3S904U6Amhzam+HkGVGpD9ofxhA0809RiDrT4fVh1PaMXFYcK96PQcfeyPXZl FlPKJH9jlqc5Ygh1B+1E3BbPSYyZiE9w4na87cGBZfI0kChGFZNae2WE61YWxiuqQeTN zuAGmr5K/3zvgCUsMOh1QPxfKAKIsTYj2kOwg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rhT+e3kmyPDqgmQXDlJ4XsnZWAFBKtN4akZdNapdz4g=; b=hpfP0l8Ithd1juClecBZOcZ73K3BVIgMGGHkhbwoawH6DO2tWJj8n2rD55A5by6T+G VJ0H5EWnsu7uTUcyWIIrV4Dnkq1w5SIJi2nGY7RqbM/xzk5Gh19tgxsl5jEJTvQbA+q4 T6/n2pFf5ERs7yvggX1RKoAI6A7Ta31d2TGEO7iWm013Xz5Kqtg591iwfM6+yISr8DBn fIi3uVV03TjA57EOXgEpBBYBLF/gtGmjnbHHE+lf7zAqSpPdnlS/niUul7il7VoTdqHa AASOKLsveeiLC8lq4RpYZyYUZdOdJ/UI+HxQEr7jyhnoZycjesLxCMZkUNZu9uiYxfNf xeiA== X-Gm-Message-State: APjAAAW17vocLTjOYarbAS8jqNt/sa0Dqq3htTUi0LZEwla63gAywdeG C01/IayMSuE/wx8xmTAFrahDHq00awKH6poVBWvjBK+k534= X-Received: by 2002:aed:29e1:: with SMTP id o88mr2577201qtd.182.1578988313958; Mon, 13 Jan 2020 23:51:53 -0800 (PST) MIME-Version: 1.0 References: <20200114044127.20085-1-kai.heng.feng@canonical.com> In-Reply-To: <20200114044127.20085-1-kai.heng.feng@canonical.com> From: Prashant Malani Date: Mon, 13 Jan 2020 23:51:42 -0800 Message-ID: Subject: Re: [PATCH] r8152: Add MAC passthrough support to new device To: Kai-Heng Feng 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-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) ? > set_bit(LENOVO_MACPASSTHRU, &tp->flags); > > if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial && > -- > 2.17.1 >