linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* problem abort software suspend.
@ 2002-09-29  2:15 Hu Gang
  0 siblings, 0 replies; only message in thread
From: Hu Gang @ 2002-09-29  2:15 UTC (permalink / raw)
  To: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

Hi Pavel Machek:
  
  I found result, That why my laptop without PM can do suspend/resume and with the PM can Not do suspend/resume. 
  The problem is in 3c59x modules.
  I write an mini script do suspend and resume. When stop the net interface and remove the 3c59x all is fine. But not remove the 3c59x modules, in resume will panic.
  After it, I do the follow test. Change the 3c59x code. Now suspend and resume, the kernel not panic, and all is fine. But I see the "recall resume" from dmesg command, So that is the problem.

 Summarize: In resume progress have overlay device resume. 

I thinks add the check code in low level driver is not good idea. 
----------------------------------------------------patch code-----------
 #ifdef CONFIG_PM
-
+static int in_suspend = 0;
 static int vortex_suspend (struct pci_dev *pdev, u32 state)
 {
        struct net_device *dev = pci_get_drvdata(pdev);
 
+       if (in_suspend == 1) {
+               printk("recall suspend\n");
+               return 0;
+       }
+       printk("doing vortex suspend\n");
+       in_suspend = 1;
+
        if (dev && dev->priv) {
                if (netif_running(dev)) {
                        netif_device_detach(dev);
@@ -904,6 +911,13 @@
 static int vortex_resume (struct pci_dev *pdev)
 {
        struct net_device *dev = pci_get_drvdata(pdev);
+       
+       if (in_suspend == 0) {
+               printk("recall resume\n");
+               return 0;
+       }
+       printk("doing vortex resume\n");
+       in_suspend = 0;
 
        if (dev && dev->priv) {
                if (netif_running(dev)) {

 
  
 


 

-- 
		- Hu Gang



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-29  2:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-29  2:15 problem abort software suspend Hu Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).