Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1739412 > unrolled thread

[PATCH V2] r8152: add Linksys USB3GIGV1 id

Started byGrant Grundler <grundler@chromium.org>
First post2017-09-26 03:10 +0200
Last post2017-09-29 02:00 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V2] r8152:  add Linksys USB3GIGV1 id Grant Grundler <grundler@chromium.org> - 2017-09-26 03:10 +0200
    Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id Doug Anderson <dianders@chromium.org> - 2017-09-26 17:30 +0200
      Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id Oliver Neukum <oneukum@suse.com> - 2017-09-27 09:20 +0200
        Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id Grant Grundler <grundler@chromium.org> - 2017-09-27 18:40 +0200
          Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id "Rustad, Mark D" <mark.d.rustad@intel.com> - 2017-09-29 00:30 +0200
            Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id Doug Anderson <dianders@chromium.org> - 2017-09-29 02:00 +0200

#1739412 — [PATCH V2] r8152: add Linksys USB3GIGV1 id

FromGrant Grundler <grundler@chromium.org>
Date2017-09-26 03:10 +0200
Subject[PATCH V2] r8152: add Linksys USB3GIGV1 id
Message-ID<utMxP-5WZ-1@gated-at.bofh.it>
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 | 8 ++++++++
 drivers/net/usb/r8152.c     | 2 ++
 2 files changed, 10 insertions(+)

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..fa5c2e7aff1a 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,13 @@ static const struct usb_device_id	products[] = {
 	.driver_info = 0,
 },
 
