aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/net/usbnet.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 10:28:57 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 10:28:57 -0400
commita9e4820c4c170b3df0d2185f7b4130b0b2daed2c (patch)
tree962bc52ba0e8e585d88e1fb9a9be9a67072767dd /drivers/usb/net/usbnet.c
parentc0698f2f6e4839ce9463ce731c892993215ea067 (diff)
parente838a0d4d5260bce452c96914a6e86b217c53c55 (diff)
Merge with Greg's USB tree at kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
Yah, it does work to merge. Knock wood.
Diffstat (limited to 'drivers/usb/net/usbnet.c')
-rw-r--r--drivers/usb/net/usbnet.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index dd8b4456ea35..bbaef047d532 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -426,7 +426,7 @@ static void skb_return (struct usbnet *dev, struct sk_buff *skb)
426 dev->stats.rx_bytes += skb->len; 426 dev->stats.rx_bytes += skb->len;
427 427
428 if (netif_msg_rx_status (dev)) 428 if (netif_msg_rx_status (dev))
429 devdbg (dev, "< rx, len %d, type 0x%x", 429 devdbg (dev, "< rx, len %zd, type 0x%x",
430 skb->len + sizeof (struct ethhdr), skb->protocol); 430 skb->len + sizeof (struct ethhdr), skb->protocol);
431 memset (skb->cb, 0, sizeof (struct skb_data)); 431 memset (skb->cb, 0, sizeof (struct skb_data));
432 status = netif_rx (skb); 432 status = netif_rx (skb);
@@ -3732,11 +3732,17 @@ out:
3732 3732
3733#ifdef CONFIG_PM 3733#ifdef CONFIG_PM
3734 3734
3735static int usbnet_suspend (struct usb_interface *intf, u32 state) 3735static int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
3736{ 3736{
3737 struct usbnet *dev = usb_get_intfdata(intf); 3737 struct usbnet *dev = usb_get_intfdata(intf);
3738 3738
3739 /* accelerate emptying of the rx and queues, to avoid
3740 * having everything error out.
3741 */
3739 netif_device_detach (dev->net); 3742 netif_device_detach (dev->net);
3743 (void) unlink_urbs (dev, &dev->rxq);
3744 (void) unlink_urbs (dev, &dev->txq);
3745 intf->dev.power.power_state = PMSG_SUSPEND;
3740 return 0; 3746 return 0;
3741} 3747}
3742 3748
@@ -3744,7 +3750,9 @@ static int usbnet_resume (struct usb_interface *intf)
3744{ 3750{
3745 struct usbnet *dev = usb_get_intfdata(intf); 3751 struct usbnet *dev = usb_get_intfdata(intf);
3746 3752
3753 intf->dev.power.power_state = PMSG_ON;
3747 netif_device_attach (dev->net); 3754 netif_device_attach (dev->net);
3755 tasklet_schedule (&dev->bh);
3748 return 0; 3756 return 0;
3749} 3757}
3750 3758
@@ -4009,10 +4017,23 @@ static const struct usb_device_id products [] = {
4009 .idProduct = 0x9050, /* C-860 */ 4017 .idProduct = 0x9050, /* C-860 */
4010 ZAURUS_MASTER_INTERFACE, 4018 ZAURUS_MASTER_INTERFACE,
4011 .driver_info = ZAURUS_PXA_INFO, 4019 .driver_info = ZAURUS_PXA_INFO,
4020},
4021
4012#ifdef CONFIG_USB_ZAURUS 4022#ifdef CONFIG_USB_ZAURUS
4013 /* at least some (reports vary) C-860 units have very different 4023 /* at least some (reports vary) PXA units have very different
4014 * lies about their standards support. 4024 * lies about their standards support: they claim to be cell
4025 * phones giving direct radio access (which they aren't).
4015 */ 4026 */
4027{
4028 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
4029 | USB_DEVICE_ID_MATCH_DEVICE,
4030 .idVendor = 0x04DD,
4031 /* Sharp ROM v1.32 */
4032 .idProduct = 0x8006, /* SL-5600 */
4033 .bInterfaceClass = USB_CLASS_COMM,
4034 .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM,
4035 .bInterfaceProtocol = USB_CDC_PROTO_NONE,
4036 .driver_info = (unsigned long) &zaurus_pxa_mdlm_info,
4016}, { 4037}, {
4017 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO 4038 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
4018 | USB_DEVICE_ID_MATCH_DEVICE, 4039 | USB_DEVICE_ID_MATCH_DEVICE,
@@ -4023,8 +4044,8 @@ static const struct usb_device_id products [] = {
4023 .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM, 4044 .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM,
4024 .bInterfaceProtocol = USB_CDC_PROTO_NONE, 4045 .bInterfaceProtocol = USB_CDC_PROTO_NONE,
4025 .driver_info = (unsigned long) &zaurus_pxa_mdlm_info, 4046 .driver_info = (unsigned long) &zaurus_pxa_mdlm_info,
4026#endif
4027}, 4047},
4048#endif
4028 4049
4029/* Olympus has some models with a Zaurus-compatible option. 4050/* Olympus has some models with a Zaurus-compatible option.
4030 * R-1000 uses a FreeScale i.MXL cpu (ARMv4T) 4051 * R-1000 uses a FreeScale i.MXL cpu (ARMv4T)