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
--=.5J1RqPy'M(DR:C Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux)
iD8DBQE9lmJZPM4uCy7bAJgRAomdAJsH/UnJ7ccU1KnV8CinQQFl8gAdxACggZ04 Q7xNEPQLofyxTLO7BYrx9yE= =nAxQ -----END PGP SIGNATURE-----
--=.5J1RqPy'M(DR:C-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/