Commit 38bde1d4 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usbnet (2/9) module for simple network links

This patch creates the first of several separate "minidriver" modules
for "usbnet".  This one handles only the very simplest hardware, which
can be handled almost entirely by the "usbnet" core.

    - Move device-specific bits into new "cdc_subset.c" driver,
      shrinking "usbnet" by a bunch;

    - Export the functions needed to support this minidriver
      (with EXPORT_SYMBOL_GPL);

    - Update Kconfig and kbuild accordingly.

This one handles about a dozen different device types, with the most
notable ones being Gumstix and most Linux-based PDAs (except Zaurus
running that ancient code from Sharp).
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f29fc259
......@@ -128,32 +128,6 @@ config USB_USBNET
comment "USB Host-to-Host Cables"
depends on USB_USBNET
config USB_ALI_M5632
boolean "ALi M5632 based 'USB 2.0 Data Link' cables"
depends on USB_USBNET
default y
help
Choose this option if you're using a host-to-host cable
based on this design, which supports USB 2.0 high speed.
config USB_AN2720
boolean "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
depends on USB_USBNET
default y
help
Choose this option if you're using a host-to-host cable
based on this design. Note that AnchorChips is now a
Cypress brand.
config USB_BELKIN
boolean "eTEK based host-to-host cables (Advance, Belkin, ...)"
depends on USB_USBNET
default y
help
Choose this option if you're using a host-to-host cable
based on this design: two NetChip 2890 chips and an Atmel
microcontroller, with LEDs that indicate traffic.
config USB_GENESYS
boolean "GeneSys GL620USB-A based cables"
default y
......@@ -182,42 +156,9 @@ config USB_PL2301
Choose this option if you're using a host-to-host cable
with one of these chips.
config USB_KC2190
boolean "KT Technology KC2190 based cables (InstaNet)"
default y
depends on USB_USBNET && EXPERIMENTAL
help
Choose this option if you're using a host-to-host cable
with one of these chips.
comment "Intelligent USB Devices/Gadgets"
depends on USB_USBNET
config USB_ARMLINUX
boolean "Embedded ARM Linux links (iPaq, ...)"
depends on USB_USBNET
default y
help
Choose this option to support the "usb-eth" networking driver
used by most of the ARM Linux community with device controllers
such as the SA-11x0 and PXA-25x UDCs, or the tftp capabilities
in some PXA versions of the "blob" boot loader.
Linux-based "Gumstix" PXA-25x based systems use this protocol
to talk with other Linux systems.
Although the ROMs shipped with Sharp Zaurus products use a
different link level framing protocol, you can have them use
this simpler protocol by installing a different kernel.
config USB_EPSON2888
boolean "Epson 2888 based firmware (DEVELOPMENT)"
depends on USB_USBNET
default y
help
Choose this option to support the usb networking links used
by some sample firmware from Epson.
config USB_ZAURUS
boolean "Sharp Zaurus (stock ROMs) and compatible"
depends on USB_USBNET
......@@ -292,6 +233,70 @@ config USB_AX8817X
This driver creates an interface named "ethX", where X depends on
what other networking devices you have in use.
config USB_NET_CDC_SUBSET
tristate "Simple USB Network Links (CDC Ethernet subset)"
depends on USB_USBNET
help
This driver module supports USB network devices that can work
without any device-specific information. Select it if you have
one of these drivers.
Note that while many USB host-to-host cables can work in this mode,
that may mean not being able to talk to Win32 systems or more
commonly not being able to handle certain events (like replugging
the host on the other end) very well. Also, these devices will
not generally have permanently assigned Ethernet addresses.
config USB_ALI_M5632
boolean "ALi M5632 based 'USB 2.0 Data Link' cables"
depends on USB_NET_CDC_SUBSET
help
Choose this option if you're using a host-to-host cable
based on this design, which supports USB 2.0 high speed.
config USB_AN2720
boolean "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
depends on USB_NET_CDC_SUBSET
help
Choose this option if you're using a host-to-host cable
based on this design. Note that AnchorChips is now a
Cypress brand.
config USB_BELKIN
boolean "eTEK based host-to-host cables (Advance, Belkin, ...)"
depends on USB_NET_CDC_SUBSET
default y
help
Choose this option if you're using a host-to-host cable
based on this design: two NetChip 2890 chips and an Atmel
microcontroller, with LEDs that indicate traffic.
config USB_ARMLINUX
boolean "Embedded ARM Linux links (iPaq, ...)"
depends on USB_NET_CDC_SUBSET
default y
help
Choose this option to support the "usb-eth" networking driver
used by most of the ARM Linux community with device controllers
such as the SA-11x0 and PXA-25x UDCs, or the tftp capabilities
in some PXA versions of the "blob" boot loader.
Linux-based "Gumstix" PXA-25x based systems use this protocol
to talk with other Linux systems.
Although the ROMs shipped with Sharp Zaurus products use a
different link level framing protocol, you can have them use
this simpler protocol by installing a different kernel.
config USB_EPSON2888
boolean "Epson 2888 based firmware (DEVELOPMENT)"
depends on USB_NET_CDC_SUBSET
help
Choose this option to support the usb networking links used
by some sample firmware from Epson.
config USB_ZD1201
tristate "USB ZD1201 based Wireless device support"
depends on NET_RADIO
......
......@@ -6,5 +6,6 @@ obj-$(CONFIG_USB_CATC) += catc.o
obj-$(CONFIG_USB_KAWETH) += kaweth.o
obj-$(CONFIG_USB_PEGASUS) += pegasus.o
obj-$(CONFIG_USB_RTL8150) += rtl8150.o
obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o
obj-$(CONFIG_USB_USBNET) += usbnet.o
obj-$(CONFIG_USB_ZD1201) += zd1201.o
This diff is collapsed.
This diff is collapsed.
......@@ -24,7 +24,7 @@
#define __USBNET_H
/* interface from usbnet core to each USB networking device we handle */
/* interface from usbnet core to each USB networking link we handle */
struct usbnet {
/* housekeeping */
struct usb_device *udev;
......@@ -62,6 +62,10 @@ struct usbnet {
# define EVENT_LINK_RESET 4
};
static inline struct usb_driver *driver_of(struct usb_interface *intf)
{
return to_usb_driver(intf->dev.driver);
}
/* interface from the device/framing level "minidriver" to core */
struct driver_info {
......@@ -111,6 +115,15 @@ struct driver_info {
unsigned long data; /* Misc driver specific data */
};
/* Minidrivers are just drivers using the "usbnet" core as a powerful
* network-specific subroutine library ... that happens to do pretty
* much everything except custom framing and chip-specific stuff.
*/
extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);
extern int usbnet_suspend (struct usb_interface *, pm_message_t );
extern int usbnet_resume (struct usb_interface *);
extern void usbnet_disconnect(struct usb_interface *);
/* we record the state for each of our queued skbs */
enum skb_state {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment