Skip to contentSkip to conversation

usbnet: CDC EEM support (v5)

PATCH Applied David Brownell 2 participants 2 messages May 4, 2009

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

PATCH 1/1 usbnet: CDC EEM support (v5)

From: Omar Laazimani <[email protected]>

This introduces a CDC Ethernet Emulation Model (EEM) host side driver to support USB EEM devices.

EEM is different from the Ethernet Control Model (ECM) currently supported by the "CDC Ethernet" driver. One key difference is that it doesn't require of USB interface alternate settings to manage interface state; some maldesigned hardware can't handle that part of USB. It also avoids a separate USB interface for control and status updates.

[ [email protected]: fix skb leaks, add rx packet checks, improve fault handling, EEM conformance updates, cleanup ]

---
 drivers/net/usb/Kconfig   |   14 +
 drivers/net/usb/Makefile  |    1 
 drivers/net/usb/cdc_eem.c |  381 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/usb/cdc.h   |    3 
 4 files changed, 399 insertions(+)
drivers/net/usb/Kconfig +14 -0
@@ -180,6 +180,20 @@ config USB_NET_CDCETHER
 	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
 	  name is used instead.
 
+config USB_NET_CDC_EEM
+	tristate "CDC EEM support"
+	depends on USB_USBNET && EXPERIMENTAL
+	help
+	  This option supports devices conforming to the Communication Device
+	  Class (CDC) Ethernet Emulation Model, a specification that's easy to
+	  implement in device firmware.  The CDC EEM specifications are available
+	  from <http://www.usb.org/>.
+
+	  This driver creates an interface named "ethX", where X depends on
+	  what other networking devices you have in use.  However, if the
+	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
+	  name is used instead.
+
 config USB_NET_DM9601
 	tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices"
 	depends on USB_USBNET
drivers/net/usb/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_USB_RTL8150)	+= rtl8150.o
 obj-$(CONFIG_USB_HSO)		+= hso.o
 obj-$(CONFIG_USB_NET_AX8817X)	+= asix.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_SMSC95XX)	+= smsc95xx.o
 obj-$(CONFIG_USB_NET_GL620A)	+= gl620a.o
drivers/net/usb/cdc_eem.c new file +381 -0

381 lines not on this page · raw message

include/linux/usb/cdc.h +3 -0
@@ -17,6 +17,7 @@
 #define USB_CDC_SUBCLASS_DMM			0x09
 #define USB_CDC_SUBCLASS_MDLM			0x0a
 #define USB_CDC_SUBCLASS_OBEX			0x0b
+#define USB_CDC_SUBCLASS_EEM			0x0c
 
 #define USB_CDC_PROTO_NONE			0
 
@@ -28,6 +29,8 @@
 #define USB_CDC_ACM_PROTO_AT_CDMA		6
 #define USB_CDC_ACM_PROTO_VENDOR		0xff
 
+#define USB_CDC_PROTO_EEM			7
+
 /*-------------------------------------------------------------------------*/
 
 /*

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Applied
#1 lore raw

From: David Brownell <[email protected]>
Date: Mon, 4 May 2009 12:00:10 -0700

Quoted 10 lines

This introduces a CDC Ethernet Emulation Model (EEM) host side driver to support USB EEM devices.

EEM is different from the Ethernet Control Model (ECM) currently supported by the "CDC Ethernet" driver. One key difference is that it doesn't require of USB interface alternate settings to manage interface state; some maldesigned hardware can't handle that part of USB. It also avoids a separate USB interface for control and status updates.

Quoted 5 lines

[ [email protected]: fix skb leaks, add rx packet checks, improve fault handling, EEM conformance updates, cleanup ]

Applied, thanks.