[LEDE-DEV] [PATCH 2/2] kernel: kmod-usb-net-pl: Add support for PL-27A1
Roman Spychała
roed at onet.eu
Tue Apr 25 04:07:38 PDT 2017
From: Roman Spychała <roed at onet.eu>
Just applying the same patch to 4.4 and 4.9 kernels.
Signed-off-by: Roman Spychała <roed at onet.eu>
---
package/kernel/linux/modules/usb.mk | 4 +-
.../870-usb-plusb-Add-support-for-PL-27A1.patch | 72 ++++++++++++++++++++++
.../870-usb-plusb-Add-support-for-PL-27A1.patch | 72 ++++++++++++++++++++++
3 files changed, 146 insertions(+), 2 deletions(-)
create mode 100644 target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch
create mode 100644 target/linux/generic/patches-4.9/870-usb-plusb-Add-support-for-PL-27A1.patch
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 5ea508d6e3..f2059a516b 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -1284,7 +1284,7 @@ endef
$(eval $(call KernelPackage,usb-net-kalmia))
define KernelPackage/usb-net-pl
- TITLE:=Prolific PL-2301/2302/25A1 based cables
+ TITLE:=Prolific PL-2301/2302/25A1/27A1 based cables
KCONFIG:=CONFIG_USB_NET_PLUSB
FILES:=$(LINUX_DIR)/drivers/net/usb/plusb.ko
AUTOLOAD:=$(call AutoProbe,plusb)
@@ -1292,7 +1292,7 @@ define KernelPackage/usb-net-pl
endef
define KernelPackage/usb-net-pl/description
- Kernel support for Prolific PL-2301/2302/25A1 based cables
+ Kernel support for Prolific PL-2301/2302/25A1/27A1 based cables
endef
$(eval $(call KernelPackage,usb-net-pl))
diff --git a/target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch b/target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch
new file mode 100644
index 0000000000..794a861993
--- /dev/null
+++ b/target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch
@@ -0,0 +1,72 @@
+From 07ddf5fce9dae47ced9f04653075021301052c99 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Roman=20Spycha=C5=82a?= <roed at onet.eu>
+Date: Thu, 20 Apr 2017 11:40:14 +0200
+Subject: [PATCH] usb: plusb: Add support for PL-27A1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch adds support for the PL-27A1 by adding the appropriate
+USB ID's. This chip is used in the goobay Active USB 3.0 Data Link
+and Unitek Y-3501 cables.
+
+Signed-off-by: Roman Spychała <roed at onet.eu>
+---
+ drivers/net/usb/Kconfig | 2 +-
+ drivers/net/usb/plusb.c | 15 +++++++++++++--
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
+index 3dd490f53e48..f28bd74ac275 100644
+--- a/drivers/net/usb/Kconfig
++++ b/drivers/net/usb/Kconfig
+@@ -369,7 +369,7 @@ config USB_NET_NET1080
+ optionally with LEDs that indicate traffic
+
+ config USB_NET_PLUSB
+- tristate "Prolific PL-2301/2302/25A1 based cables"
++ tristate "Prolific PL-2301/2302/25A1/27A1 based cables"
+ # if the handshake/init/reset problems, from original 'plusb',
+ # are ever resolved ... then remove "experimental"
+ depends on USB_USBNET
+diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
+index 22e1a9a99a7d..6fe59373cba9 100644
+--- a/drivers/net/usb/plusb.c
++++ b/drivers/net/usb/plusb.c
+@@ -102,7 +102,7 @@ static int pl_reset(struct usbnet *dev)
+ }
+
+ static const struct driver_info prolific_info = {
+- .description = "Prolific PL-2301/PL-2302/PL-25A1",
++ .description = "Prolific PL-2301/PL-2302/PL-25A1/PL-27A1",
+ .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT,
+ /* some PL-2302 versions seem to fail usb_set_interface() */
+ .reset = pl_reset,
+@@ -139,6 +139,17 @@ static const struct usb_device_id products [] = {
+ * Host-to-Host Cable
+ */
+ .driver_info = (unsigned long) &prolific_info,
++
++},
++
++/* super speed cables */
++{
++ USB_DEVICE(0x067b, 0x27a1), /* PL-27A1, no eeprom
++ * also: goobay Active USB 3.0
++ * Data Link,
++ * Unitek Y-3501
++ */
++ .driver_info = (unsigned long) &prolific_info,
+ },
+
+ { }, // END
+@@ -158,5 +169,5 @@ static struct usb_driver plusb_driver = {
+ module_usb_driver(plusb_driver);
+
+ MODULE_AUTHOR("David Brownell");
+-MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1 USB Host to Host Link Driver");
++MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1/27A1 USB Host to Host Link Driver");
+ MODULE_LICENSE("GPL");
+--
+2.12.2
+
diff --git a/target/linux/generic/patches-4.9/870-usb-plusb-Add-support-for-PL-27A1.patch b/target/linux/generic/patches-4.9/870-usb-plusb-Add-support-for-PL-27A1.patch
new file mode 100644
index 0000000000..794a861993
--- /dev/null
+++ b/target/linux/generic/patches-4.9/870-usb-plusb-Add-support-for-PL-27A1.patch
@@ -0,0 +1,72 @@
+From 07ddf5fce9dae47ced9f04653075021301052c99 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Roman=20Spycha=C5=82a?= <roed at onet.eu>
+Date: Thu, 20 Apr 2017 11:40:14 +0200
+Subject: [PATCH] usb: plusb: Add support for PL-27A1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch adds support for the PL-27A1 by adding the appropriate
+USB ID's. This chip is used in the goobay Active USB 3.0 Data Link
+and Unitek Y-3501 cables.
+
+Signed-off-by: Roman Spychała <roed at onet.eu>
+---
+ drivers/net/usb/Kconfig | 2 +-
+ drivers/net/usb/plusb.c | 15 +++++++++++++--
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
+index 3dd490f53e48..f28bd74ac275 100644
+--- a/drivers/net/usb/Kconfig
++++ b/drivers/net/usb/Kconfig
+@@ -369,7 +369,7 @@ config USB_NET_NET1080
+ optionally with LEDs that indicate traffic
+
+ config USB_NET_PLUSB
+- tristate "Prolific PL-2301/2302/25A1 based cables"
++ tristate "Prolific PL-2301/2302/25A1/27A1 based cables"
+ # if the handshake/init/reset problems, from original 'plusb',
+ # are ever resolved ... then remove "experimental"
+ depends on USB_USBNET
+diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
+index 22e1a9a99a7d..6fe59373cba9 100644
+--- a/drivers/net/usb/plusb.c
++++ b/drivers/net/usb/plusb.c
+@@ -102,7 +102,7 @@ static int pl_reset(struct usbnet *dev)
+ }
+
+ static const struct driver_info prolific_info = {
+- .description = "Prolific PL-2301/PL-2302/PL-25A1",
++ .description = "Prolific PL-2301/PL-2302/PL-25A1/PL-27A1",
+ .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT,
+ /* some PL-2302 versions seem to fail usb_set_interface() */
+ .reset = pl_reset,
+@@ -139,6 +139,17 @@ static const struct usb_device_id products [] = {
+ * Host-to-Host Cable
+ */
+ .driver_info = (unsigned long) &prolific_info,
++
++},
++
++/* super speed cables */
++{
++ USB_DEVICE(0x067b, 0x27a1), /* PL-27A1, no eeprom
++ * also: goobay Active USB 3.0
++ * Data Link,
++ * Unitek Y-3501
++ */
++ .driver_info = (unsigned long) &prolific_info,
+ },
+
+ { }, // END
+@@ -158,5 +169,5 @@ static struct usb_driver plusb_driver = {
+ module_usb_driver(plusb_driver);
+
+ MODULE_AUTHOR("David Brownell");
+-MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1 USB Host to Host Link Driver");
++MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1/27A1 USB Host to Host Link Driver");
+ MODULE_LICENSE("GPL");
+--
+2.12.2
+
--
2.12.2
More information about the Lede-dev
mailing list