mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ExactCODE <rene@exactcode.com>
To: linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Microsoft Sufrace Dock USB Ethernet
Date: Mon, 16 Jun 2014 18:26:27 +0200	[thread overview]
Message-ID: <13982460-3633-4BA4-A466-31E5A27C2F41@exactcode.com> (raw)

Currently the cdc_ether driver is matched for the Microsoft Surface Dock USB port,
however it does not work and will not send/receive any packets. Instead using the
r8152 driver explicitly appears to work fine for me, so far.

 Signed-off-by: René Rebe <rene@exactcode.com>

--- linux-3.15/drivers/net/usb/cdc_ether.c.orig	2014-06-16 18:01:08.153110776 +0200
+++ linux-3.15/drivers/net/usb/cdc_ether.c	2014-06-16 18:03:21.465111094 +0200
@@ -659,6 +659,13 @@
 	.driver_info = 0,
 },
 
+/* Microsoft Surface Dock Ethernet Adapter */
+{
+	USB_DEVICE_AND_INTERFACE_INFO(0x045e, 0x07ab, USB_CLASS_COMM,
+			USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+	.driver_info = 0,
+},
+
 /* Samsung USB Ethernet Adapters */
 {
 	USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, 0xa101, USB_CLASS_COMM,
--- linux-3.15/drivers/net/usb/r8152.c.orig	2014-06-16 18:00:54.873110744 +0200
+++ linux-3.15/drivers/net/usb/r8152.c	2014-06-16 18:04:45.721111295 +0200
@@ -459,6 +459,9 @@
 #define PRODUCT_ID_RTL8152		0x8152
 #define PRODUCT_ID_RTL8153		0x8153
 
+#define VENDOR_ID_MICROSOFT		0x045e
+#define PRODUCT_ID_MICROSOFT		0x07ab
+
 #define VENDOR_ID_SAMSUNG		0x04e8
 #define PRODUCT_ID_SAMSUNG		0xa101
 
@@ -3381,6 +3384,22 @@
 		}
 		break;
 
+	case VENDOR_ID_MICROSOFT:
+		switch (id->idProduct) {
+		case PRODUCT_ID_MICROSOFT:
+			ops->init		= r8152b_init;
+			ops->enable		= rtl8152_enable;
+			ops->disable		= rtl8152_disable;
+			ops->up			= r8152b_exit_oob;
+			ops->down		= rtl8152_down;
+			ops->unload		= rtl8152_unload;
+			ret = 0;
+			break;
+		default:
+			break;
+		}
+		break;
+
 	case VENDOR_ID_SAMSUNG:
 		switch (id->idProduct) {
 		case PRODUCT_ID_SAMSUNG:
@@ -3512,6 +3531,7 @@
 static struct usb_device_id rtl8152_table[] = {
 	{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8152)},
 	{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8153)},
+	{USB_DEVICE(VENDOR_ID_MICROSOFT, PRODUCT_ID_MICROSOFT)},
 	{USB_DEVICE(VENDOR_ID_SAMSUNG, PRODUCT_ID_SAMSUNG)},
 	{}
 };
-- 
ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
DE Legal: Amtsgericht Berlin (Charlottenburg) HRB 105123B, Tax-ID#: DE251602478
Managing Director: René Rebe
http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de


                 reply	other threads:[~2014-06-16 16:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13982460-3633-4BA4-A466-31E5A27C2F41@exactcode.com \
    --to=rene@exactcode.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®