Skip to contentSkip to conversation

net: add dm9620 net usb driver

PATCH In review Joseph CHANG 3 participants 4 messages Jun 20, 2013 – Jul 5, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: add dm9620 net usb driver

DM9620 is an USB2.0 network adapter rather than DM9601 USB1.1. This driver processed the RX data 4 bytes header, TX data 2 bytes header, make the control bit exactly right in PHY write function, and optional IFF_ALLMUTLI bit for RX control.

Tested good for many platforms, include X86 desktop and ARM embedded.

---
 drivers/net/usb/Kconfig  |   13 +
 drivers/net/usb/Makefile |    1 +
 drivers/net/usb/dm9620.c |  796 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 810 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/usb/dm9620.c
drivers/net/usb/Kconfig +13 -0
index 287cc62..e9c9e2a 100644
@@ -272,6 +272,19 @@ config USB_NET_DM9601
 	  This option adds support for Davicom DM9601 based USB 1.1
 	  10/100 Ethernet adapters.
 
+config USB_NET_DM9620
+	tristate "Davicom DM9620/21 based USB 2.0 10/100 ethernet devices"
+	depends on USB_USBNET
+	select CRC32
+	help
+	  This option adds support for Davicom DM9620 based USB 2.0
+	  10/100 Ethernet adapters.
+
+	  This driver creates an interface named "ethX", where X depends on
+	  what other networking devices you have in use.
+
+	  To compile this driver as a module, choose M here.
+
 config USB_NET_SMSC75XX
 	tristate "SMSC LAN75XX based USB 2.0 gigabit ethernet devices"
 	depends on USB_USBNET
drivers/net/usb/Makefile +1 -0
index 9ab5c9d..7d95e5c 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_USB_NET_AX88179_178A)      += ax88179_178a.o
 obj-$(CONFIG_USB_NET_CDCETHER)	+= cdc_ether.o
 obj-$(CONFIG_USB_NET_CDC_EEM)	+= cdc_eem.o
 obj-$(CONFIG_USB_NET_DM9601)	+= dm9601.o
+obj-$(CONFIG_USB_NET_DM9620)	+= dm9620.o
 obj-$(CONFIG_USB_NET_SMSC75XX)	+= smsc75xx.o
 obj-$(CONFIG_USB_NET_SMSC95XX)	+= smsc95xx.o
 obj-$(CONFIG_USB_NET_GL620A)	+= gl620a.o
drivers/net/usb/dm9620.c new file +796 -0

796 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joseph" == Joseph CHANG <[email protected]> writes:

Joseph> DM9620 is an USB2.0 network adapter rather than DM9601 USB1.1. This Joseph> driver processed the RX data 4 bytes header, TX data 2 bytes header, Joseph> make the control bit exactly right in PHY write function, and optional Joseph> IFF_ALLMUTLI bit for RX control.

But dm9601.c already supports the dm9620 based devices. Why another driver for the same hardware?

Please CC me on dm9601 related patches.

Joseph> Tested good for many platforms, include X86 desktop and ARM embedded.

Joseph> +static struct usb_driver dm9620_driver = {
Joseph> + .name = "dm9620",
Joseph> + .id_table = products,
Joseph> + .probe = usbnet_probe,
Joseph> + .disconnect = usbnet_disconnect,
Joseph> + .suspend = usbnet_suspend,
Joseph> + .resume = usbnet_resume,
Joseph> + .disable_hub_initiated_lpm = 1,
Joseph> +};
Joseph> +
Joseph> +module_usb_driver(dm9620_driver);
Joseph> +
Joseph> +MODULE_AUTHOR("Peter Korsgaard <[email protected]>");

I'm not the author of this file.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

Dear Peter,

This is Joseph CHANG, I am glade to contact and work with you. I am busy in some affairs else these days, and will like to be back soon.

For the begin, We copy the source code 'dm9601.c' which was by you,
In order to work for our new chips (DM9620, DM9621, DM9621A... series), We did modify to get 'dm9620.c' base on 'dm0601.c',
Since you are the author and also the owner, so keep MODULE_AUTHOR() as you.

To generate DM9620.c is a way to distinguish the different generation chips:
(as below)

DM9601: old revision: USB1.1, Ethernet 10/100, Phase out
DM9620: current revision: USB2.0, Ethernet 10/100, Mass production state
DM9633: next revision: USB3.0, Ethernet 10/100/1000, Will to release on
2013/E

