mcs7830.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. /*
  2. * MosChips MCS7830 based USB 2.0 Ethernet Devices
  3. *
  4. * based on usbnet.c, asix.c and the vendor provided mcs7830 driver
  5. *
  6. * Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>
  7. * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com>
  8. * Copyright (C) 2005 Phil Chang <pchang23@sbcglobal.net>
  9. * Copyright (c) 2002-2003 TiVo Inc.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24. */
  25. #include <linux/crc32.h>
  26. #include <linux/etherdevice.h>
  27. #include <linux/ethtool.h>
  28. #include <linux/init.h>
  29. #include <linux/mii.h>
  30. #include <linux/module.h>
  31. #include <linux/netdevice.h>
  32. #include <linux/usb.h>
  33. #include <linux/usb/usbnet.h>
  34. /* requests */
  35. #define MCS7830_RD_BMREQ (USB_DIR_IN | USB_TYPE_VENDOR | \
  36. USB_RECIP_DEVICE)
  37. #define MCS7830_WR_BMREQ (USB_DIR_OUT | USB_TYPE_VENDOR | \
  38. USB_RECIP_DEVICE)
  39. #define MCS7830_RD_BREQ 0x0E
  40. #define MCS7830_WR_BREQ 0x0D
  41. #define MCS7830_CTRL_TIMEOUT 1000
  42. #define MCS7830_MAX_MCAST 64
  43. #define MCS7830_VENDOR_ID 0x9710
  44. #define MCS7830_PRODUCT_ID 0x7830
  45. #define MCS7730_PRODUCT_ID 0x7730
  46. #define SITECOM_VENDOR_ID 0x0DF6
  47. #define LN_030_PRODUCT_ID 0x0021
  48. #define MCS7830_MII_ADVERTISE (ADVERTISE_PAUSE_CAP | ADVERTISE_100FULL | \
  49. ADVERTISE_100HALF | ADVERTISE_10FULL | \
  50. ADVERTISE_10HALF | ADVERTISE_CSMA)
  51. /* HIF_REG_XX coressponding index value */
  52. enum {
  53. HIF_REG_MULTICAST_HASH = 0x00,
  54. HIF_REG_PACKET_GAP1 = 0x08,
  55. HIF_REG_PACKET_GAP2 = 0x09,
  56. HIF_REG_PHY_DATA = 0x0a,
  57. HIF_REG_PHY_CMD1 = 0x0c,
  58. HIF_REG_PHY_CMD1_READ = 0x40,
  59. HIF_REG_PHY_CMD1_WRITE = 0x20,
  60. HIF_REG_PHY_CMD1_PHYADDR = 0x01,
  61. HIF_REG_PHY_CMD2 = 0x0d,
  62. HIF_REG_PHY_CMD2_PEND_FLAG_BIT = 0x80,
  63. HIF_REG_PHY_CMD2_READY_FLAG_BIT = 0x40,
  64. HIF_REG_CONFIG = 0x0e,
  65. HIF_REG_CONFIG_CFG = 0x80,
  66. HIF_REG_CONFIG_SPEED100 = 0x40,
  67. HIF_REG_CONFIG_FULLDUPLEX_ENABLE = 0x20,
  68. HIF_REG_CONFIG_RXENABLE = 0x10,
  69. HIF_REG_CONFIG_TXENABLE = 0x08,
  70. HIF_REG_CONFIG_SLEEPMODE = 0x04,
  71. HIF_REG_CONFIG_ALLMULTICAST = 0x02,
  72. HIF_REG_CONFIG_PROMISCIOUS = 0x01,
  73. HIF_REG_ETHERNET_ADDR = 0x0f,
  74. HIF_REG_22 = 0x15,
  75. HIF_REG_PAUSE_THRESHOLD = 0x16,
  76. HIF_REG_PAUSE_THRESHOLD_DEFAULT = 0,
  77. };
  78. struct mcs7830_data {
  79. u8 multi_filter[8];
  80. u8 config;
  81. };
  82. static const char driver_name[] = "MOSCHIP usb-ethernet driver";
  83. static int mcs7830_get_reg(struct usbnet *dev, u16 index, u16 size, void *data)
  84. {
  85. struct usb_device *xdev = dev->udev;
  86. int ret;
  87. void *buffer;
  88. buffer = kmalloc(size, GFP_NOIO);
  89. if (buffer == NULL)
  90. return -ENOMEM;
  91. ret = usb_control_msg(xdev, usb_rcvctrlpipe(xdev, 0), MCS7830_RD_BREQ,
  92. MCS7830_RD_BMREQ, 0x0000, index, buffer,
  93. size, MCS7830_CTRL_TIMEOUT);
  94. memcpy(data, buffer, size);
  95. kfree(buffer);
  96. return ret;
  97. }
  98. static int mcs7830_set_reg(struct usbnet *dev, u16 index, u16 size, void *data)
  99. {
  100. struct usb_device *xdev = dev->udev;
  101. int ret;
  102. void *buffer;
  103. buffer = kmalloc(size, GFP_NOIO);
  104. if (buffer == NULL)
  105. return -ENOMEM;
  106. memcpy(buffer, data, size);
  107. ret = usb_control_msg(xdev, usb_sndctrlpipe(xdev, 0), MCS7830_WR_BREQ,
  108. MCS7830_WR_BMREQ, 0x0000, index, buffer,
  109. size, MCS7830_CTRL_TIMEOUT);
  110. kfree(buffer);
  111. return ret;
  112. }
  113. static void mcs7830_async_cmd_callback(struct urb *urb)
  114. {
  115. struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
  116. int status = urb->status;
  117. if (status < 0)
  118. printk(KERN_DEBUG "%s() failed with %d\n",
  119. __func__, status);
  120. kfree(req);
  121. usb_free_urb(urb);
  122. }
  123. static void mcs7830_set_reg_async(struct usbnet *dev, u16 index, u16 size, void *data)
  124. {
  125. struct usb_ctrlrequest *req;
  126. int ret;
  127. struct urb *urb;
  128. urb = usb_alloc_urb(0, GFP_ATOMIC);
  129. if (!urb) {
  130. dev_dbg(&dev->udev->dev,
  131. "Error allocating URB in write_cmd_async!\n");
  132. return;
  133. }
  134. req = kmalloc(sizeof *req, GFP_ATOMIC);
  135. if (!req) {
  136. dev_err(&dev->udev->dev,
  137. "Failed to allocate memory for control request\n");
  138. goto out;
  139. }
  140. req->bRequestType = MCS7830_WR_BMREQ;
  141. req->bRequest = MCS7830_WR_BREQ;
  142. req->wValue = 0;
  143. req->wIndex = cpu_to_le16(index);
  144. req->wLength = cpu_to_le16(size);
  145. usb_fill_control_urb(urb, dev->udev,
  146. usb_sndctrlpipe(dev->udev, 0),
  147. (void *)req, data, size,
  148. mcs7830_async_cmd_callback, req);
  149. ret = usb_submit_urb(urb, GFP_ATOMIC);
  150. if (ret < 0) {
  151. dev_err(&dev->udev->dev,
  152. "Error submitting the control message: ret=%d\n", ret);
  153. goto out;
  154. }
  155. return;
  156. out:
  157. kfree(req);
  158. usb_free_urb(urb);
  159. }
  160. static int mcs7830_get_address(struct usbnet *dev)
  161. {
  162. int ret;
  163. ret = mcs7830_get_reg(dev, HIF_REG_ETHERNET_ADDR, ETH_ALEN,
  164. dev->net->dev_addr);
  165. if (ret < 0)
  166. return ret;
  167. return 0;
  168. }
  169. static int mcs7830_read_phy(struct usbnet *dev, u8 index)
  170. {
  171. int ret;
  172. int i;
  173. __le16 val;
  174. u8 cmd[2] = {
  175. HIF_REG_PHY_CMD1_READ | HIF_REG_PHY_CMD1_PHYADDR,
  176. HIF_REG_PHY_CMD2_PEND_FLAG_BIT | index,
  177. };
  178. mutex_lock(&dev->phy_mutex);
  179. /* write the MII command */
  180. ret = mcs7830_set_reg(dev, HIF_REG_PHY_CMD1, 2, cmd);
  181. if (ret < 0)
  182. goto out;
  183. /* wait for the data to become valid, should be within < 1ms */
  184. for (i = 0; i < 10; i++) {
  185. ret = mcs7830_get_reg(dev, HIF_REG_PHY_CMD1, 2, cmd);
  186. if ((ret < 0) || (cmd[1] & HIF_REG_PHY_CMD2_READY_FLAG_BIT))
  187. break;
  188. ret = -EIO;
  189. msleep(1);
  190. }
  191. if (ret < 0)
  192. goto out;
  193. /* read actual register contents */
  194. ret = mcs7830_get_reg(dev, HIF_REG_PHY_DATA, 2, &val);
  195. if (ret < 0)
  196. goto out;
  197. ret = le16_to_cpu(val);
  198. dev_dbg(&dev->udev->dev, "read PHY reg %02x: %04x (%d tries)\n",
  199. index, val, i);
  200. out:
  201. mutex_unlock(&dev->phy_mutex);
  202. return ret;
  203. }
  204. static int mcs7830_write_phy(struct usbnet *dev, u8 index, u16 val)
  205. {
  206. int ret;
  207. int i;
  208. __le16 le_val;
  209. u8 cmd[2] = {
  210. HIF_REG_PHY_CMD1_WRITE | HIF_REG_PHY_CMD1_PHYADDR,
  211. HIF_REG_PHY_CMD2_PEND_FLAG_BIT | (index & 0x1F),
  212. };
  213. mutex_lock(&dev->phy_mutex);
  214. /* write the new register contents */
  215. le_val = cpu_to_le16(val);
  216. ret = mcs7830_set_reg(dev, HIF_REG_PHY_DATA, 2, &le_val);
  217. if (ret < 0)
  218. goto out;
  219. /* write the MII command */
  220. ret = mcs7830_set_reg(dev, HIF_REG_PHY_CMD1, 2, cmd);
  221. if (ret < 0)
  222. goto out;
  223. /* wait for the command to be accepted by the PHY */
  224. for (i = 0; i < 10; i++) {
  225. ret = mcs7830_get_reg(dev, HIF_REG_PHY_CMD1, 2, cmd);
  226. if ((ret < 0) || (cmd[1] & HIF_REG_PHY_CMD2_READY_FLAG_BIT))
  227. break;
  228. ret = -EIO;
  229. msleep(1);
  230. }
  231. if (ret < 0)
  232. goto out;
  233. ret = 0;
  234. dev_dbg(&dev->udev->dev, "write PHY reg %02x: %04x (%d tries)\n",
  235. index, val, i);
  236. out:
  237. mutex_unlock(&dev->phy_mutex);
  238. return ret;
  239. }
  240. /*
  241. * This algorithm comes from the original mcs7830 version 1.4 driver,
  242. * not sure if it is needed.
  243. */
  244. static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
  245. {
  246. int ret;
  247. /* Enable all media types */
  248. ret = mcs7830_write_phy(dev, MII_ADVERTISE, MCS7830_MII_ADVERTISE);
  249. /* First reset BMCR */
  250. if (!ret)
  251. ret = mcs7830_write_phy(dev, MII_BMCR, 0x0000);
  252. /* Enable Auto Neg */
  253. if (!ret)
  254. ret = mcs7830_write_phy(dev, MII_BMCR, BMCR_ANENABLE);
  255. /* Restart Auto Neg (Keep the Enable Auto Neg Bit Set) */
  256. if (!ret)
  257. ret = mcs7830_write_phy(dev, MII_BMCR,
  258. BMCR_ANENABLE | BMCR_ANRESTART );
  259. return ret < 0 ? : 0;
  260. }
  261. /*
  262. * if we can read register 22, the chip revision is C or higher
  263. */
  264. static int mcs7830_get_rev(struct usbnet *dev)
  265. {
  266. u8 dummy[2];
  267. int ret;
  268. ret = mcs7830_get_reg(dev, HIF_REG_22, 2, dummy);
  269. if (ret > 0)
  270. return 2; /* Rev C or later */
  271. return 1; /* earlier revision */
  272. }
  273. /*
  274. * On rev. C we need to set the pause threshold
  275. */
  276. static void mcs7830_rev_C_fixup(struct usbnet *dev)
  277. {
  278. u8 pause_threshold = HIF_REG_PAUSE_THRESHOLD_DEFAULT;
  279. int retry;
  280. for (retry = 0; retry < 2; retry++) {
  281. if (mcs7830_get_rev(dev) == 2) {
  282. dev_info(&dev->udev->dev, "applying rev.C fixup\n");
  283. mcs7830_set_reg(dev, HIF_REG_PAUSE_THRESHOLD,
  284. 1, &pause_threshold);
  285. }
  286. msleep(1);
  287. }
  288. }
  289. static int mcs7830_init_dev(struct usbnet *dev)
  290. {
  291. int ret;
  292. int retry;
  293. /* Read MAC address from EEPROM */
  294. ret = -EINVAL;
  295. for (retry = 0; retry < 5 && ret; retry++)
  296. ret = mcs7830_get_address(dev);
  297. if (ret) {
  298. dev_warn(&dev->udev->dev, "Cannot read MAC address\n");
  299. goto out;
  300. }
  301. /* Set up PHY */
  302. ret = mcs7830_set_autoneg(dev, 0);
  303. if (ret) {
  304. dev_info(&dev->udev->dev, "Cannot set autoneg\n");
  305. goto out;
  306. }
  307. mcs7830_rev_C_fixup(dev);
  308. ret = 0;
  309. out:
  310. return ret;
  311. }
  312. static int mcs7830_mdio_read(struct net_device *netdev, int phy_id,
  313. int location)
  314. {
  315. struct usbnet *dev = netdev_priv(netdev);
  316. return mcs7830_read_phy(dev, location);
  317. }
  318. static void mcs7830_mdio_write(struct net_device *netdev, int phy_id,
  319. int location, int val)
  320. {
  321. struct usbnet *dev = netdev_priv(netdev);
  322. mcs7830_write_phy(dev, location, val);
  323. }
  324. static int mcs7830_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
  325. {
  326. struct usbnet *dev = netdev_priv(net);
  327. return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
  328. }
  329. /* credits go to asix_set_multicast */
  330. static void mcs7830_set_multicast(struct net_device *net)
  331. {
  332. struct usbnet *dev = netdev_priv(net);
  333. struct mcs7830_data *data = (struct mcs7830_data *)&dev->data;
  334. data->config = HIF_REG_CONFIG_TXENABLE;
  335. /* this should not be needed, but it doesn't work otherwise */
  336. data->config |= HIF_REG_CONFIG_ALLMULTICAST;
  337. if (net->flags & IFF_PROMISC) {
  338. data->config |= HIF_REG_CONFIG_PROMISCIOUS;
  339. } else if (net->flags & IFF_ALLMULTI
  340. || net->mc_count > MCS7830_MAX_MCAST) {
  341. data->config |= HIF_REG_CONFIG_ALLMULTICAST;
  342. } else if (net->mc_count == 0) {
  343. /* just broadcast and directed */
  344. } else {
  345. /* We use the 20 byte dev->data
  346. * for our 8 byte filter buffer
  347. * to avoid allocating memory that
  348. * is tricky to free later */
  349. struct dev_mc_list *mc_list = net->mc_list;
  350. u32 crc_bits;
  351. int i;
  352. memset(data->multi_filter, 0, sizeof data->multi_filter);
  353. /* Build the multicast hash filter. */
  354. for (i = 0; i < net->mc_count; i++) {
  355. crc_bits = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
  356. data->multi_filter[crc_bits >> 3] |= 1 << (crc_bits & 7);
  357. mc_list = mc_list->next;
  358. }
  359. mcs7830_set_reg_async(dev, HIF_REG_MULTICAST_HASH,
  360. sizeof data->multi_filter,
  361. data->multi_filter);
  362. }
  363. mcs7830_set_reg_async(dev, HIF_REG_CONFIG, 1, &data->config);
  364. }
  365. static int mcs7830_get_regs_len(struct net_device *net)
  366. {
  367. struct usbnet *dev = netdev_priv(net);
  368. switch (mcs7830_get_rev(dev)) {
  369. case 1:
  370. return 21;
  371. case 2:
  372. return 32;
  373. }
  374. return 0;
  375. }
  376. static void mcs7830_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *drvinfo)
  377. {
  378. usbnet_get_drvinfo(net, drvinfo);
  379. drvinfo->regdump_len = mcs7830_get_regs_len(net);
  380. }
  381. static void mcs7830_get_regs(struct net_device *net, struct ethtool_regs *regs, void *data)
  382. {
  383. struct usbnet *dev = netdev_priv(net);
  384. regs->version = mcs7830_get_rev(dev);
  385. mcs7830_get_reg(dev, 0, regs->len, data);
  386. }
  387. static struct ethtool_ops mcs7830_ethtool_ops = {
  388. .get_drvinfo = mcs7830_get_drvinfo,
  389. .get_regs_len = mcs7830_get_regs_len,
  390. .get_regs = mcs7830_get_regs,
  391. /* common usbnet calls */
  392. .get_link = usbnet_get_link,
  393. .get_msglevel = usbnet_get_msglevel,
  394. .set_msglevel = usbnet_set_msglevel,
  395. .get_settings = usbnet_get_settings,
  396. .set_settings = usbnet_set_settings,
  397. .nway_reset = usbnet_nway_reset,
  398. };
  399. static int mcs7830_set_mac_address(struct net_device *netdev, void *p)
  400. {
  401. int ret;
  402. struct usbnet *dev = netdev_priv(netdev);
  403. struct sockaddr *addr = p;
  404. if (netif_running(netdev))
  405. return -EBUSY;
  406. if (!is_valid_ether_addr(addr->sa_data))
  407. return -EINVAL;
  408. memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
  409. ret = mcs7830_set_reg(dev, HIF_REG_ETHERNET_ADDR, ETH_ALEN,
  410. netdev->dev_addr);
  411. if (ret < 0)
  412. return ret;
  413. return 0;
  414. }
  415. static const struct net_device_ops mcs7830_netdev_ops = {
  416. .ndo_open = usbnet_open,
  417. .ndo_stop = usbnet_stop,
  418. .ndo_start_xmit = usbnet_start_xmit,
  419. .ndo_tx_timeout = usbnet_tx_timeout,
  420. .ndo_change_mtu = usbnet_change_mtu,
  421. .ndo_validate_addr = eth_validate_addr,
  422. .ndo_do_ioctl = mcs7830_ioctl,
  423. .ndo_set_multicast_list = mcs7830_set_multicast,
  424. .ndo_set_mac_address = mcs7830_set_mac_address,
  425. };
  426. static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev)
  427. {
  428. struct net_device *net = dev->net;
  429. int ret;
  430. ret = mcs7830_init_dev(dev);
  431. if (ret)
  432. goto out;
  433. net->ethtool_ops = &mcs7830_ethtool_ops;
  434. net->netdev_ops = &mcs7830_netdev_ops;
  435. mcs7830_set_multicast(net);
  436. /* reserve space for the status byte on rx */
  437. dev->rx_urb_size = ETH_FRAME_LEN + 1;
  438. dev->mii.mdio_read = mcs7830_mdio_read;
  439. dev->mii.mdio_write = mcs7830_mdio_write;
  440. dev->mii.dev = net;
  441. dev->mii.phy_id_mask = 0x3f;
  442. dev->mii.reg_num_mask = 0x1f;
  443. dev->mii.phy_id = *((u8 *) net->dev_addr + 1);
  444. ret = usbnet_get_endpoints(dev, udev);
  445. out:
  446. return ret;
  447. }
  448. /* The chip always appends a status bytes that we need to strip */
  449. static int mcs7830_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
  450. {
  451. u8 status;
  452. if (skb->len == 0) {
  453. dev_err(&dev->udev->dev, "unexpected empty rx frame\n");
  454. return 0;
  455. }
  456. skb_trim(skb, skb->len - 1);
  457. status = skb->data[skb->len];
  458. if (status != 0x20)
  459. dev_dbg(&dev->udev->dev, "rx fixup status %x\n", status);
  460. return skb->len > 0;
  461. }
  462. static const struct driver_info moschip_info = {
  463. .description = "MOSCHIP 7830/7730 usb-NET adapter",
  464. .bind = mcs7830_bind,
  465. .rx_fixup = mcs7830_rx_fixup,
  466. .flags = FLAG_ETHER,
  467. .in = 1,
  468. .out = 2,
  469. };
  470. static const struct driver_info sitecom_info = {
  471. .description = "Sitecom LN-30 usb-NET adapter",
  472. .bind = mcs7830_bind,
  473. .rx_fixup = mcs7830_rx_fixup,
  474. .flags = FLAG_ETHER,
  475. .in = 1,
  476. .out = 2,
  477. };
  478. static const struct usb_device_id products[] = {
  479. {
  480. USB_DEVICE(MCS7830_VENDOR_ID, MCS7830_PRODUCT_ID),
  481. .driver_info = (unsigned long) &moschip_info,
  482. },
  483. {
  484. USB_DEVICE(MCS7830_VENDOR_ID, MCS7730_PRODUCT_ID),
  485. .driver_info = (unsigned long) &moschip_info,
  486. },
  487. {
  488. USB_DEVICE(SITECOM_VENDOR_ID, LN_030_PRODUCT_ID),
  489. .driver_info = (unsigned long) &sitecom_info,
  490. },
  491. {},
  492. };
  493. MODULE_DEVICE_TABLE(usb, products);
  494. static struct usb_driver mcs7830_driver = {
  495. .name = driver_name,
  496. .id_table = products,
  497. .probe = usbnet_probe,
  498. .disconnect = usbnet_disconnect,
  499. .suspend = usbnet_suspend,
  500. .resume = usbnet_resume,
  501. };
  502. static int __init mcs7830_init(void)
  503. {
  504. return usb_register(&mcs7830_driver);
  505. }
  506. module_init(mcs7830_init);
  507. static void __exit mcs7830_exit(void)
  508. {
  509. usb_deregister(&mcs7830_driver);
  510. }
  511. module_exit(mcs7830_exit);
  512. MODULE_DESCRIPTION("USB to network adapter MCS7830)");
  513. MODULE_LICENSE("GPL");