* [PATCH V3] r8152: add Linksys USB3GIGV1 id
@ 2017-09-27 17:28 Grant Grundler
2017-09-27 23:47 ` Doug Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Grant Grundler @ 2017-09-27 17:28 UTC (permalink / raw)
To: Hayes Wang, Oliver Neukum
Cc: linux-usb, David S . Miller, LKML, netdev, Grant Grundler
This linksys dongle by default comes up in cdc_ether mode.
This patch allows r8152 to claim the device:
Bus 002 Device 002: ID 13b1:0041 Linksys
Signed-off-by: Grant Grundler <grundler@chromium.org>
---
drivers/net/usb/cdc_ether.c | 10 ++++++++++
drivers/net/usb/r8152.c | 2 ++
2 files changed, 12 insertions(+)
V3: for backwards compat, add #ifdef CONFIG_USB_RTL8152 around
the cdc_ether blacklist entry so the cdc_ether driver can
still claim the device if r8152 driver isn't configured.
V2: add LINKSYS_VENDOR_ID to cdc_ether blacklist
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 8ab281b478f2..446dcc0f1f70 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -546,6 +546,7 @@ static const struct driver_info wwan_info = {
#define DELL_VENDOR_ID 0x413C
#define REALTEK_VENDOR_ID 0x0bda
#define SAMSUNG_VENDOR_ID 0x04e8
+#define LINKSYS_VENDOR_ID 0x13b1
#define LENOVO_VENDOR_ID 0x17ef
#define NVIDIA_VENDOR_ID 0x0955
#define HP_VENDOR_ID 0x03f0
@@ -737,6 +738,15 @@ static const struct usb_device_id products[] = {
.driver_info = 0,
},
+#ifdef CONFIG_USB_RTL8152
+/* Linksys USB3GIGV1 Ethernet Adapter */
+{
+ USB_DEVICE_AND_INTERFACE_INFO(LINKSYS_VENDOR_ID, 0x0041, USB_CLASS_COMM,
+ USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+ .driver_info = 0,
+},
+#endif
+
/* ThinkPad USB-C Dock (based on Realtek RTL8153) */
{
USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0x3062, USB_CLASS_COMM,
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index ceb78e2ea4f0..941ece08ba78 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -613,6 +613,7 @@ enum rtl8152_flags {
#define VENDOR_ID_MICROSOFT 0x045e
#define VENDOR_ID_SAMSUNG 0x04e8
#define VENDOR_ID_LENOVO 0x17ef
+#define VENDOR_ID_LINKSYS 0x13b1
#define VENDOR_ID_NVIDIA 0x0955
#define MCU_TYPE_PLA 0x0100
@@ -5316,6 +5317,7 @@ static const struct usb_device_id rtl8152_table[] = {
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7205)},
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x720c)},
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7214)},
+ {REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)},
{REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff)},
{}
};
--
2.14.2.822.g60be5d43e6-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V3] r8152: add Linksys USB3GIGV1 id
2017-09-27 17:28 [PATCH V3] r8152: add Linksys USB3GIGV1 id Grant Grundler
@ 2017-09-27 23:47 ` Doug Anderson
2017-09-28 0:07 ` Grant Grundler
0 siblings, 1 reply; 4+ messages in thread
From: Doug Anderson @ 2017-09-27 23:47 UTC (permalink / raw)
To: Grant Grundler
Cc: Hayes Wang, Oliver Neukum, linux-usb, David S . Miller, LKML, netdev
Hi,
On Wed, Sep 27, 2017 at 10:28 AM, Grant Grundler <grundler@chromium.org> wrote:
> This linksys dongle by default comes up in cdc_ether mode.
> This patch allows r8152 to claim the device:
> Bus 002 Device 002: ID 13b1:0041 Linksys
>
> Signed-off-by: Grant Grundler <grundler@chromium.org>
> ---
> drivers/net/usb/cdc_ether.c | 10 ++++++++++
> drivers/net/usb/r8152.c | 2 ++
> 2 files changed, 12 insertions(+)
>
> V3: for backwards compat, add #ifdef CONFIG_USB_RTL8152 around
> the cdc_ether blacklist entry so the cdc_ether driver can
> still claim the device if r8152 driver isn't configured.
>
> V2: add LINKSYS_VENDOR_ID to cdc_ether blacklist
>
> diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
> index 8ab281b478f2..446dcc0f1f70 100644
> --- a/drivers/net/usb/cdc_ether.c
> +++ b/drivers/net/usb/cdc_ether.c
> @@ -546,6 +546,7 @@ static const struct driver_info wwan_info = {
> #define DELL_VENDOR_ID 0x413C
> #define REALTEK_VENDOR_ID 0x0bda
> #define SAMSUNG_VENDOR_ID 0x04e8
> +#define LINKSYS_VENDOR_ID 0x13b1
> #define LENOVO_VENDOR_ID 0x17ef
Slight nit that "LI" sorts after "LE". You got it right in the other case...
> #define NVIDIA_VENDOR_ID 0x0955
> #define HP_VENDOR_ID 0x03f0
> @@ -737,6 +738,15 @@ static const struct usb_device_id products[] = {
> .driver_info = 0,
> },
>
> +#ifdef CONFIG_USB_RTL8152
> +/* Linksys USB3GIGV1 Ethernet Adapter */
> +{
> + USB_DEVICE_AND_INTERFACE_INFO(LINKSYS_VENDOR_ID, 0x0041, USB_CLASS_COMM,
> + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
> + .driver_info = 0,
> +},
> +#endif
I believe you want to use IS_ENABLED(), don't you?
There's still a weird esoteric side case where kernel modules don't
all need to be included in the filesystem just because they were built
at the same time. ...but IMHO that seems like enough of a nit that we
can probably ignore it unless someone has a better idea.
-Doug
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3] r8152: add Linksys USB3GIGV1 id
2017-09-27 23:47 ` Doug Anderson
@ 2017-09-28 0:07 ` Grant Grundler
2017-09-28 15:11 ` Doug Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Grant Grundler @ 2017-09-28 0:07 UTC (permalink / raw)
To: Doug Anderson
Cc: Grant Grundler, Hayes Wang, Oliver Neukum, linux-usb,
David S . Miller, LKML, netdev
Hi Doug!
On Wed, Sep 27, 2017 at 4:47 PM, Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> On Wed, Sep 27, 2017 at 10:28 AM, Grant Grundler <grundler@chromium.org> wrote:
>> This linksys dongle by default comes up in cdc_ether mode.
>> This patch allows r8152 to claim the device:
>> Bus 002 Device 002: ID 13b1:0041 Linksys
>>
>> Signed-off-by: Grant Grundler <grundler@chromium.org>
>> ---
>> drivers/net/usb/cdc_ether.c | 10 ++++++++++
>> drivers/net/usb/r8152.c | 2 ++
>> 2 files changed, 12 insertions(+)
>>
>> V3: for backwards compat, add #ifdef CONFIG_USB_RTL8152 around
>> the cdc_ether blacklist entry so the cdc_ether driver can
>> still claim the device if r8152 driver isn't configured.
>>
>> V2: add LINKSYS_VENDOR_ID to cdc_ether blacklist
>>
>> diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
>> index 8ab281b478f2..446dcc0f1f70 100644
>> --- a/drivers/net/usb/cdc_ether.c
>> +++ b/drivers/net/usb/cdc_ether.c
>> @@ -546,6 +546,7 @@ static const struct driver_info wwan_info = {
>> #define DELL_VENDOR_ID 0x413C
>> #define REALTEK_VENDOR_ID 0x0bda
>> #define SAMSUNG_VENDOR_ID 0x04e8
>> +#define LINKSYS_VENDOR_ID 0x13b1
>> #define LENOVO_VENDOR_ID 0x17ef
>
> Slight nit that "LI" sorts after "LE". You got it right in the other case...
The list isn't sorted by any rational thing I can see. I managed to
check my OCD reaction to sort the list numerically. :)
>> #define NVIDIA_VENDOR_ID 0x0955
>> #define HP_VENDOR_ID 0x03f0
>> @@ -737,6 +738,15 @@ static const struct usb_device_id products[] = {
>> .driver_info = 0,
>> },
>>
>> +#ifdef CONFIG_USB_RTL8152
>> +/* Linksys USB3GIGV1 Ethernet Adapter */
>> +{
>> + USB_DEVICE_AND_INTERFACE_INFO(LINKSYS_VENDOR_ID, 0x0041, USB_CLASS_COMM,
>> + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
>> + .driver_info = 0,
>> +},
>> +#endif
>
> I believe you want to use IS_ENABLED(), don't you?
Ah yes - I wasn't aware IS_ENABLED existed. Will respin V4 with this
if there isn't any other feedback.
> There's still a weird esoteric side case where kernel modules don't
> all need to be included in the filesystem just because they were built
> at the same time. ...but IMHO that seems like enough of a nit that we
> can probably ignore it unless someone has a better idea.
I think that would require a run time check. I'm perfectly willing to
ignore that case. :)
thanks!
grant
>
>
> -Doug
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3] r8152: add Linksys USB3GIGV1 id
2017-09-28 0:07 ` Grant Grundler
@ 2017-09-28 15:11 ` Doug Anderson
0 siblings, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2017-09-28 15:11 UTC (permalink / raw)
To: Grant Grundler
Cc: Hayes Wang, Oliver Neukum, linux-usb, David S . Miller, LKML, netdev
Hi,
On Wed, Sep 27, 2017 at 5:07 PM, Grant Grundler <grundler@chromium.org> wrote:
>>> #define DELL_VENDOR_ID 0x413C
>>> #define REALTEK_VENDOR_ID 0x0bda
>>> #define SAMSUNG_VENDOR_ID 0x04e8
>>> +#define LINKSYS_VENDOR_ID 0x13b1
>>> #define LENOVO_VENDOR_ID 0x17ef
>>
>> Slight nit that "LI" sorts after "LE". You got it right in the other case...
>
> The list isn't sorted by any rational thing I can see. I managed to
> check my OCD reaction to sort the list numerically. :)
Whoops, you're right. It seems to be in a random order. I just saw
LE, LI, and N sorted properly and jumped to a conclusion. In any
case, if it's all the same to you it'd be nice if you were consistent
between LENOVO/LINKSYS in the two files. :-P
-Doug
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-28 15:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 17:28 [PATCH V3] r8152: add Linksys USB3GIGV1 id Grant Grundler
2017-09-27 23:47 ` Doug Anderson
2017-09-28 0:07 ` Grant Grundler
2017-09-28 15:11 ` Doug Anderson
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).