All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] r8152:  add Linksys USB3GIGV1 id
@ 2017-09-26  1:09 Grant Grundler
  2017-09-26 15:19 ` Doug Anderson
  0 siblings, 1 reply; 7+ messages in thread
From: Grant Grundler @ 2017-09-26  1:09 UTC (permalink / raw)
  To: Hayes Wang; +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 | 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id
  2017-09-26  1:09 [PATCH V2] r8152: add Linksys USB3GIGV1 id Grant Grundler
@ 2017-09-26 15:19 ` Doug Anderson
  2017-09-27  7:15     ` Oliver Neukum
  0 siblings, 1 reply; 7+ messages in thread
From: Doug Anderson @ 2017-09-26 15:19 UTC (permalink / raw)
  To: Grant Grundler
  Cc: Hayes Wang, linux-usb, David S . Miller, LKML, netdev,
	Greg Kroah-Hartman

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id
@ 2017-09-27  7:15     ` Oliver Neukum
  0 siblings, 0 replies; 7+ messages in thread
From: Oliver Neukum @ 2017-09-27  7:15 UTC (permalink / raw)
  To: Doug Anderson, Grant Grundler
  Cc: David S . Miller, Greg Kroah-Hartman, Hayes Wang, LKML,
	linux-usb, netdev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id
@ 2017-09-27  7:15     ` Oliver Neukum
  0 siblings, 0 replies; 7+ messages in thread
From: Oliver Neukum @ 2017-09-27  7:15 UTC (permalink / raw)
  To: Doug Anderson, Grant Grundler
  Cc: David S . Miller, Greg Kroah-Hartman, Hayes Wang, LKML,
	linux-usb, netdev-u79uwXL29TY76Z2rM5mHXA

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

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id
  2017-09-27  7:15     ` Oliver Neukum
  (?)
@ 2017-09-27 16:39     ` Grant Grundler
  2017-09-28 22:28       ` Rustad, Mark D
  -1 siblings, 1 reply; 7+ messages in thread
From: Grant Grundler @ 2017-09-27 16:39 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Doug Anderson, Grant Grundler, David S . Miller,
	Greg Kroah-Hartman, Hayes Wang, LKML, linux-usb, netdev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id
  2017-09-27 16:39     ` Grant Grundler
@ 2017-09-28 22:28       ` Rustad, Mark D
  2017-09-28 23:53         ` Doug Anderson
  0 siblings, 1 reply; 7+ messages in thread
From: Rustad, Mark D @ 2017-09-28 22:28 UTC (permalink / raw)
  To: Grant Grundler
  Cc: Oliver Neukum, Doug Anderson, David S . Miller,
	Greg Kroah-Hartman, Hayes Wang, LKML, linux-usb, netdev

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]


> 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


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id
  2017-09-28 22:28       ` Rustad, Mark D
@ 2017-09-28 23:53         ` Doug Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2017-09-28 23:53 UTC (permalink / raw)
  To: Rustad, Mark D
  Cc: Grant Grundler, Oliver Neukum, David S . Miller,
	Greg Kroah-Hartman, Hayes Wang, LKML, linux-usb, netdev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-28 23:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-26  1:09 [PATCH V2] r8152: add Linksys USB3GIGV1 id Grant Grundler
2017-09-26 15:19 ` Doug Anderson
2017-09-27  7:15   ` Oliver Neukum
2017-09-27  7:15     ` Oliver Neukum
2017-09-27 16:39     ` Grant Grundler
2017-09-28 22:28       ` Rustad, Mark D
2017-09-28 23:53         ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.