* [PATCH] r8152 add Microsoft Dock IDs @ 2016-01-13 17:06 René Rebe 2016-01-13 19:51 ` David Miller 0 siblings, 1 reply; 11+ messages in thread From: René Rebe @ 2016-01-13 17:06 UTC (permalink / raw) To: netdev; +Cc: nic_swsd Hi there, The Microsoft Surface Docks uses a R8152, too. Signed-off-by: René Rebe <rene@exactcode.com> --- linux-3.19/drivers/net/usb/r8152.c.orig 2015-02-09 02:54:22.000000000 +0000 +++ linux-3.19/drivers/net/usb/r8152.c 2015-02-15 15:52:52.924000000 +0000 @@ -462,6 +462,7 @@ /* Define these values to match your device */ #define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_MICROSOFT 0x045e #define VENDOR_ID_SAMSUNG 0x04e8 #define MCU_TYPE_PLA 0x0100 @@ -3932,6 +3933,8 @@ static struct usb_device_id rtl8152_table[] = { {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, {} }; -- ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152 add Microsoft Dock IDs 2016-01-13 17:06 [PATCH] r8152 add Microsoft Dock IDs René Rebe @ 2016-01-13 19:51 ` David Miller 2016-01-13 20:03 ` René Rebe 0 siblings, 1 reply; 11+ messages in thread From: David Miller @ 2016-01-13 19:51 UTC (permalink / raw) To: rene; +Cc: netdev, nic_swsd From: René Rebe <rene@exactcode.com> Date: Wed, 13 Jan 2016 18:06:36 +0100 > Hi there, > > The Microsoft Surface Docks uses a R8152, too. > > Signed-off-by: René Rebe <rene@exactcode.com> Your patch was corrupted by your email client. Please fix this, send a test patch to yourself, and please do not resubmit the patch here until after you can successfully apply the patch you receive in that test email. Please also do not use attachments to solve this problem. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152 add Microsoft Dock IDs 2016-01-13 19:51 ` David Miller @ 2016-01-13 20:03 ` René Rebe 2016-01-13 20:49 ` David Miller 0 siblings, 1 reply; 11+ messages in thread From: René Rebe @ 2016-01-13 20:03 UTC (permalink / raw) To: David Miller; +Cc: netdev, nic_swsd Hi David, On Jan 13, 2016, at 20:51, David Miller <davem@davemloft.net> wrote: > Your patch was corrupted by your email client. Ieek, guess that’s what I get from not using Mew on my Ultra5 anymore :-/ Crossing fingers it works this time, ... The Microsoft Surface Docks uses a R8152, too. Signed-off-by: René Rebe <rene@exactcode.com> --- linux-3.19/drivers/net/usb/r8152.c.orig 2015-02-09 02:54:22.000000000 +0000 +++ linux-3.19/drivers/net/usb/r8152.c 2015-02-15 15:52:52.924000000 +0000 @@ -462,6 +462,7 @@ /* Define these values to match your device */ #define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_MICROSOFT 0x045e #define VENDOR_ID_SAMSUNG 0x04e8 #define MCU_TYPE_PLA 0x0100 @@ -3932,6 +3933,8 @@ static struct usb_device_id rtl8152_table[] = { {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, {} }; -- ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152 add Microsoft Dock IDs 2016-01-13 20:03 ` René Rebe @ 2016-01-13 20:49 ` David Miller 2017-03-28 4:42 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 Rene Rebe 0 siblings, 1 reply; 11+ messages in thread From: David Miller @ 2016-01-13 20:49 UTC (permalink / raw) To: rene; +Cc: netdev, nic_swsd From: René Rebe <rene@exactcode.com> Date: Wed, 13 Jan 2016 21:03:30 +0100 > Hi David, > > On Jan 13, 2016, at 20:51, David Miller <davem@davemloft.net> wrote: > >> Your patch was corrupted by your email client. > > Ieek, guess that’s what I get from not using Mew on my Ultra5 anymore :-/ > Crossing fingers it works this time, ... > > The Microsoft Surface Docks uses a R8152, too. > > Signed-off-by: René Rebe <rene@exactcode.com> Sorry, this does not apply to my net tree at all. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] r8152: The Microsoft Surface docks also use R8152. 2016-01-13 20:49 ` David Miller @ 2017-03-28 4:42 ` Rene Rebe 2017-03-30 17:06 ` Dan Williams 0 siblings, 1 reply; 11+ messages in thread From: Rene Rebe @ 2017-03-28 4:42 UTC (permalink / raw) To: davem; +Cc: netdev, nic_swsd Without this the generic cdc_ether grabs the device, and does not really work. Signed-off-by: René Rebe <rene@exactcode.com> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c34df33..07f788c 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -517,6 +517,7 @@ enum rtl8152_flags { /* Define these values to match your device */ #define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_MICROSOFT 0x045e #define VENDOR_ID_SAMSUNG 0x04e8 #define VENDOR_ID_LENOVO 0x17ef #define VENDOR_ID_NVIDIA 0x0955 @@ -4521,6 +4522,8 @@ static void rtl8152_disconnect(struct usb_interface *intf) static struct usb_device_id rtl8152_table[] = { {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, -- René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin http://exactcode.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152: The Microsoft Surface docks also use R8152. 2017-03-28 4:42 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 Rene Rebe @ 2017-03-30 17:06 ` Dan Williams 2017-03-28 5:56 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 v2 Rene Rebe 2017-03-30 17:47 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 René Rebe 0 siblings, 2 replies; 11+ messages in thread From: Dan Williams @ 2017-03-30 17:06 UTC (permalink / raw) To: Rene Rebe, davem; +Cc: netdev, nic_swsd On Tue, 2017-03-28 at 06:42 +0200, Rene Rebe wrote: > Without this the generic cdc_ether grabs the device, > and does not really work. Does this need a corresponding blacklist in cdc_ether then? Otherwise you're really depending on driver loading order. Dan > Signed-off-by: René Rebe <rene@exactcode.com> > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index c34df33..07f788c 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -517,6 +517,7 @@ enum rtl8152_flags { > > /* Define these values to match your device */ > #define VENDOR_ID_REALTEK 0x0bda > +#define VENDOR_ID_MICROSOFT 0x045e > #define VENDOR_ID_SAMSUNG 0x04e8 > #define VENDOR_ID_LENOVO 0x17ef > #define VENDOR_ID_NVIDIA 0x0955 > @@ -4521,6 +4522,8 @@ static void rtl8152_disconnect(struct > usb_interface *intf) > static struct usb_device_id rtl8152_table[] = { > {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, > {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, > + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, > + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, > {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, > {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, > {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, > > > -- > René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin > http://exactcode.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] r8152: The Microsoft Surface docks also use R8152 v2 2017-03-30 17:06 ` Dan Williams @ 2017-03-28 5:56 ` Rene Rebe 2017-04-01 19:20 ` David Miller 2017-03-30 17:47 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 René Rebe 1 sibling, 1 reply; 11+ messages in thread From: Rene Rebe @ 2017-03-28 5:56 UTC (permalink / raw) To: dcbw; +Cc: davem, netdev, nic_swsd Without this the generic cdc_ether grabs the device, and does not really work. Signed-off-by: René Rebe <rene@exactcode.de> diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index f5552aa..f3ae88f 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -532,6 +532,7 @@ static const struct driver_info wwan_info = { #define LENOVO_VENDOR_ID 0x17ef #define NVIDIA_VENDOR_ID 0x0955 #define HP_VENDOR_ID 0x03f0 +#define MICROSOFT_VENDOR_ID 0x045e static const struct usb_device_id products[] = { /* BLACKLIST !! @@ -761,6 +762,20 @@ static const struct usb_device_id products[] = { .driver_info = 0, }, +/* Microsoft Surface 2 dock (based on Realtek RTL8152) */ +{ + USB_DEVICE_AND_INTERFACE_INFO(MICROSOFT_VENDOR_ID, 0x07ab, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info = 0, +}, + +/* Microsoft Surface 3 dock (based on Realtek RTL8153) */ +{ + USB_DEVICE_AND_INTERFACE_INFO(MICROSOFT_VENDOR_ID, 0x07c6, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info = 0, +}, + /* WHITELIST!!! * * CDC Ether uses two interfaces, not necessarily consecutive. diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c34df33..07f788c 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -517,6 +517,7 @@ enum rtl8152_flags { /* Define these values to match your device */ #define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_MICROSOFT 0x045e #define VENDOR_ID_SAMSUNG 0x04e8 #define VENDOR_ID_LENOVO 0x17ef #define VENDOR_ID_NVIDIA 0x0955 @@ -4521,6 +4522,8 @@ static void rtl8152_disconnect(struct usb_interface *intf) static struct usb_device_id rtl8152_table[] = { {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, -- René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin http://exactcode.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152: The Microsoft Surface docks also use R8152 v2 2017-03-28 5:56 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 v2 Rene Rebe @ 2017-04-01 19:20 ` David Miller 0 siblings, 0 replies; 11+ messages in thread From: David Miller @ 2017-04-01 19:20 UTC (permalink / raw) To: rene; +Cc: dcbw, netdev, nic_swsd From: Rene Rebe <rene@exactcode.com> Date: Tue, 28 Mar 2017 07:56:51 +0200 (CEST) > Without this the generic cdc_ether grabs the device, > and does not really work. > > Signed-off-by: René Rebe <rene@exactcode.de> Applied, thank you. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152: The Microsoft Surface docks also use R8152. 2017-03-30 17:06 ` Dan Williams 2017-03-28 5:56 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 v2 Rene Rebe @ 2017-03-30 17:47 ` René Rebe 2017-03-30 18:12 ` Dan Williams 1 sibling, 1 reply; 11+ messages in thread From: René Rebe @ 2017-03-30 17:47 UTC (permalink / raw) To: Dan Williams; +Cc: davem, netdev, nic_swsd Hi, On Mar 30, 2017, at 19:06, Dan Williams <dcbw@redhat.com> wrote: > On Tue, 2017-03-28 at 06:42 +0200, Rene Rebe wrote: >> Without this the generic cdc_ether grabs the device, >> and does not really work. > > Does this need a corresponding blacklist in cdc_ether then? Otherwise > you're really depending on driver loading order. right, I already test build, and will send after reboot. Any other nitpick in the meantime? > Dan > >> Signed-off-by: René Rebe <rene@exactcode.com> >> >> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c >> index c34df33..07f788c 100644 >> --- a/drivers/net/usb/r8152.c >> +++ b/drivers/net/usb/r8152.c >> @@ -517,6 +517,7 @@ enum rtl8152_flags { >> >> /* Define these values to match your device */ >> #define VENDOR_ID_REALTEK 0x0bda >> +#define VENDOR_ID_MICROSOFT 0x045e >> #define VENDOR_ID_SAMSUNG 0x04e8 >> #define VENDOR_ID_LENOVO 0x17ef >> #define VENDOR_ID_NVIDIA 0x0955 >> @@ -4521,6 +4522,8 @@ static void rtl8152_disconnect(struct >> usb_interface *intf) >> static struct usb_device_id rtl8152_table[] = { >> {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, >> {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, >> + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, >> + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, >> {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, >> >> >> -- >> René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin >> http://exactcode.com | http://t2-project.org | http://rene.rebe.de -- ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152: The Microsoft Surface docks also use R8152. 2017-03-30 17:47 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 René Rebe @ 2017-03-30 18:12 ` Dan Williams 2017-03-28 6:00 ` Rene Rebe 0 siblings, 1 reply; 11+ messages in thread From: Dan Williams @ 2017-03-30 18:12 UTC (permalink / raw) To: René Rebe; +Cc: davem, netdev, nic_swsd On Thu, 2017-03-30 at 19:47 +0200, René Rebe wrote: > Hi, > > On Mar 30, 2017, at 19:06, Dan Williams <dcbw@redhat.com> wrote: > > > On Tue, 2017-03-28 at 06:42 +0200, Rene Rebe wrote: > > > Without this the generic cdc_ether grabs the device, > > > and does not really work. > > > > Does this need a corresponding blacklist in cdc_ether > > then? Otherwise > > you're really depending on driver loading order. > > right, I already test build, and will send after reboot. > > Any other nitpick in the meantime? Nope, other than it's pretty odd that the device would expose standard cdc-ether compatible USB descriptors, but apparently not be compatible with cdc-ether? Are we sure we don't just need a tweak or something to cdc-ether? Dan > > Dan > > > > > Signed-off-by: René Rebe <rene@exactcode.com> > > > > > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > > > index c34df33..07f788c 100644 > > > --- a/drivers/net/usb/r8152.c > > > +++ b/drivers/net/usb/r8152.c > > > @@ -517,6 +517,7 @@ enum rtl8152_flags { > > > > > > /* Define these values to match your device */ > > > #define VENDOR_ID_REALTEK 0x0bda > > > +#define VENDOR_ID_MICROSOFT 0x045e > > > #define VENDOR_ID_SAMSUNG 0x04e8 > > > #define VENDOR_ID_LENOVO 0x17ef > > > #define VENDOR_ID_NVIDIA 0x0955 > > > @@ -4521,6 +4522,8 @@ static void rtl8152_disconnect(struct > > > usb_interface *intf) > > > static struct usb_device_id rtl8152_table[] = { > > > {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)}, > > > {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, > > > + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, > > > + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, > > > {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, > > > {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, > > > {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, > > > > > > > > > -- > > > René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 > > > Berlin > > > http://exactcode.com | http://t2-project.org | > > > http://rene.rebe.de > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] r8152: The Microsoft Surface docks also use R8152. 2017-03-30 18:12 ` Dan Williams @ 2017-03-28 6:00 ` Rene Rebe 0 siblings, 0 replies; 11+ messages in thread From: Rene Rebe @ 2017-03-28 6:00 UTC (permalink / raw) To: dcbw; +Cc: davem, netdev, nic_swsd > On Thu, 2017-03-30 at 19:47 +0200, René Rebe wrote: > > Hi, > > > > On Mar 30, 2017, at 19:06, Dan Williams <dcbw@redhat.com> wrote: > > > > > On Tue, 2017-03-28 at 06:42 +0200, Rene Rebe wrote: > > > > Without this the generic cdc_ether grabs the device, > > > > and does not really work. > > > > > > Does this need a corresponding blacklist in cdc_ether > > > then? Otherwise > > > you're really depending on driver loading order. > > > > right, I already test build, and will send after reboot. > > > > Any other nitpick in the meantime? > > Nope, other than it's pretty odd that the device would expose standard > cdc-ether compatible USB descriptors, but apparently not be compatible > with cdc-ether? Are we sure we don't just need a tweak or something to > cdc-ether? Based on the existing glue and blacklist code I would assume most if not all R8152 devices have this "issue". However, sometimes the standard macOS driver works with it. IIRC if the dock is connected after booting or so, so maybe the BIOS network boot glue alters the behavior or whatever. It never was able to TX any packet with the generic Linux cdc-ether, though. Anyways, given the existing specific Linux driver I would assume it is better to use it in any case. René -- René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin http://exactcode.com | http://t2-project.org | http://rene.rebe.de ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-04-01 19:20 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-01-13 17:06 [PATCH] r8152 add Microsoft Dock IDs René Rebe 2016-01-13 19:51 ` David Miller 2016-01-13 20:03 ` René Rebe 2016-01-13 20:49 ` David Miller 2017-03-28 4:42 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 Rene Rebe 2017-03-30 17:06 ` Dan Williams 2017-03-28 5:56 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 v2 Rene Rebe 2017-04-01 19:20 ` David Miller 2017-03-30 17:47 ` [PATCH] r8152: The Microsoft Surface docks also use R8152 René Rebe 2017-03-30 18:12 ` Dan Williams 2017-03-28 6:00 ` Rene Rebe
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.