From e8d997952bbea4f408f56a55f18667f2817dbb44 Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Wed, 25 May 2005 16:06:59 +0900 Subject: [PATCH] NETDEV: Elecom (Laneed) LD-USBL/TX support. Elecom (Laneed) LD-USBL/TX support. Signed-off-by: YOSHIFUJI Hideaki --- drivers/usb/net/pegasus.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/usb/net') diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h index 13ccedef5c7e..b98f2a833442 100644 --- a/drivers/usb/net/pegasus.h +++ b/drivers/usb/net/pegasus.h @@ -249,6 +249,8 @@ PEGASUS_DEV( "Kingston KNU101TX Ethernet", VENDOR_KINGSTON, 0x000a, DEFAULT_GPIO_RESET) PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x4002, DEFAULT_GPIO_RESET ) +PEGASUS_DEV( "LANEED USB Ethernet LD-USBL/TX", VENDOR_LANEED, 0x4005, + DEFAULT_GPIO_RESET | PEGASUS_II) PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x400b, DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "LANEED USB Ethernet LD-USB/T", VENDOR_LANEED, 0xabc1, -- cgit v1.2.2 From ae0a97bfda598088b6f97db9d9f65cd6c4f439c6 Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Wed, 25 May 2005 16:07:04 +0900 Subject: [PATCH] NETDEV: fix receiving multicast frames. Some USB ethernet drivers did not accept multicast frames appropriately. IPv6 did not work with those drivers without this patch. Signed-off-by: YOSHIFUJI Hideaki --- drivers/usb/net/pegasus.c | 2 +- drivers/usb/net/rtl8150.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/net') diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index d976790312aa..5f4496d8dbac 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c @@ -1166,7 +1166,7 @@ static void pegasus_set_multicast(struct net_device *net) pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; if (netif_msg_link(pegasus)) pr_info("%s: Promiscuous mode enabled.\n", net->name); - } else if ((net->mc_count > multicast_filter_limit) || + } else if (net->mc_count || (net->flags & IFF_ALLMULTI)) { pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c index 8fb223385f2f..626b016addff 100644 --- a/drivers/usb/net/rtl8150.c +++ b/drivers/usb/net/rtl8150.c @@ -667,7 +667,7 @@ static void rtl8150_set_multicast(struct net_device *netdev) if (netdev->flags & IFF_PROMISC) { dev->rx_creg |= cpu_to_le16(0x0001); info("%s: promiscuous mode", netdev->name); - } else if ((netdev->mc_count > multicast_filter_limit) || + } else if (netdev->mc_count || (netdev->flags & IFF_ALLMULTI)) { dev->rx_creg &= cpu_to_le16(0xfffe); dev->rx_creg |= cpu_to_le16(0x0002); -- cgit v1.2.2 From a3c900bb8cbacfecf0be51313e43f330663266a1 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Sun, 24 Apr 2005 16:37:15 -0700 Subject: [PATCH] USB: PM support for zd1201 This patch enables power management (suspend, resume) support for zd1201. It fixes problems after wakeup for me, but these problems did not appear everytime without this patch. it's a bit empirical, based on what the usbnet does, so maybe not correct... Maybe someone can give it a look before it's applied. Signed-off-by: Colin Leroy Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/net/zd1201.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/usb/net/zd1201.h | 1 + 2 files changed, 39 insertions(+) (limited to 'drivers/usb/net') diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index 341ae5f732dd..eb0bff535b3c 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c @@ -1884,12 +1884,50 @@ static void zd1201_disconnect(struct usb_interface *interface) kfree(zd); } +#ifdef CONFIG_PM + +static int zd1201_suspend(struct usb_interface *interface, + pm_message_t message) +{ + struct zd1201 *zd = usb_get_intfdata(interface); + + netif_device_detach(zd->dev); + + zd->was_enabled = zd->mac_enabled; + + if (zd->was_enabled) + return zd1201_disable(zd); + else + return 0; +} + +static int zd1201_resume(struct usb_interface *interface) +{ + struct zd1201 *zd = usb_get_intfdata(interface); + + netif_device_attach(zd->dev); + + if (zd->was_enabled) + return zd1201_enable(zd); + else + return 0; +} + +#else + +#define zd1201_suspend NULL +#define zd1201_resume NULL + +#endif + static struct usb_driver zd1201_usb = { .owner = THIS_MODULE, .name = "zd1201", .probe = zd1201_probe, .disconnect = zd1201_disconnect, .id_table = zd1201_table, + .suspend = zd1201_suspend, + .resume = zd1201_resume, }; static int __init zd1201_init(void) diff --git a/drivers/usb/net/zd1201.h b/drivers/usb/net/zd1201.h index 1627c71e8052..235f0ee34b24 100644 --- a/drivers/usb/net/zd1201.h +++ b/drivers/usb/net/zd1201.h @@ -46,6 +46,7 @@ struct zd1201 { char essid[IW_ESSID_MAX_SIZE+1]; int essidlen; int mac_enabled; + int was_enabled; int monitor; int encode_enabled; int encode_restricted; -- cgit v1.2.2 From f58f97fa9d258e4110ee1257a63cd1af51787f69 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Sun, 1 May 2005 11:29:10 +0200 Subject: [PATCH] USB: check for device in zd1201_resume My patch adding PM support for zd1201 didn't check for the device on resume, which can oops if the device has been removed. This patch fixes it. Signed-off-by: Colin Leroy Signed-off-by: Greg Kroah-Hartman --- drivers/usb/net/zd1201.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb/net') diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index eb0bff535b3c..3b387b005739 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c @@ -1905,6 +1905,9 @@ static int zd1201_resume(struct usb_interface *interface) { struct zd1201 *zd = usb_get_intfdata(interface); + if (!zd || !zd->dev) + return -ENODEV; + netif_device_attach(zd->dev); if (zd->was_enabled) -- cgit v1.2.2 From e3bc8b4e00d0ce219165d469409f2770698574f6 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 15 Jun 2005 08:04:30 -0700 Subject: [PATCH] USB: usbnet debug message fix One debug message won't print the right value; OSDL bugid 4545. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/net/usbnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/net') diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 4cbb408af727..8a945f4f3693 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c @@ -1429,7 +1429,7 @@ static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf) info->ether = (void *) buf; if (info->ether->bLength != sizeof *info->ether) { dev_dbg (&intf->dev, "CDC ether len %u\n", - info->u->bLength); + info->ether->bLength); goto bad_desc; } dev->net->mtu = le16_to_cpup ( -- cgit v1.2.2