From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0112BC4742C for ; Wed, 4 Nov 2020 06:03:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A48CA22384 for ; Wed, 4 Nov 2020 06:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604469788; bh=CNBW6w417ntcAiRvrPfaTHAtsakiItDjd7ogIUkRVjg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=y+QuA/3dGfNgl7nOdxJ4ze1oB8mUO0DsRjzsQXhm3L785T2i9AXSxgLiBg8vx89Fo IUoLJtqq6wQd7sB+w9E4IdzlwMMclSt3LKU3/K2xgSZspp4V7FHYbVq8hXm2kEl+Wk IaR9xvm6SQp2mVGKV0Mnxf4vqBjM64FhH1mmm/xs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728229AbgKDGDG (ORCPT ); Wed, 4 Nov 2020 01:03:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:37050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728346AbgKDGDG (ORCPT ); Wed, 4 Nov 2020 01:03:06 -0500 Received: from localhost (otava-0257.koleje.cuni.cz [78.128.181.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0114120759; Wed, 4 Nov 2020 06:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604469785; bh=CNBW6w417ntcAiRvrPfaTHAtsakiItDjd7ogIUkRVjg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GVCgSvXgLg4jtrjO5/iv7JCjPBeJb2nZPz6vfaEEa+mhFckLBdvYoPF79nbVLBdHv DAHf+WO5OgG2lVWt6+6QuXr1g8hGuwCQDpfv7kJb1tZYcDHUfWECiixYXMNxMmyL+k MEZxus7zlxiccHjzIaQxWXk4Gogff+2UF5TvDxsE= Date: Wed, 4 Nov 2020 07:02:51 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Hayes Wang Cc: "netdev@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: Re: [PATCH net-next 1/5] r8152: use generic USB macros to define product table Message-ID: <20201104070251.52fe638e@kernel.org> In-Reply-To: References: <20201103192226.2455-1-kabel@kernel.org> <20201103192226.2455-2-kabel@kernel.org> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Wed, 4 Nov 2020 01:57:10 +0000 Hayes Wang wrote: > Marek Beh=C3=BAn > > Sent: Wednesday, November 4, 2020 3:22 AM > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > > index b1770489aca5..85dda591c838 100644 > > --- a/drivers/net/usb/r8152.c > > +++ b/drivers/net/usb/r8152.c > > @@ -6862,20 +6862,12 @@ static void rtl8152_disconnect(struct > > usb_interface *intf) > > } > >=20 > > #define REALTEK_USB_DEVICE(vend, prod) \ > > - .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE | \ > > - USB_DEVICE_ID_MATCH_INT_CLASS, \ > > - .idVendor =3D (vend), \ > > - .idProduct =3D (prod), \ > > - .bInterfaceClass =3D USB_CLASS_VENDOR_SPEC \ > > + USB_DEVICE_INTERFACE_CLASS(vend, prod, USB_CLASS_VENDOR_SPEC) > > \ > > }, \ > > { \ > > - .match_flags =3D USB_DEVICE_ID_MATCH_INT_INFO | \ > > - USB_DEVICE_ID_MATCH_DEVICE, \ > > - .idVendor =3D (vend), \ > > - .idProduct =3D (prod), \ > > - .bInterfaceClass =3D USB_CLASS_COMM, \ > > - .bInterfaceSubClass =3D USB_CDC_SUBCLASS_ETHERNET, \ > > - .bInterfaceProtocol =3D USB_CDC_PROTO_NONE > > + USB_DEVICE_AND_INTERFACE_INFO(vend, prod, USB_CLASS_COMM, \ > > + USB_CDC_SUBCLASS_ETHERNET, \ > > + USB_CDC_PROTO_NONE) > >=20 > > /* table of devices that work with this driver */ > > static const struct usb_device_id rtl8152_table[] =3D { =20 >=20 > I don't use these, because checkpatch.pl would show error. >=20 > $ scripts/checkpatch.pl --file --terse drivers/net/usb/r8152.c > ERROR: Macros with complex values should be enclosed in parentheses >=20 > Best Regards, > Hayes >=20 Hmm, checkpatch did not emit no warnings for me on these patches. Just two CHECKs for the third patch. BTW Hayes, is it possible for me gaining access to Realtek documentation for these chips under NDA? For example via my employer, CZ.NIC? I can't find any such information on Realtek website. Also I could not download the driver from Realtek's website, I had to find it on github. When clicking the download button on [1], it says: Warning The form #10 does not exist or it is not published. BTW2 I am interested whether we can make the internal PHY visible to the Linux PHY subsystem. Marek [1] https://www.realtek.com/en/component/zoo/category/network-interface-control= lers-10-100-1000m-gigabit-ethernet-usb-3-0-software