Skip to contentSkip to conversation

asix - Add support for LyconSys FiberGecko

PATCH New David Hollis 6 participants 9 messages Aug 7, 2014 – Feb 14, 2025

Subsystems (4)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 asix - Add support for LyconSys FiberGecko

---
 drivers/net/usb/asix_devices.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
drivers/net/usb/asix_devices.c +24 -1
index 5d19409..d09f2ea 100644
@@ -1,6 +1,6 @@
 /*
  * ASIX AX8817X based USB 2.0 Ethernet Devices
- * Copyright (C) 2003-2006 David Hollis <[email protected]>
+ * Copyright (C) 2003-2014 David Hollis <[email protected]>
  * Copyright (C) 2005 Phil Chang <[email protected]>
  * Copyright (C) 2006 James Painter <[email protected]>
  * Copyright (c) 2002-2003 TiVo Inc.
@@ -648,6 +648,12 @@ static int ax88178_reset(struct usbnet *dev)
 	asix_sw_reset(dev, 0);
 	msleep(150);
 
+	/* LyconSys FiberGecko: Turn on PHY */
+	if (dev->driver_info->flags == 0x20061201) {
+		/* Power on Phy: set gpio2=high */
+		asix_write_gpio(dev, AX_GPIO_GPO2EN | AX_GPIO_GPO_2, 50);
+	}
+
 	asix_sw_reset(dev, AX_SWRESET_PRL | AX_SWRESET_IPPD);
 	msleep(150);
 
@@ -946,6 +952,19 @@ static const struct driver_info hg20f9_info = {
 	.data = FLAG_EEPROM_MAC,
 };
 
