diff options
author | David Fries <david@fries.net> | 2008-09-08 23:01:14 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:48:59 -0400 |
commit | 539b06fc73b1d470b9ecb3fe7af6d5f439322c08 (patch) | |
tree | c80c5c4c311d1dcb7497fbc7ce41f990df6f2a63 /drivers/net/ne.c | |
parent | 533763d34862101090f8563aa9da202583b2423d (diff) |
[netdrvr] ne: Fix suspend and resume for ISA PnP cards.
A call to pnp_stop_dev and pnp_start_dev now shuts down and
initializes plug and play devices for suspend and resume.
Signed-off-by: David Fries <david@fries.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ne.c')
-rw-r--r-- | drivers/net/ne.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ne.c b/drivers/net/ne.c index fa3ceca4e15c..79599900c4b5 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c | |||
@@ -844,8 +844,12 @@ static int ne_drv_suspend(struct platform_device *pdev, pm_message_t state) | |||
844 | { | 844 | { |
845 | struct net_device *dev = platform_get_drvdata(pdev); | 845 | struct net_device *dev = platform_get_drvdata(pdev); |
846 | 846 | ||
847 | if (netif_running(dev)) | 847 | if (netif_running(dev)) { |
848 | struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv; | ||
848 | netif_device_detach(dev); | 849 | netif_device_detach(dev); |
850 | if (idev) | ||
851 | pnp_stop_dev(idev); | ||
852 | } | ||
849 | return 0; | 853 | return 0; |
850 | } | 854 | } |
851 | 855 | ||
@@ -854,6 +858,9 @@ static int ne_drv_resume(struct platform_device *pdev) | |||
854 | struct net_device *dev = platform_get_drvdata(pdev); | 858 | struct net_device *dev = platform_get_drvdata(pdev); |
855 | 859 | ||
856 | if (netif_running(dev)) { | 860 | if (netif_running(dev)) { |
861 | struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv; | ||
862 | if (idev) | ||
863 | pnp_start_dev(idev); | ||
857 | ne_reset_8390(dev); | 864 | ne_reset_8390(dev); |
858 | NS8390p_init(dev, 1); | 865 | NS8390p_init(dev, 1); |
859 | netif_device_attach(dev); | 866 | netif_device_attach(dev); |