[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2F18EF17F@RTITMBSVM03.realtek.com.tw>
Date: Mon, 28 Oct 2019 09:21:28 +0000
From: Hayes Wang <hayeswang@...ltek.com>
To: Kai-Heng Feng <kai.heng.feng@...onical.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"oliver@...kum.org" <oliver@...kum.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
nic_swsd <nic_swsd@...ltek.com>
Subject: RE: [PATCH 2/2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2
Kai-Heng Feng [mailto:kai.heng.feng@...onical.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
Powered by blists - more mailing lists