+static const struct driver_info lyconsys_fibergecko100_info = {
+	.description = "LyconSys FiberGecko 100 USB 2.0 to Ethernet Adapter",
+	.bind = ax88178_bind,
+	.status = asix_status,
+	.link_reset = ax88178_link_reset,
+	.reset = ax88178_link_reset,
+	.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+		 FLAG_MULTI_PACKET,
+	.rx_fixup =	asix_rx_fixup_common,
+	.tx_fixup =	asix_tx_fixup,
+	.data = 0x20061201,
+};
+
 static const struct usb_device_id	products [] = {
 {
 	// Linksys USB200M
@@ -1091,6 +1110,10 @@ static const struct usb_device_id	products [] = {
 	 */
 	USB_DEVICE(0x066b, 0x20f9),
 	.driver_info = (unsigned long) &hg20f9_info,
+}, {
+	/* LyconSys FiberGecko 100 */
+	USB_DEVICE(0x1d2a, 0x0801),
+	.driver_info = (unsigned long) &lyconsys_fibergecko100_info,
 },
 	{ },		// END
 };
Signature · 1 line
1.8.3.1
#2 lore raw

Hello.

Quoted 11 lines · David Hollis
---
  drivers/net/usb/asix_devices.c | 25 ++++++++++++++++++++++++-
  1 file changed, 24 insertions(+), 1 deletion(-)
drivers/net/usb/asix_devices.c +0 -0
index 5d19409..d09f2ea 100644

[...]

drivers/net/usb/asix_devices.c static int ax88178_reset(struct usbnet *dev) · line 652

Quoted 6 lines
drivers/net/usb/asix_devices.c +2 -0
@@ -648,6 +648,12 @@ static int ax88178_reset(struct usbnet *dev)
  	asix_sw_reset(dev, 0);
  	msleep(150);
 
+	/* LyconSys FiberGecko: Turn on PHY */
+	if (dev->driver_info->flags == 0x20061201) {

Hm, don't use magic values please. Doesn't the flags get assigned a
combination of FLAG_* values below? Or you mixed up 'flags' and 'data' fields?

Quoted 11 lines
drivers/net/usb/asix_devices.c +4 -0
+		/* Power on Phy: set gpio2=high */
+		asix_write_gpio(dev, AX_GPIO_GPO2EN | AX_GPIO_GPO_2, 50);
+	}
+
  	asix_sw_reset(dev, AX_SWRESET_PRL | AX_SWRESET_IPPD);
  	msleep(150);
 
@@ -946,6 +952,19 @@ static const struct driver_info hg20f9_info = {
  	.data = FLAG_EEPROM_MAC,
  };
 

drivers/net/usb/asix_devices.c static const struct driver_info hg20f9_info = { · line 964

Quoted 10 lines
drivers/net/usb/asix_devices.c +10 -0
+static const struct driver_info lyconsys_fibergecko100_info = {
+	.description = "LyconSys FiberGecko 100 USB 2.0 to Ethernet Adapter",
+	.bind = ax88178_bind,
+	.status = asix_status,
+	.link_reset = ax88178_link_reset,
+	.reset = ax88178_link_reset,
+	.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+		 FLAG_MULTI_PACKET,
+	.rx_fixup =	asix_rx_fixup_common,
+	.tx_fixup =	asix_tx_fixup,

Hm, why this sudden change of the initializer style?

drivers/net/usb/asix_devices.c static const struct driver_info hg20f9_info = { · line 967

Quoted 3 lines
drivers/net/usb/asix_devices.c +3 -0
+	.data = 0x20061201,
+};
+

WBR, Sergei

#3 lore raw

PATCH 1/1 net: usb: asix: add FiberGecko DeviceID

In reply to David Hollis

---

This patch had previously been suggested at "Link:".

However, I found that the flag quirk is not necessary and I suspect it has never worked (because it references ".flag" whereas the identifying value is in ".data")

I have compiled this and tested successfully with two devices. As it now only adds the USB Id it generates no extra maintenance burden that's why I suggest it for inclusion.

 drivers/net/usb/asix_devices.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
drivers/net/usb/asix_devices.c +17 -0
index 57d6e5abc30e..ef7aae8f3594 100644
@@ -1421,6 +1421,19 @@ static const struct driver_info hg20f9_info = {
 	.data = FLAG_EEPROM_MAC,
 };
 
+static const struct driver_info lyconsys_fibergecko100_info = {
+	.description = "LyconSys FiberGecko 100 USB 2.0 to SFP Adapter",
+	.bind = ax88178_bind,
+	.status = asix_status,
+	.link_reset = ax88178_link_reset,
+	.reset = ax88178_link_reset,
+	.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+		 FLAG_MULTI_PACKET,
+	.rx_fixup =	asix_rx_fixup_common,
+	.tx_fixup =	asix_tx_fixup,
+	.data = 0x20061201,
+};
+
 static const struct usb_device_id	products [] = {
 {
 	// Linksys USB200M
@@ -1578,6 +1591,10 @@ static const struct usb_device_id	products [] = {
 	// Linux Automation GmbH USB 10Base-T1L
 	USB_DEVICE(0x33f7, 0x0004),
 	.driver_info = (unsigned long) &lxausb_t1l_info,
+}, {
+	/* LyconSys FiberGecko 100 */
+	USB_DEVICE(0x1d2a, 0x0801),
+	.driver_info = (unsigned long) &lyconsys_fibergecko100_info,
 },
 	{ },		// END
 };

--
2.43.0

#4 lore raw

PATCH v2 1/1 net: usb: asix: add FiberGecko DeviceID

---

v2: change Spacing on Initializer, change Mailing List link This patch had previously been suggested at
https://lore.kernel.org/netdev/[email protected]/

However, I found that the flag quirk is not necessary and I suspect it has never worked (because it references ".flag" whereas the identifying value is in ".data")

I have compiled this and tested successfully with two devices. As it now only adds the USB Id it generates no extra maintenance burden that's why I suggest it for inclusion.

 drivers/net/usb/asix_devices.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
drivers/net/usb/asix_devices.c +17 -0
index 57d6e5abc30e..ef7aae8f3594 100644
@@ -1421,6 +1421,19 @@ static const struct driver_info hg20f9_info = {
 	.data = FLAG_EEPROM_MAC,
 };
 
+static const struct driver_info lyconsys_fibergecko100_info = {
+	.description = "LyconSys FiberGecko 100 USB 2.0 to SFP Adapter",
+	.bind = ax88178_bind,
+	.status = asix_status,
+	.link_reset = ax88178_link_reset,
+	.reset = ax88178_link_reset,
+	.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+		 FLAG_MULTI_PACKET,
+	.rx_fixup = asix_rx_fixup_common,
+	.tx_fixup = asix_tx_fixup,
+	.data = 0x20061201,
+};
+
 static const struct usb_device_id	products [] = {
 {
 	// Linksys USB200M
@@ -1578,6 +1591,10 @@ static const struct usb_device_id	products [] = {
 	// Linux Automation GmbH USB 10Base-T1L
 	USB_DEVICE(0x33f7, 0x0004),
 	.driver_info = (unsigned long) &lxausb_t1l_info,
+}, {
+	/* LyconSys FiberGecko 100 */
+	USB_DEVICE(0x1d2a, 0x0801),
+	.driver_info = (unsigned long) &lyconsys_fibergecko100_info,
 },
 	{ },		// END
 };

--
2.43.0

#6 lore raw

Re: [PATCH v2] net: usb: asix: add FiberGecko DeviceID

Quoted 2 lines

For obvious reasons I can't take patches without any changelog messages, but maybe other subsystems have more relaxed rules :(

Same for netdev, we like to see a commit message.

If the intention is this is to be merged via netdev, please read:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

Also not that netdev is closed at the moment due to the emerge window.

Andrew

---
pw-bot: cr

#7 lore raw

PATCH v3 1/1 net: usb: asix_devices: add FiberGecko DeviceID

In reply to Max Schulze

The FiberGecko is a small USB module that connects a 100 Mbit/s SFP

---

v3: resend out of merge-window, with commit message

v2: change Spacing on Initializer, change Mailing List link This patch had previously been suggested at
https://lore.kernel.org/netdev/[email protected]/

However, I found that the flag quirk is not necessary and I suspect it has never worked (because it references ".flag" whereas the identifying value is in ".data")

I have compiled this and tested successfully with two devices. As it now only adds the USB Id it generates no extra maintenance burden that's why I suggest it for inclusion.

 drivers/net/usb/asix_devices.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
drivers/net/usb/asix_devices.c +17 -0
index 57d6e5abc30e..ef7aae8f3594 100644
@@ -1421,6 +1421,19 @@ static const struct driver_info hg20f9_info = {
 	.data = FLAG_EEPROM_MAC,
 };
 
+static const struct driver_info lyconsys_fibergecko100_info = {
+	.description = "LyconSys FiberGecko 100 USB 2.0 to SFP Adapter",
+	.bind = ax88178_bind,
+	.status = asix_status,
+	.link_reset = ax88178_link_reset,
+	.reset = ax88178_link_reset,
+	.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+		 FLAG_MULTI_PACKET,
+	.rx_fixup = asix_rx_fixup_common,
+	.tx_fixup = asix_tx_fixup,
+	.data = 0x20061201,
+};
+
 static const struct usb_device_id	products [] = {
 {
 	// Linksys USB200M
@@ -1578,6 +1591,10 @@ static const struct usb_device_id	products [] = {
 	// Linux Automation GmbH USB 10Base-T1L
 	USB_DEVICE(0x33f7, 0x0004),
 	.driver_info = (unsigned long) &lxausb_t1l_info,
+}, {
+	/* LyconSys FiberGecko 100 */
+	USB_DEVICE(0x1d2a, 0x0801),
+	.driver_info = (unsigned long) &lyconsys_fibergecko100_info,
 },
 	{ },		// END
 };

--
2.43.0

maintainer Applied
#8 lore raw

Re: [PATCH net v3] net: usb: asix_devices: add FiberGecko DeviceID

Quoted 1 line · On Wed, 12 Feb 2025 16:09:51 +0100 Max Schulze wrote:

The FiberGecko is a small USB module that connects a 100 Mbit/s SFP

Applied, thanks!

Signature · 1 line
pw-bot: accept