This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / net / pci-skeleton.c
index 81dee74..f931248 100644 (file)
@@ -481,6 +481,7 @@ struct netdrv_private {
        unsigned int mediasense:1;      /* Media sensing in progress. */
        spinlock_t lock;
        chip_t chipset;
+       u32 pci_state[16];      /* Data saved during suspend */
 };
 
 MODULE_AUTHOR ("Jeff Garzik <jgarzik@pobox.com>");
@@ -795,7 +796,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
        tp->pci_dev = pdev;
        tp->board = ent->driver_data;
        tp->mmio_addr = ioaddr;
-       spin_lock_init(&tp->lock);
+       tp->lock = SPIN_LOCK_UNLOCKED;
 
        pci_set_drvdata(pdev, dev);
 
@@ -1920,7 +1921,7 @@ static int netdrv_suspend (struct pci_dev *pdev, u32 state)
 
        spin_unlock_irqrestore (&tp->lock, flags);
 
-       pci_save_state (pdev);
+       pci_save_state (pdev, tp->pci_state);
        pci_set_power_state (pdev, 3);
 
        return 0;
@@ -1935,7 +1936,7 @@ static int netdrv_resume (struct pci_dev *pdev)
        if (!netif_running(dev))
                return 0;
        pci_set_power_state (pdev, 0);
-       pci_restore_state (pdev);
+       pci_restore_state (pdev, tp->pci_state);
        netif_device_attach (dev);
        netdrv_hw_start (dev);