18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Simple "CDC Subset" USB Networking Links 48c2ecf20Sopenharmony_ci * Copyright (C) 2000-2005 by David Brownell 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/module.h> 88c2ecf20Sopenharmony_ci#include <linux/kmod.h> 98c2ecf20Sopenharmony_ci#include <linux/netdevice.h> 108c2ecf20Sopenharmony_ci#include <linux/etherdevice.h> 118c2ecf20Sopenharmony_ci#include <linux/ethtool.h> 128c2ecf20Sopenharmony_ci#include <linux/workqueue.h> 138c2ecf20Sopenharmony_ci#include <linux/mii.h> 148c2ecf20Sopenharmony_ci#include <linux/usb.h> 158c2ecf20Sopenharmony_ci#include <linux/usb/usbnet.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* 198c2ecf20Sopenharmony_ci * This supports simple USB network links that don't require any special 208c2ecf20Sopenharmony_ci * framing or hardware control operations. The protocol used here is a 218c2ecf20Sopenharmony_ci * strict subset of CDC Ethernet, with three basic differences reflecting 228c2ecf20Sopenharmony_ci * the goal that almost any hardware should run it: 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * - Minimal runtime control: one interface, no altsettings, and 258c2ecf20Sopenharmony_ci * no vendor or class specific control requests. If a device is 268c2ecf20Sopenharmony_ci * configured, it is allowed to exchange packets with the host. 278c2ecf20Sopenharmony_ci * Fancier models would mean not working on some hardware. 288c2ecf20Sopenharmony_ci * 298c2ecf20Sopenharmony_ci * - Minimal manufacturing control: no IEEE "Organizationally 308c2ecf20Sopenharmony_ci * Unique ID" required, or an EEPROMs to store one. Each host uses 318c2ecf20Sopenharmony_ci * one random "locally assigned" Ethernet address instead, which can 328c2ecf20Sopenharmony_ci * of course be overridden using standard tools like "ifconfig". 338c2ecf20Sopenharmony_ci * (With 2^46 such addresses, same-net collisions are quite rare.) 348c2ecf20Sopenharmony_ci * 358c2ecf20Sopenharmony_ci * - There is no additional framing data for USB. Packets are written 368c2ecf20Sopenharmony_ci * exactly as in CDC Ethernet, starting with an Ethernet header and 378c2ecf20Sopenharmony_ci * terminated by a short packet. However, the host will never send a 388c2ecf20Sopenharmony_ci * zero length packet; some systems can't handle those robustly. 398c2ecf20Sopenharmony_ci * 408c2ecf20Sopenharmony_ci * Anything that can transmit and receive USB bulk packets can implement 418c2ecf20Sopenharmony_ci * this protocol. That includes both smart peripherals and quite a lot 428c2ecf20Sopenharmony_ci * of "host-to-host" USB cables (which embed two devices back-to-back). 438c2ecf20Sopenharmony_ci * 448c2ecf20Sopenharmony_ci * Note that although Linux may use many of those host-to-host links 458c2ecf20Sopenharmony_ci * with this "cdc_subset" framing, that doesn't mean there may not be a 468c2ecf20Sopenharmony_ci * better approach. Handling the "other end unplugs/replugs" scenario 478c2ecf20Sopenharmony_ci * well tends to require chip-specific vendor requests. Also, Windows 488c2ecf20Sopenharmony_ci * peers at the other end of host-to-host cables may expect their own 498c2ecf20Sopenharmony_ci * framing to be used rather than this "cdc_subset" model. 508c2ecf20Sopenharmony_ci */ 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci#if defined(CONFIG_USB_EPSON2888) || defined(CONFIG_USB_ARMLINUX) 538c2ecf20Sopenharmony_ci/* PDA style devices are always connected if present */ 548c2ecf20Sopenharmony_cistatic int always_connected (struct usbnet *dev) 558c2ecf20Sopenharmony_ci{ 568c2ecf20Sopenharmony_ci return 0; 578c2ecf20Sopenharmony_ci} 588c2ecf20Sopenharmony_ci#endif 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_ALI_M5632 618c2ecf20Sopenharmony_ci#define HAVE_HARDWARE 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------- 648c2ecf20Sopenharmony_ci * 658c2ecf20Sopenharmony_ci * ALi M5632 driver ... does high speed 668c2ecf20Sopenharmony_ci * 678c2ecf20Sopenharmony_ci * NOTE that the MS-Windows drivers for this chip use some funky and 688c2ecf20Sopenharmony_ci * (naturally) undocumented 7-byte prefix to each packet, so this is a 698c2ecf20Sopenharmony_ci * case where we don't currently interoperate. Also, once you unplug 708c2ecf20Sopenharmony_ci * one end of the cable, you need to replug the other end too ... since 718c2ecf20Sopenharmony_ci * chip docs are unavailable, there's no way to reset the relevant state 728c2ecf20Sopenharmony_ci * short of a power cycle. 738c2ecf20Sopenharmony_ci * 748c2ecf20Sopenharmony_ci *-------------------------------------------------------------------------*/ 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_cistatic void m5632_recover(struct usbnet *dev) 778c2ecf20Sopenharmony_ci{ 788c2ecf20Sopenharmony_ci struct usb_device *udev = dev->udev; 798c2ecf20Sopenharmony_ci struct usb_interface *intf = dev->intf; 808c2ecf20Sopenharmony_ci int r; 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci r = usb_lock_device_for_reset(udev, intf); 838c2ecf20Sopenharmony_ci if (r < 0) 848c2ecf20Sopenharmony_ci return; 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci usb_reset_device(udev); 878c2ecf20Sopenharmony_ci usb_unlock_device(udev); 888c2ecf20Sopenharmony_ci} 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_cistatic const struct driver_info ali_m5632_info = { 918c2ecf20Sopenharmony_ci .description = "ALi M5632", 928c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 938c2ecf20Sopenharmony_ci .recover = m5632_recover, 948c2ecf20Sopenharmony_ci}; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#endif 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_AN2720 998c2ecf20Sopenharmony_ci#define HAVE_HARDWARE 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------- 1028c2ecf20Sopenharmony_ci * 1038c2ecf20Sopenharmony_ci * AnchorChips 2720 driver ... http://www.cypress.com 1048c2ecf20Sopenharmony_ci * 1058c2ecf20Sopenharmony_ci * This doesn't seem to have a way to detect whether the peer is 1068c2ecf20Sopenharmony_ci * connected, or need any reset handshaking. It's got pretty big 1078c2ecf20Sopenharmony_ci * internal buffers (handles most of a frame's worth of data). 1088c2ecf20Sopenharmony_ci * Chip data sheets don't describe any vendor control messages. 1098c2ecf20Sopenharmony_ci * 1108c2ecf20Sopenharmony_ci *-------------------------------------------------------------------------*/ 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_cistatic const struct driver_info an2720_info = { 1138c2ecf20Sopenharmony_ci .description = "AnchorChips/Cypress 2720", 1148c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 1158c2ecf20Sopenharmony_ci // no reset available! 1168c2ecf20Sopenharmony_ci // no check_connect available! 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci .in = 2, .out = 2, // direction distinguishes these 1198c2ecf20Sopenharmony_ci}; 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci#endif /* CONFIG_USB_AN2720 */ 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_BELKIN 1258c2ecf20Sopenharmony_ci#define HAVE_HARDWARE 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------- 1288c2ecf20Sopenharmony_ci * 1298c2ecf20Sopenharmony_ci * Belkin F5U104 ... two NetChip 2280 devices + Atmel AVR microcontroller 1308c2ecf20Sopenharmony_ci * 1318c2ecf20Sopenharmony_ci * ... also two eTEK designs, including one sold as "Advance USBNET" 1328c2ecf20Sopenharmony_ci * 1338c2ecf20Sopenharmony_ci *-------------------------------------------------------------------------*/ 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_cistatic const struct driver_info belkin_info = { 1368c2ecf20Sopenharmony_ci .description = "Belkin, eTEK, or compatible", 1378c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 1388c2ecf20Sopenharmony_ci}; 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci#endif /* CONFIG_USB_BELKIN */ 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_EPSON2888 1458c2ecf20Sopenharmony_ci#define HAVE_HARDWARE 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------- 1488c2ecf20Sopenharmony_ci * 1498c2ecf20Sopenharmony_ci * EPSON USB clients 1508c2ecf20Sopenharmony_ci * 1518c2ecf20Sopenharmony_ci * This is the same idea as Linux PDAs (below) except the firmware in the 1528c2ecf20Sopenharmony_ci * device might not be Tux-powered. Epson provides reference firmware that 1538c2ecf20Sopenharmony_ci * implements this interface. Product developers can reuse or modify that 1548c2ecf20Sopenharmony_ci * code, such as by using their own product and vendor codes. 1558c2ecf20Sopenharmony_ci * 1568c2ecf20Sopenharmony_ci * Support was from Juro Bystricky <bystricky.juro@erd.epson.com> 1578c2ecf20Sopenharmony_ci * 1588c2ecf20Sopenharmony_ci *-------------------------------------------------------------------------*/ 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_cistatic const struct driver_info epson2888_info = { 1618c2ecf20Sopenharmony_ci .description = "Epson USB Device", 1628c2ecf20Sopenharmony_ci .check_connect = always_connected, 1638c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci .in = 4, .out = 3, 1668c2ecf20Sopenharmony_ci}; 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci#endif /* CONFIG_USB_EPSON2888 */ 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------- 1728c2ecf20Sopenharmony_ci * 1738c2ecf20Sopenharmony_ci * info from Jonathan McDowell <noodles@earth.li> 1748c2ecf20Sopenharmony_ci * 1758c2ecf20Sopenharmony_ci *-------------------------------------------------------------------------*/ 1768c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_KC2190 1778c2ecf20Sopenharmony_ci#define HAVE_HARDWARE 1788c2ecf20Sopenharmony_cistatic const struct driver_info kc2190_info = { 1798c2ecf20Sopenharmony_ci .description = "KC Technology KC-190", 1808c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 1818c2ecf20Sopenharmony_ci}; 1828c2ecf20Sopenharmony_ci#endif /* CONFIG_USB_KC2190 */ 1838c2ecf20Sopenharmony_ci 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_ARMLINUX 1868c2ecf20Sopenharmony_ci#define HAVE_HARDWARE 1878c2ecf20Sopenharmony_ci 1888c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------- 1898c2ecf20Sopenharmony_ci * 1908c2ecf20Sopenharmony_ci * Intel's SA-1100 chip integrates basic USB support, and is used 1918c2ecf20Sopenharmony_ci * in PDAs like some iPaqs, the Yopy, some Zaurus models, and more. 1928c2ecf20Sopenharmony_ci * When they run Linux, arch/arm/mach-sa1100/usb-eth.c may be used to 1938c2ecf20Sopenharmony_ci * network using minimal USB framing data. 1948c2ecf20Sopenharmony_ci * 1958c2ecf20Sopenharmony_ci * This describes the driver currently in standard ARM Linux kernels. 1968c2ecf20Sopenharmony_ci * The Zaurus uses a different driver (see later). 1978c2ecf20Sopenharmony_ci * 1988c2ecf20Sopenharmony_ci * PXA25x and PXA210 use XScale cores (ARM v5TE) with better USB support 1998c2ecf20Sopenharmony_ci * and different USB endpoint numbering than the SA1100 devices. The 2008c2ecf20Sopenharmony_ci * mach-pxa/usb-eth.c driver re-uses the device ids from mach-sa1100 2018c2ecf20Sopenharmony_ci * so we rely on the endpoint descriptors. 2028c2ecf20Sopenharmony_ci * 2038c2ecf20Sopenharmony_ci *-------------------------------------------------------------------------*/ 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_cistatic const struct driver_info linuxdev_info = { 2068c2ecf20Sopenharmony_ci .description = "Linux Device", 2078c2ecf20Sopenharmony_ci .check_connect = always_connected, 2088c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 2098c2ecf20Sopenharmony_ci}; 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_cistatic const struct driver_info yopy_info = { 2128c2ecf20Sopenharmony_ci .description = "Yopy", 2138c2ecf20Sopenharmony_ci .check_connect = always_connected, 2148c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 2158c2ecf20Sopenharmony_ci}; 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_cistatic const struct driver_info blob_info = { 2188c2ecf20Sopenharmony_ci .description = "Boot Loader OBject", 2198c2ecf20Sopenharmony_ci .check_connect = always_connected, 2208c2ecf20Sopenharmony_ci .flags = FLAG_POINTTOPOINT, 2218c2ecf20Sopenharmony_ci}; 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci#endif /* CONFIG_USB_ARMLINUX */ 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci/*-------------------------------------------------------------------------*/ 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci#ifndef HAVE_HARDWARE 2298c2ecf20Sopenharmony_ci#warning You need to configure some hardware for this driver 2308c2ecf20Sopenharmony_ci#endif 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci/* 2338c2ecf20Sopenharmony_ci * chip vendor names won't normally be on the cables, and 2348c2ecf20Sopenharmony_ci * may not be on the device. 2358c2ecf20Sopenharmony_ci */ 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_cistatic const struct usb_device_id products [] = { 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_ALI_M5632 2408c2ecf20Sopenharmony_ci{ 2418c2ecf20Sopenharmony_ci USB_DEVICE (0x0402, 0x5632), // ALi defaults 2428c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &ali_m5632_info, 2438c2ecf20Sopenharmony_ci}, 2448c2ecf20Sopenharmony_ci{ 2458c2ecf20Sopenharmony_ci USB_DEVICE (0x182d,0x207c), // SiteCom CN-124 2468c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &ali_m5632_info, 2478c2ecf20Sopenharmony_ci}, 2488c2ecf20Sopenharmony_ci#endif 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_AN2720 2518c2ecf20Sopenharmony_ci{ 2528c2ecf20Sopenharmony_ci USB_DEVICE (0x0547, 0x2720), // AnchorChips defaults 2538c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &an2720_info, 2548c2ecf20Sopenharmony_ci}, { 2558c2ecf20Sopenharmony_ci USB_DEVICE (0x0547, 0x2727), // Xircom PGUNET 2568c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &an2720_info, 2578c2ecf20Sopenharmony_ci}, 2588c2ecf20Sopenharmony_ci#endif 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_BELKIN 2618c2ecf20Sopenharmony_ci{ 2628c2ecf20Sopenharmony_ci USB_DEVICE (0x050d, 0x0004), // Belkin 2638c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &belkin_info, 2648c2ecf20Sopenharmony_ci}, { 2658c2ecf20Sopenharmony_ci USB_DEVICE (0x056c, 0x8100), // eTEK 2668c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &belkin_info, 2678c2ecf20Sopenharmony_ci}, { 2688c2ecf20Sopenharmony_ci USB_DEVICE (0x0525, 0x9901), // Advance USBNET (eTEK) 2698c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &belkin_info, 2708c2ecf20Sopenharmony_ci}, 2718c2ecf20Sopenharmony_ci#endif 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_EPSON2888 2748c2ecf20Sopenharmony_ci{ 2758c2ecf20Sopenharmony_ci USB_DEVICE (0x0525, 0x2888), // EPSON USB client 2768c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &epson2888_info, 2778c2ecf20Sopenharmony_ci}, 2788c2ecf20Sopenharmony_ci#endif 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_KC2190 2818c2ecf20Sopenharmony_ci{ 2828c2ecf20Sopenharmony_ci USB_DEVICE (0x050f, 0x0190), // KC-190 2838c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &kc2190_info, 2848c2ecf20Sopenharmony_ci}, 2858c2ecf20Sopenharmony_ci#endif 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci#ifdef CONFIG_USB_ARMLINUX 2888c2ecf20Sopenharmony_ci/* 2898c2ecf20Sopenharmony_ci * SA-1100 using standard ARM Linux kernels, or compatible. 2908c2ecf20Sopenharmony_ci * Often used when talking to Linux PDAs (iPaq, Yopy, etc). 2918c2ecf20Sopenharmony_ci * The sa-1100 "usb-eth" driver handles the basic framing. 2928c2ecf20Sopenharmony_ci * 2938c2ecf20Sopenharmony_ci * PXA25x or PXA210 ... these use a "usb-eth" driver much like 2948c2ecf20Sopenharmony_ci * the sa1100 one, but hardware uses different endpoint numbers. 2958c2ecf20Sopenharmony_ci * 2968c2ecf20Sopenharmony_ci * Or the Linux "Ethernet" gadget on hardware that can't talk 2978c2ecf20Sopenharmony_ci * CDC Ethernet (e.g., no altsettings), in either of two modes: 2988c2ecf20Sopenharmony_ci * - acting just like the old "usb-eth" firmware, though 2998c2ecf20Sopenharmony_ci * the implementation is different 3008c2ecf20Sopenharmony_ci * - supporting RNDIS as the first/default configuration for 3018c2ecf20Sopenharmony_ci * MS-Windows interop; Linux needs to use the other config 3028c2ecf20Sopenharmony_ci */ 3038c2ecf20Sopenharmony_ci{ 3048c2ecf20Sopenharmony_ci // 1183 = 0x049F, both used as hex values? 3058c2ecf20Sopenharmony_ci // Compaq "Itsy" vendor/product id 3068c2ecf20Sopenharmony_ci USB_DEVICE (0x049F, 0x505A), // usb-eth, or compatible 3078c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &linuxdev_info, 3088c2ecf20Sopenharmony_ci}, { 3098c2ecf20Sopenharmony_ci USB_DEVICE (0x0E7E, 0x1001), // G.Mate "Yopy" 3108c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &yopy_info, 3118c2ecf20Sopenharmony_ci}, { 3128c2ecf20Sopenharmony_ci USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader 3138c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &blob_info, 3148c2ecf20Sopenharmony_ci}, { 3158c2ecf20Sopenharmony_ci USB_DEVICE (0x1286, 0x8001), // "blob" bootloader 3168c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &blob_info, 3178c2ecf20Sopenharmony_ci}, { 3188c2ecf20Sopenharmony_ci // Linux Ethernet/RNDIS gadget, mostly on PXA, second config 3198c2ecf20Sopenharmony_ci // e.g. Gumstix, current OpenZaurus, ... or anything else 3208c2ecf20Sopenharmony_ci // that just enables this gadget option. 3218c2ecf20Sopenharmony_ci USB_DEVICE (0x0525, 0xa4a2), 3228c2ecf20Sopenharmony_ci .driver_info = (unsigned long) &linuxdev_info, 3238c2ecf20Sopenharmony_ci}, 3248c2ecf20Sopenharmony_ci#endif 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci { }, // END 3278c2ecf20Sopenharmony_ci}; 3288c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(usb, products); 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_ci/*-------------------------------------------------------------------------*/ 3318c2ecf20Sopenharmony_cistatic int dummy_prereset(struct usb_interface *intf) 3328c2ecf20Sopenharmony_ci{ 3338c2ecf20Sopenharmony_ci return 0; 3348c2ecf20Sopenharmony_ci} 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_cistatic int dummy_postreset(struct usb_interface *intf) 3378c2ecf20Sopenharmony_ci{ 3388c2ecf20Sopenharmony_ci return 0; 3398c2ecf20Sopenharmony_ci} 3408c2ecf20Sopenharmony_ci 3418c2ecf20Sopenharmony_cistatic struct usb_driver cdc_subset_driver = { 3428c2ecf20Sopenharmony_ci .name = "cdc_subset", 3438c2ecf20Sopenharmony_ci .probe = usbnet_probe, 3448c2ecf20Sopenharmony_ci .suspend = usbnet_suspend, 3458c2ecf20Sopenharmony_ci .resume = usbnet_resume, 3468c2ecf20Sopenharmony_ci .pre_reset = dummy_prereset, 3478c2ecf20Sopenharmony_ci .post_reset = dummy_postreset, 3488c2ecf20Sopenharmony_ci .disconnect = usbnet_disconnect, 3498c2ecf20Sopenharmony_ci .id_table = products, 3508c2ecf20Sopenharmony_ci .disable_hub_initiated_lpm = 1, 3518c2ecf20Sopenharmony_ci}; 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_cimodule_usb_driver(cdc_subset_driver); 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_ciMODULE_AUTHOR("David Brownell"); 3568c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Simple 'CDC Subset' USB networking links"); 3578c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 358