So want to make it from the configuration by "make menuconfig".

Can you help give further advices, we hope you can go ahead be the owner
(author) of the
'dm9620.c', And then we make patch to it. Would you agree this idea? If so we
will be happy
because we did not ever create such a code.

* Think about DM9633 driver to be, It will be is total different compare to
DM9601 &
DM9620. And will get the same issue.

ThankYou and Best Regards,
Joseph CHANG
System Application Engineering Division
Davicom Semiconductor, Inc.
No. 6 Li-Hsin Rd. VI, Science-Based Park,
Hsin-Chu, Taiwan.
Tel: 886-3-5798797 Ex 8534
Fax: 886-3-5646929
Web: http://www.davicom.com.tw

-----Original Message-----
From: Peter Korsgaard [mailto:[email protected]] On Behalf Of Peter Korsgaard
Sent: Monday, June 24, 2013 4:01 AM
To: Joseph CHANG
Cc: Greg Kroah-Hartman; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] net: add dm9620 net usb driver

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joseph" == Joseph CHANG <[email protected]> writes:

Joseph> DM9620 is an USB2.0 network adapter rather than DM9601 USB1.1. This Joseph> driver processed the RX data 4 bytes header, TX data 2 bytes header, Joseph> make the control bit exactly right in PHY write function, and optional Joseph> IFF_ALLMUTLI bit for RX control.

But dm9601.c already supports the dm9620 based devices. Why another driver for the same hardware?

Please CC me on dm9601 related patches.

Joseph> Tested good for many platforms, include X86 desktop and ARM embedded.

Joseph> +static struct usb_driver dm9620_driver = {
Joseph> + .name = "dm9620",
Joseph> + .id_table = products,
Joseph> + .probe = usbnet_probe,
Joseph> + .disconnect = usbnet_disconnect,
Joseph> + .suspend = usbnet_suspend,
Joseph> + .resume = usbnet_resume,
Joseph> + .disable_hub_initiated_lpm = 1,
Joseph> +};
Joseph> +
Joseph> +module_usb_driver(dm9620_driver);
Joseph> +
Joseph> +MODULE_AUTHOR("Peter Korsgaard <[email protected]>");

I'm not the author of this file.

Signature · 6 lines
Bye, Peter Korsgaard

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joseph" == Joseph Chang <[email protected]> writes:

Hi,

 Joseph>   This is Joseph CHANG, I am glade to contact and work with
 Joseph>   you.  I am busy in some affairs else these days, and will
 Joseph>   like to be back soon.
 Joseph>   For the begin, We copy the source code 'dm9601.c' which was
 Joseph>   by you, In order to work for our new chips (DM9620, DM9621,
 Joseph>   DM9621A... series), We did modify to get 'dm9620.c' base on
 Joseph>   'dm0601.c', Since you are the author and also the owner, so
 Joseph>   keep MODULE_AUTHOR() as you.

Yes, that's what I learned from a number of bug reports. It would have been good if you would have worked with me to get your modifications integrated instead.

Joseph> To generate DM9620.c is a way to distinguish the different
Joseph> generation chips: (as below)

 Joseph>    DM9601: old revision:     USB1.1, Ethernet 10/100,     Phase out
 Joseph>    DM9620: current revision:  USB2.0, Ethernet 10/100, Mass production state
 Joseph>    DM9633: next revision: USB3.0, Ethernet 10/100/1000, Will to

Joseph> release on 2013/E

dm9620 is basically backwards compatible with dm9601, so I added dm9620 support to the dm9601 driver earlier this year:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6642f91c92da0736

Is there anything missing from that?

I don't see any dm9633 datasheet on the davicom website, so I cannot say if it makes sense to add support for it in the existing driver. Is the datasheet available somewhere?

Joseph> So want to make it from the configuration by "make
Joseph> menuconfig".

Joseph> Can you help give further advices, we hope you can go ahead
Joseph> be the owner (author) of the 'dm9620.c', And then we make patch Joseph> to it. Would you agree this idea? If so we will be happy Joseph> because we did not ever create such a code.

Joseph> * Think about DM9633 driver to be, It will be is total
Joseph> different compare to DM9601 & DM9620. And will get the same Joseph> issue.

If you can provide me with a dm9633 datasheet and a sample device then I can look into writing a driver for it / extending dm9601.c. Please contact me off list for that.

Thanks!

Signature · 1 line
Bye, Peter Korsgaard