linux/drivers/net/usb/zaurus.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2002 Pavel Machek <[email protected]>
 * Copyright (C) 2002-2005 by David Brownell
 */

// #define	DEBUG			// error path messages, extra info
// #define	VERBOSE			// more; success messages

#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/crc32.h>
#include <linux/usb.h>
#include <linux/usb/cdc.h>
#include <linux/usb/usbnet.h>


/*
 * All known Zaurii lie about their standards conformance.  At least
 * the earliest SA-1100 models lie by saying they support CDC Ethernet.
 * Some later models (especially PXA-25x and PXA-27x based ones) lie
 * and say they support CDC MDLM (for access to cell phone modems).
 *
 * There are non-Zaurus products that use these same protocols too.
 *
 * The annoying thing is that at the same time Sharp was developing
 * that annoying standards-breaking software, the Linux community had
 * a simple "CDC Subset" working reliably on the same SA-1100 hardware.
 * That is, the same functionality but not violating standards.
 *
 * The CDC Ethernet nonconformance points are troublesome to hosts
 * with a true CDC Ethernet implementation:
 *   - Framing appends a CRC, which the spec says drivers "must not" do;
 *   - Transfers data in altsetting zero, instead of altsetting 1;
 *   - All these peripherals use the same ethernet address.
 *
 * The CDC MDLM nonconformance is less immediately troublesome, since all
 * MDLM implementations are quasi-proprietary anyway.
 */

static struct sk_buff *
zaurus_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{}

static int zaurus_bind(struct usbnet *dev, struct usb_interface *intf)
{}

/* PDA style devices are always connected if present */
static int always_connected (struct usbnet *dev)
{}

static const struct driver_info	zaurus_sl5x00_info =;
#define ZAURUS_STRONGARM_INFO

static const struct driver_info	zaurus_pxa_info =;
#define ZAURUS_PXA_INFO

static const struct driver_info	olympus_mxl_info =;
#define OLYMPUS_MXL_INFO


/* Some more recent products using Lineo/Belcarra code will wrongly claim
 * CDC MDLM conformance.  They aren't conformant:  data endpoints live
 * in the control interface, there's no data interface, and it's not used
 * to talk to a cell phone radio.  But at least we can detect these two
 * pseudo-classes, rather than growing this product list with entries for
 * each new nonconformant product (sigh).
 */
static const u8 safe_guid[16] =;
static const u8 blan_guid[16] =;

static int blan_mdlm_bind(struct usbnet *dev, struct usb_interface *intf)
{}

static const struct driver_info	bogus_mdlm_info =;

static const struct usb_device_id	products [] =;
MODULE_DEVICE_TABLE(usb, products);

static struct usb_driver zaurus_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();