diff options
author | David Brownell <david-b@pacbell.net> | 2005-04-18 20:39:22 -0400 |
---|---|---|
committer | Greg K-H <gregkh@suse.de> | 2005-04-18 20:39:22 -0400 |
commit | 27d72e8572336d9f4e17a12ac924cb5223a5758d (patch) | |
tree | 791a046b5d860233f652973d0627752b67a3c600 /drivers/usb/net/usbnet.c | |
parent | c6053ecffb895f6c0e0ec9c1d298e35cffc1f7a6 (diff) |
[PATCH] usb suspend updates (interface suspend)
This is the first of a few installments of PM API updates to match the
recent switch to "pm_message_t". This installment primarily affects
USB device drivers (for USB interfaces), and it changes the handful of
drivers which currently implement suspend methods:
- <linux/usb.h> and usbcore, signature change
- Some drivers only changed the signature, net effect this just
shuts up "sparse -Wbitwise":
* hid-core
* stir4200
- Two network drivers did that, and also grew slightly more
featureful suspend code ... they now properly shut down
their activities. (As should stir4200...)
* pegasus
* usbnet
Note that the Wake-On-Lan (WOL) support in pegasus doesn't yet work; looks
to me like it's missing a request to turn it on, vs just configuring it.
The ASIX code in usbnet also has WOL hooks that are ready to use; untested.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/net/irda/stir4200.c
===================================================================
Diffstat (limited to 'drivers/usb/net/usbnet.c')
-rw-r--r-- | drivers/usb/net/usbnet.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index dd8b4456ea35..3e341b1ffdb1 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -3732,11 +3732,17 @@ out: | |||
3732 | 3732 | ||
3733 | #ifdef CONFIG_PM | 3733 | #ifdef CONFIG_PM |
3734 | 3734 | ||
3735 | static int usbnet_suspend (struct usb_interface *intf, u32 state) | 3735 | static 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 | ||