From: "Marek Behún" <kabel@kernel.org>
To: Hayes Wang <hayeswang@realtek.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH net-next 1/5] r8152: use generic USB macros to define product table
Date: Wed, 4 Nov 2020 07:02:51 +0100 [thread overview]
Message-ID: <20201104070251.52fe638e@kernel.org> (raw)
In-Reply-To: <b83ddcca96cb40cf8785e6b44f9838e0@realtek.com>
On Wed, 4 Nov 2020 01:57:10 +0000
Hayes Wang <hayeswang@realtek.com> wrote:
> Marek Behún <kabel@kernel.org>
> > 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)
> > }
> >
> > #define REALTEK_USB_DEVICE(vend, prod) \
> > - .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
> > - USB_DEVICE_ID_MATCH_INT_CLASS, \
> > - .idVendor = (vend), \
> > - .idProduct = (prod), \
> > - .bInterfaceClass = USB_CLASS_VENDOR_SPEC \
> > + USB_DEVICE_INTERFACE_CLASS(vend, prod, USB_CLASS_VENDOR_SPEC)
> > \
> > }, \
> > { \
> > - .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | \
> > - USB_DEVICE_ID_MATCH_DEVICE, \
> > - .idVendor = (vend), \
> > - .idProduct = (prod), \
> > - .bInterfaceClass = USB_CLASS_COMM, \
> > - .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, \
> > - .bInterfaceProtocol = USB_CDC_PROTO_NONE
> > + USB_DEVICE_AND_INTERFACE_INFO(vend, prod, USB_CLASS_COMM, \
> > + USB_CDC_SUBCLASS_ETHERNET, \
> > + USB_CDC_PROTO_NONE)
> >
> > /* table of devices that work with this driver */
> > static const struct usb_device_id rtl8152_table[] = {
>
> I don't use these, because checkpatch.pl would show error.
>
> $ scripts/checkpatch.pl --file --terse drivers/net/usb/r8152.c
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Best Regards,
> Hayes
>
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-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software
next prev parent reply other threads:[~2020-11-04 6:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 19:22 [PATCH net-next 0/5] r8152 changes Marek Behún
2020-11-03 19:22 ` [PATCH net-next 1/5] r8152: use generic USB macros to define product table Marek Behún
2020-11-04 1:57 ` Hayes Wang
2020-11-04 6:02 ` Marek Behún [this message]
2020-11-04 7:14 ` Hayes Wang
2020-11-04 8:53 ` Greg KH
2020-11-03 19:22 ` [PATCH net-next 2/5] r8152: cosmetic improvement of product table macro Marek Behún
2020-11-03 19:22 ` [PATCH net-next 3/5] r8152: add MCU typed read/write functions Marek Behún
2020-11-03 21:47 ` Vladimir Oltean
2020-11-04 5:55 ` Marek Behún
2020-11-04 8:47 ` Vladimir Oltean
2020-11-04 10:25 ` Marek Behún
2020-11-04 10:35 ` Marek Behún
2020-11-04 11:00 ` Vladimir Oltean
2020-11-04 11:10 ` Marek Behún
2020-11-04 12:14 ` Vladimir Oltean
2020-11-04 21:07 ` Jakub Kicinski
2020-11-05 9:54 ` Marek Behún
2020-11-05 10:56 ` Vladimir Oltean
2020-11-05 11:30 ` Marek Behún
2020-11-05 12:06 ` Vladimir Oltean
2020-11-06 3:01 ` Hayes Wang
2020-11-06 6:39 ` Marek Behún
2020-11-06 7:39 ` Hayes Wang
2020-11-03 19:22 ` [PATCH net-next 4/5] r8152: rename r8153_phy_status to r8153_phy_status_wait Marek Behún
2020-11-03 19:22 ` [PATCH net-next 5/5] r8152: use *_modify helpers instead of read/write combos Marek Behún
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104070251.52fe638e@kernel.org \
--to=kabel@kernel.org \
--cc=hayeswang@realtek.com \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).