From: Hayes Wang <hayeswang@realtek.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"oliver@neukum.org" <oliver@neukum.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
nic_swsd <nic_swsd@realtek.com>
Subject: RE: [PATCH 2/2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2
Date: Mon, 28 Oct 2019 09:21:28 +0000 [thread overview]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2F18EF17F@RTITMBSVM03.realtek.com.tw> (raw)
In-Reply-To: <3980F066-6783-45A6-9B34-1D838C2C1A2C@canonical.com>
Kai-Heng Feng [mailto:kai.heng.feng@canonical.com]
> Sent: Monday, October 28, 2019 12:58 PM
[...]
> >> @@ -6754,6 +6779,8 @@ static const struct usb_device_id rtl8152_table[]
> = {
> >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f, 0)},
> >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062, 0)},
> >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3069, 0)},
> >> + {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3082,
> >> + R8152_QUIRK_LENOVO_MACPASSTHRU)},
> >
> > This limits the usage of driver_info. For example, I couldn't
> > use it to store a pointer address anymore.
>
> But will the driver ever use .driver_info for pointers?
> There are many driver use it for quirks and quirks only.
I prefer to keep .driver_info empty, even though it is not
used currently.
The R8152_QUIRK_LENOVO_MACPASSTHRU is only used to set the
flag of LENOVO_MACPASSTHRU in probe(), and it is used only once.
Besides, it could be replaced by checking the vendor ID and
product ID. Therefore, I don't think it is necessary to use
driver_info , unless there are more devices needing it.
Best Regards,
Hayes
next prev parent reply other threads:[~2019-10-28 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 10:59 [PATCH 1/2] r8152: Pass driver_info to REALTEK_USB_DEVICE() macro Kai-Heng Feng
2019-10-25 10:59 ` [PATCH 2/2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2 Kai-Heng Feng
2019-10-28 3:58 ` Hayes Wang
2019-10-28 4:58 ` Kai-Heng Feng
2019-10-28 9:21 ` Hayes Wang [this message]
2019-10-28 9:41 ` [PATCH 1/2] r8152: Pass driver_info to REALTEK_USB_DEVICE() macro Hayes Wang
2019-10-28 9:52 ` Kai-Heng Feng
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=0835B3720019904CB8F7AA43166CEEB2F18EF17F@RTITMBSVM03.realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=oliver@neukum.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