+/* 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,
+},
+
 /* 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.1.821.g8fa685d3b7-goog

[toc] | [next] | [standalone]


#1739981 — Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

FromDoug Anderson <dianders@chromium.org>
Date2017-09-26 17:30 +0200
SubjectRe: [PATCH V2] r8152: add Linksys USB3GIGV1 id
Message-ID<utZY5-6wo-17@gated-at.bofh.it>
In reply to#1739412
Hi

On Mon, Sep 25, 2017 at 6:09 PM, 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 | 8 ++++++++
>  drivers/net/usb/r8152.c     | 2 ++
>  2 files changed, 10 insertions(+)
>
> V2: add LINKSYS_VENDOR_ID to cdc_ether blacklist

I understand that in v1 people pointed out that if we didn't add this
to the cdc_ether blacklist that we might end up picking the wrong
driver.  ...but one thing concerns me: what happens if someone has the
CDC_ETHER driver configured in their system but _not_ the R8152
driver?  All of a sudden this USB Ethernet adapter which used to work
fine with the CDC Ethernet driver will stop working.

I know that for at least some of the adapters in the CDC Ethernet
blacklist it was claimed that the CDC Ethernet support in the adapter
was kinda broken anyway so the blacklist made sense.  ...but for the
Linksys Gigabit adapter the CDC Ethernet driver seems to work OK, it's
just not quite as full featured / efficient as the R8152 driver.

Is that not a concern?  I guess you could tell people in this
situation that they simply need to enable the R8152 driver to get
continued support for their Ethernet adapter?


-Doug

[toc] | [prev] | [next] | [standalone]


#1740447 — Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

FromOliver Neukum <oneukum@suse.com>
Date2017-09-27 09:20 +0200
SubjectRe: [PATCH V2] r8152: add Linksys USB3GIGV1 id
Message-ID<uueNs-7BL-23@gated-at.bofh.it>
In reply to#1739981
Am Dienstag, den 26.09.2017, 08:19 -0700 schrieb Doug Anderson:
> 
> I know that for at least some of the adapters in the CDC Ethernet
> blacklist it was claimed that the CDC Ethernet support in the adapter
> was kinda broken anyway so the blacklist made sense.  ...but for the
> Linksys Gigabit adapter the CDC Ethernet driver seems to work OK, it's
> just not quite as full featured / efficient as the R8152 driver.
> 
> Is that not a concern?  I guess you could tell people in this
> situation that they simply need to enable the R8152 driver to get
> continued support for their Ethernet adapter?

Hi,

yes, it is a valid concern. An #ifdef will be needed.

	Regards
		Oliver

[toc] | [prev] | [next] | [standalone]


#1740876 — Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

FromGrant Grundler <grundler@chromium.org>
Date2017-09-27 18:40 +0200
SubjectRe: [PATCH V2] r8152: add Linksys USB3GIGV1 id
Message-ID<uunxo-5yo-5@gated-at.bofh.it>
In reply to#1740447
On Wed, Sep 27, 2017 at 12:15 AM, Oliver Neukum <oneukum@suse.com> wrote:
> Am Dienstag, den 26.09.2017, 08:19 -0700 schrieb Doug Anderson:
>>
>> I know that for at least some of the adapters in the CDC Ethernet
>> blacklist it was claimed that the CDC Ethernet support in the adapter
>> was kinda broken anyway so the blacklist made sense.  ...but for the
>> Linksys Gigabit adapter the CDC Ethernet driver seems to work OK, it's
>> just not quite as full featured / efficient as the R8152 driver.
>>
>> Is that not a concern?  I guess you could tell people in this
>> situation that they simply need to enable the R8152 driver to get
>> continued support for their Ethernet adapter?
>
> Hi,
>
> yes, it is a valid concern. An #ifdef will be needed.

Good idea - I will post V3 shortly.

I'm assuming you mean to add #ifdef CONFIG_USB_RTL8152 around the
blacklist entry in cdc_ether driver.

cheers,
grant

[toc] | [prev] | [next] | [standalone]


#1741829 — Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

From"Rustad, Mark D" <mark.d.rustad@intel.com>
Date2017-09-29 00:30 +0200
SubjectRe: [PATCH V2] r8152: add Linksys USB3GIGV1 id
Message-ID<uuPtD-6ha-1@gated-at.bofh.it>
In reply to#1740876

[Multipart message — attachments visible in raw view] — view raw

> On Sep 27, 2017, at 9:39 AM, Grant Grundler <grundler@chromium.org> wrote:
> 
> On Wed, Sep 27, 2017 at 12:15 AM, Oliver Neukum <oneukum@suse.com> wrote:
>> Am Dienstag, den 26.09.2017, 08:19 -0700 schrieb Doug Anderson:
>>> 
>>> I know that for at least some of the adapters in the CDC Ethernet
>>> blacklist it was claimed that the CDC Ethernet support in the adapter
>>> was kinda broken anyway so the blacklist made sense.  ...but for the
>>> Linksys Gigabit adapter the CDC Ethernet driver seems to work OK, it's
>>> just not quite as full featured / efficient as the R8152 driver.
>>> 
>>> Is that not a concern?  I guess you could tell people in this
>>> situation that they simply need to enable the R8152 driver to get
>>> continued support for their Ethernet adapter?
>> 
>> Hi,
>> 
>> yes, it is a valid concern. An #ifdef will be needed.
> 
> Good idea - I will post V3 shortly.
> 
> I'm assuming you mean to add #ifdef CONFIG_USB_RTL8152 around the
> blacklist entry in cdc_ether driver.

Shouldn't that be an #if IS_ENABLED(...) test, since that seems to be the proper way to check configured drivers.

--
Mark Rustad, Networking Division, Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1741870 — Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

FromDoug Anderson <dianders@chromium.org>
Date2017-09-29 02:00 +0200
SubjectRe: [PATCH V2] r8152: add Linksys USB3GIGV1 id
Message-ID<uuQSK-70Y-11@gated-at.bofh.it>
In reply to#1741829
Hi,

On Thu, Sep 28, 2017 at 3:28 PM, Rustad, Mark D <mark.d.rustad@intel.com> wrote:
>
>> On Sep 27, 2017, at 9:39 AM, Grant Grundler <grundler@chromium.org> wrote:
>>
>> On Wed, Sep 27, 2017 at 12:15 AM, Oliver Neukum <oneukum@suse.com> wrote:
>>> Am Dienstag, den 26.09.2017, 08:19 -0700 schrieb Doug Anderson:
>>>>
>>>> I know that for at least some of the adapters in the CDC Ethernet
>>>> blacklist it was claimed that the CDC Ethernet support in the adapter
>>>> was kinda broken anyway so the blacklist made sense.  ...but for the
>>>> Linksys Gigabit adapter the CDC Ethernet driver seems to work OK, it's
>>>> just not quite as full featured / efficient as the R8152 driver.
>>>>
>>>> Is that not a concern?  I guess you could tell people in this
>>>> situation that they simply need to enable the R8152 driver to get
>>>> continued support for their Ethernet adapter?
>>>
>>> Hi,
>>>
>>> yes, it is a valid concern. An #ifdef will be needed.
>>
>> Good idea - I will post V3 shortly.
>>
>> I'm assuming you mean to add #ifdef CONFIG_USB_RTL8152 around the
>> blacklist entry in cdc_ether driver.
>
> Shouldn't that be an #if IS_ENABLED(...) test, since that seems to be the proper way to check configured drivers.

Yes, I had the same feedback on v3.  See my comments at
<https://patchwork.kernel.org/patch/9974485/>.  Grant has fixed it in
v4.  Please see <https://patchwork.kernel.org/patch/9976657/>.  :)

-Doug

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web