Skip to contentSkip to conversation

ne.c: fix suspend and resume for ISA PnP cards

PATCH Applied [email protected] 1 participant 1 message Sep 22, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/10 ne.c: fix suspend and resume for ISA PnP cards

From: David Fries <[email protected]>

A call to pnp_stop_dev and pnp_start_dev now shuts down and initializes plug and play devices for suspend and resume.

Cc Atsushi Nemoto <[email protected]>
Cc Paul Gortmaker <[email protected]>
Cc Alan Cox <[email protected]>
Cc Jeff Garzik <[email protected]>

---

 drivers/net/ne.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/ne.c renamed from drivers/net/ne.c~nec-fix-suspend-and-resume-for-isa-pnp-cards +8 -1
diff -puN drivers/net/ne.c~nec-fix-suspend-and-resume-for-isa-pnp-cards drivers/net/ne.c
@@ -895,8 +895,12 @@ static int ne_drv_suspend(struct platfor
 {
 	struct net_device *dev = platform_get_drvdata(pdev);
 
-	if (netif_running(dev))
+	if (netif_running(dev)) {
+		struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
 		netif_device_detach(dev);
+		if (idev)
+			pnp_stop_dev(idev);
+	}
 	return 0;
 }
 
@@ -905,6 +909,9 @@ static int ne_drv_resume(struct platform
 	struct net_device *dev = platform_get_drvdata(pdev);
 
 	if (netif_running(dev)) {
+		struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
+		if (idev)
+			pnp_start_dev(idev);
 		ne_reset_8390(dev);
 		NS8390p_init(dev, 1);
 		netif_device_attach(dev);

_