aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/net/usbnet.c
diff options
context:
space:
mode:
author <jgarzik@pretzel.yyz.us>2005-05-26 21:40:25 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-26 21:40:25 -0400
commit462cee296476278acaa54c41925b3273e0e4dd40 (patch)
treec9d9fcfc4dd62807cb67678a6eda0151bfa8be95 /drivers/usb/net/usbnet.c
parent126fa4b9ca5d9d7cb7d46f779ad3bd3631ca387c (diff)
parent4ec5240ec367a592834385893200dd4fb369354c (diff)
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git branch HEAD
Diffstat (limited to 'drivers/usb/net/usbnet.c')
-rw-r--r--drivers/usb/net/usbnet.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index f6bc6b3b333c..85476e76b244 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -1517,6 +1517,26 @@ static void cdc_unbind (struct usbnet *dev, struct usb_interface *intf)
1517 } 1517 }
1518} 1518}
1519 1519
1520#endif /* NEED_GENERIC_CDC */
1521
1522
1523#ifdef CONFIG_USB_CDCETHER
1524#define HAVE_HARDWARE
1525
1526/*-------------------------------------------------------------------------
1527 *
1528 * Communications Device Class, Ethernet Control model
1529 *
1530 * Takes two interfaces. The DATA interface is inactive till an altsetting
1531 * is selected. Configuration data includes class descriptors.
1532 *
1533 * This should interop with whatever the 2.4 "CDCEther.c" driver
1534 * (by Brad Hards) talked with.
1535 *
1536 *-------------------------------------------------------------------------*/
1537
1538#include <linux/ctype.h>
1539
1520 1540
1521static void dumpspeed (struct usbnet *dev, __le32 *speeds) 1541static void dumpspeed (struct usbnet *dev, __le32 *speeds)
1522{ 1542{
@@ -1567,26 +1587,6 @@ static void cdc_status (struct usbnet *dev, struct urb *urb)
1567 } 1587 }
1568} 1588}
1569 1589
1570#endif /* NEED_GENERIC_CDC */
1571
1572
1573#ifdef CONFIG_USB_CDCETHER
1574#define HAVE_HARDWARE
1575
1576/*-------------------------------------------------------------------------
1577 *
1578 * Communications Device Class, Ethernet Control model
1579 *
1580 * Takes two interfaces. The DATA interface is inactive till an altsetting
1581 * is selected. Configuration data includes class descriptors.
1582 *
1583 * This should interop with whatever the 2.4 "CDCEther.c" driver
1584 * (by Brad Hards) talked with.
1585 *
1586 *-------------------------------------------------------------------------*/
1587
1588#include <linux/ctype.h>
1589
1590static u8 nibble (unsigned char c) 1590static u8 nibble (unsigned char c)
1591{ 1591{
1592 if (likely (isdigit (c))) 1592 if (likely (isdigit (c)))
@@ -2765,7 +2765,7 @@ static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf)
2765 } 2765 }
2766 /* expect bcdVersion 1.0, ignore */ 2766 /* expect bcdVersion 1.0, ignore */
2767 if (memcmp(&desc->bGUID, blan_guid, 16) 2767 if (memcmp(&desc->bGUID, blan_guid, 16)
2768 || memcmp(&desc->bGUID, blan_guid, 16) ) { 2768 && memcmp(&desc->bGUID, blan_guid, 16) ) {
2769 /* hey, this one might _really_ be MDLM! */ 2769 /* hey, this one might _really_ be MDLM! */
2770 dev_dbg (&intf->dev, "MDLM guid\n"); 2770 dev_dbg (&intf->dev, "MDLM guid\n");
2771 goto bad_desc; 2771 goto bad_desc;
@@ -2797,11 +2797,13 @@ static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf)
2797 * - bPad (ignored, for PADAFTER -- BLAN-only) 2797 * - bPad (ignored, for PADAFTER -- BLAN-only)
2798 * bits are: 2798 * bits are:
2799 * - 0x01 -- Zaurus framing (add CRC) 2799 * - 0x01 -- Zaurus framing (add CRC)
2800 * - 0x02 -- PADBEFORE 2800 * - 0x02 -- PADBEFORE (CRC includes some padding)
2801 * - 0x04 -- PADAFTER 2801 * - 0x04 -- PADAFTER (some padding after CRC)
2802 * - 0x08 -- "fermat" packet mangling (for hw bugs) 2802 * - 0x08 -- "fermat" packet mangling (for hw bugs)
2803 * the PADBEFORE appears not to matter; we interop
2804 * with devices that use it and those that don't.
2803 */ 2805 */
2804 if (detail->bDetailData[1] != 0x01) { 2806 if ((detail->bDetailData[1] & ~02) != 0x01) {
2805 /* bmDataCapabilites == 0 would be fine too, 2807 /* bmDataCapabilites == 0 would be fine too,
2806 * but framing is minidriver-coupled for now. 2808 * but framing is minidriver-coupled for now.
2807 */ 2809 */
@@ -4071,9 +4073,6 @@ static const struct usb_device_id products [] = {
4071 USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader 4073 USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader
4072 .driver_info = (unsigned long) &blob_info, 4074 .driver_info = (unsigned long) &blob_info,
4073}, { 4075}, {
4074 USB_DEVICE (0x22b8, 0x600c), // USBNET Motorola E680
4075 .driver_info = (unsigned long) &linuxdev_info,
4076}, {
4077 // Linux Ethernet/RNDIS gadget on pxa210/25x/26x 4076 // Linux Ethernet/RNDIS gadget on pxa210/25x/26x
4078 // e.g. Gumstix, current OpenZaurus, ... 4077 // e.g. Gumstix, current OpenZaurus, ...
4079 USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203), 4078 USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203),